Previous 199869 Revisions Next

r41711 Monday 9th November, 2015 at 01:39:10 UTC by Shideravan
Adding the Interactive CD Sampler collection
[/trunk]makefile
[hash]psx.xml
[scripts/src]bus.lua cpu.lua lib.lua netlist.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/abcbus]lux4105.cpp lux4105.h
[src/devices/bus/c64]easyflash.cpp kingsoft.cpp
[src/devices/bus/cpc]doubler.cpp transtape.cpp transtape.h
[src/devices/bus/nes]nanjing.cpp
[src/devices/bus/wangpc]mvc.cpp
[src/devices/cpu/cubeqcpu]cubeqcpu.cpp
[src/devices/cpu/dsp32]dsp32.cpp
[src/devices/cpu/hcd62121]hcd62121_ops.h
[src/devices/cpu/i8085]i8085.cpp i8085.h
[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/nec]necinstr.inc
[src/devices/cpu/sh2]sh2comn.cpp
[src/devices/cpu/sh4]sh4dmac.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/upd7810]upd7810.cpp
[src/devices/cpu/v810]v810.cpp
[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 74181.cpp am9517a.cpp bankdev.cpp e05a03.cpp i8279.cpp keyboard.cpp legscsi.cpp nvram.cpp pci.cpp pit8253.cpp ram.cpp tc009xlvc.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 votrax.h ym2151.cpp
[src/devices/video]ef9345.cpp h63484.cpp i8244.cpp mc6845.cpp poly.h psx.cpp scn2674.cpp
[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 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 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.h 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/formats]ioprocs.cpp upd765_dsk.cpp
[src/lib/netlist]nl_parser.cpp
[src/lib/netlist/devices]nld_system.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 bfm_ad5.cpp bfm_sc5sw.cpp c65_old.cpp* chihiro.cpp d6800.cpp exidyttl.cpp fidelz80.cpp goldnpkr.cpp goldstar.cpp gstream.cpp inder.cpp jchan.cpp model3.cpp naomi.cpp pc2000.cpp pse.cpp psikyo.cpp psikyosh.cpp ptcsol.cpp rabbit.cpp shadfrce.cpp spinb.cpp ssem.cpp st_mp200.cpp taitottl.cpp vboy.cpp
[src/mame/includes]amstrad.h fidelz80.h shadfrce.h
[src/mame/layout]cmpacman.lay
[src/mame/machine]c65_old.cpp* dc.cpp deco146.cpp namcos2.cpp pgmprot_igs027a_type1.cpp sorcerer.cpp xbox.cpp
[src/mame/video]aerofgt.cpp aussiebyte.cpp cosmic.cpp mikromik.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_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/hash/psx.xml
r250222r250223
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<!--
7<!-- size="364872255" crc="536126e5" -->   
8   <software name="intcdv1m">
9      <description>Interactive CD Sampler Disc - Volume 1 (M Rated)</description>
10      <year>199?</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 2</description>
22      <year>199?</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="487436203" crc="d96b31d2" -->
32   <software name="intcdv3">
33      <description>Interactive CD Sampler Disc - Volume 3 (1.2)</description>
34      <year>199?</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.2)" sha1="20f261877d3f63bd9215ca791800417ff7287e46"/>
39         </diskarea>
40      </part>
41   </software>
42
43<!-- size="354903558" crc="67ca3059" -->
44   <software name="intcdv4">
45      <description>Interactive CD Sampler Disc - Volume 4</description>
46      <year>199?</year>
47      <publisher>SCEA</publisher>
48      <part name="cdrom" interface="psx_cdrom">
49         <diskarea name="cdrom">
50            <disk name="interactive cd sampler disc - volume 4" sha1="c353a52e8b7831f11d3ce8ea771e865e9ba3431a"/>
51         </diskarea>
52      </part>
53   </software>
54
55<!-- size="291855185" crc="8119ed78" -->
56   <software name="intcdv5">
57      <description>Interactive CD Sampler Disc - Volume 5</description>
58      <year>199?</year>
59      <publisher>SCEA</publisher>
60      <part name="cdrom" interface="psx_cdrom">
61         <diskarea name="cdrom">
62            <disk name="interactive cd sampler disc - volume 5" sha1="9aef2ff7583b61d24302a35831a25ed5549610e1"/>
63         </diskarea>
64      </part>
65   </software>
66
67<!-- size="427620748" crc="917b5f35" -->
68   <software name="intcdv6">
69      <description>Interactive CD Sampler Disc - Volume 6</description>
70      <year>199?</year>
71      <publisher>SCEA</publisher>
72      <part name="cdrom" interface="psx_cdrom">
73         <diskarea name="cdrom">
74            <disk name="interactive cd sampler disc - volume 6" sha1="c35833fdd8a46016b3ccafa9ae08f68c10309737"/>
75         </diskarea>
76      </part>
77   </software>
78
79<!-- size="397092409" crc="17f17815" -->
80   <software name="intcdv7">
81      <description>Interactive CD Sampler Disc - Volume 7</description>
82      <year>199?</year>
83      <publisher>SCEA</publisher>
84      <part name="cdrom" interface="psx_cdrom">
85         <diskarea name="cdrom">
86            <disk name="interactive cd sampler disc - volume 7" sha1="81db574e4599e022cfac938516cff29bb09d1388"/>
87         </diskarea>
88      </part>
89   </software>
90
91<!-- size="420000809" crc="91d8b335" -->
92   <software name="intcdv8">
93      <description>Interactive CD Sampler Disc - Volume 8</description>
94      <year>199?</year>
95      <publisher>SCEA</publisher>
96      <part name="cdrom" interface="psx_cdrom">
97         <diskarea name="cdrom">
98            <disk name="interactive cd sampler disc - volume 8" sha1="7f23e2d284a104e6914d34527960567111914264"/>
99         </diskarea>
100      </part>
101   </software>
102
103<!-- size="389598196" crc="993e0ab1" -->
104   <software name="intcdv9">
105      <description>Interactive CD Sampler Disc - Volume 9</description>
106      <year>199?</year>
107      <publisher>SCEA</publisher>
108      <part name="cdrom" interface="psx_cdrom">
109         <diskarea name="cdrom">
110            <disk name="interactive cd sampler disc - volume 9" sha1="286559ce34f06a7f2eb2b441e9188da0e158d107"/>
111         </diskarea>
112      </part>
113   </software>
114
115<!-- size="365007076" crc="5f5fd01f" -->
116   <software name="intcdv10">
117      <description>Interactive CD Sampler Disc - Volume 10</description>
118      <year>199?</year>
119      <publisher>SCEA</publisher>
120      <part name="cdrom" interface="psx_cdrom">
121         <diskarea name="cdrom">
122            <disk name="interactive cd sampler disc - volume 10" sha1="8c414a1e26ac98d07f774cc8b16eb2fa8da0ca61"/>
123         </diskarea>
124      </part>
125   </software>
126
127<!-- size="272935197" crc="82e6fdf0" -->
128   <software name="intcdv11">
129      <description>Interactive CD Sampler Disc - Volume 11</description>
130      <year>199?</year>
131      <publisher>SCEA</publisher>
132      <part name="cdrom" interface="psx_cdrom">
133         <diskarea name="cdrom">
134            <disk name="interactive cd sampler disc - volume 11" sha1="3029004840d98c2789d2a0d93bdd762b3c56df0f"/>
135         </diskarea>
136      </part>
137   </software>
138
8139***********************
9140NON-REDUMP Rips
10141***********************
r250222r250223
27158   that subtle errors are introduced either in this procedure, or in the original creation of the mdf/mds/cdi image. These should
28159   be verified with the original media, and are marked as bad dumps.
29160-->
161   <!-- todo, reconvert original dumps using current CHDMAN version - Feb 2014 -->
30162
163<!--
31164
32165<!-- Pirate disks -->
33166
trunk/makefile
r250222r250223
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
682677ifndef SOURCES
683678SCRIPTS += scripts/target/$(TARGET)/$(SUBTARGET).lua
684679endif
trunk/scripts/src/bus.lua
r250222r250223
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",
22102208   }
22112209end
22122210
trunk/scripts/src/cpu.lua
r250222r250223
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",
9693   }
9794   dependency {
9895      { MAME_DIR .. "src/devices/cpu/arcompact/arcompact.cpp",        GEN_DIR .. "emu/cpu/arcompact/arcompact.inc" },
r250222r250223
137134      MAME_DIR .. "src/devices/cpu/arm7/arm7ops.cpp",
138135      MAME_DIR .. "src/devices/cpu/arm7/lpc210x.cpp",
139136      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",
145137   }
146138end
147139
r250222r250223
207199   files {
208200      MAME_DIR .. "src/devices/cpu/adsp2100/adsp2100.cpp",
209201      MAME_DIR .. "src/devices/cpu/adsp2100/adsp2100.h",
210      MAME_DIR .. "src/devices/cpu/adsp2100/2100ops.inc",
211202   }
212203end
213204
r250222r250223
224215   files {
225216      MAME_DIR .. "src/devices/cpu/sharc/sharc.cpp",
226217      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",
233218   }
234219end
235220
r250222r250223
262247   files {
263248      MAME_DIR .. "src/devices/cpu/dsp16/dsp16.cpp",
264249      MAME_DIR .. "src/devices/cpu/dsp16/dsp16.h",
265      MAME_DIR .. "src/devices/cpu/dsp16/dsp16ops.inc",
266250   }
267251end
268252
r250222r250223
279263   files {
280264      MAME_DIR .. "src/devices/cpu/dsp32/dsp32.cpp",
281265      MAME_DIR .. "src/devices/cpu/dsp32/dsp32.h",
282      MAME_DIR .. "src/devices/cpu/dsp32/dsp32ops.inc",
283266   }
284267end
285268
r250222r250223
312295   files {
313296      MAME_DIR .. "src/devices/cpu/am29000/am29000.cpp",
314297      MAME_DIR .. "src/devices/cpu/am29000/am29000.h",
315      MAME_DIR .. "src/devices/cpu/am29000/am29ops.h",
316298   }
317299end
318300
r250222r250223
391373      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6200.h",
392374      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6s46.cpp",
393375      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6s46.h",
394      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6200op.inc",
395376   }
396377end
397378
r250222r250223
424405   files {
425406      MAME_DIR .. "src/devices/cpu/cop400/cop400.cpp",
426407      MAME_DIR .. "src/devices/cpu/cop400/cop400.h",
427      MAME_DIR .. "src/devices/cpu/cop400/cop400op.inc",
428408   }
429409end
430410
r250222r250223
475455   files {
476456      MAME_DIR .. "src/devices/cpu/t11/t11.cpp",
477457      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",
480458   }
481459end
482460
r250222r250223
530508      MAME_DIR .. "src/devices/cpu/g65816/g65816o2.cpp",
531509      MAME_DIR .. "src/devices/cpu/g65816/g65816o3.cpp",
532510      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",
536511   }
537512end
538513
r250222r250223
611586   files {
612587      MAME_DIR .. "src/devices/cpu/hcd62121/hcd62121.cpp",
613588      MAME_DIR .. "src/devices/cpu/hcd62121/hcd62121.h",
614      MAME_DIR .. "src/devices/cpu/hcd62121/hcd62121_ops.h",
615589   }
616590end
617591
r250222r250223
646620      MAME_DIR .. "src/devices/cpu/sh2/sh2.cpp",
647621      MAME_DIR .. "src/devices/cpu/sh2/sh2.h",
648622      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",
652623   }
653624end
654625
r250222r250223
673644      MAME_DIR .. "src/devices/cpu/sh4/sh4tmu.h",
674645      MAME_DIR .. "src/devices/cpu/sh4/sh4dmac.cpp",
675646      MAME_DIR .. "src/devices/cpu/sh4/sh4dmac.h",
676      MAME_DIR .. "src/devices/cpu/sh4/sh4regs.h",
677647   }
678648end
679649
r250222r250223
722692   files {
723693      MAME_DIR .. "src/devices/cpu/e132xs/e132xs.cpp",
724694      MAME_DIR .. "src/devices/cpu/e132xs/e132xs.h",
725      MAME_DIR .. "src/devices/cpu/e132xs/e132xsop.inc",
726695   }
727696end
728697
r250222r250223
803772   files {
804773      MAME_DIR .. "src/devices/cpu/i8085/i8085.cpp",
805774      MAME_DIR .. "src/devices/cpu/i8085/i8085.h",
806      MAME_DIR .. "src/devices/cpu/i8085/i8085cpu.h",
807775   }
808776end
809777
r250222r250223
855823   files {
856824      MAME_DIR .. "src/devices/cpu/mcs51/mcs51.cpp",
857825      MAME_DIR .. "src/devices/cpu/mcs51/mcs51.h",
858      MAME_DIR .. "src/devices/cpu/mcs51/mcs51ops.inc",
859826   }
860827end
861828
r250222r250223
905872      MAME_DIR .. "src/devices/cpu/i86/i186.h",
906873      MAME_DIR .. "src/devices/cpu/i86/i286.cpp",
907874      MAME_DIR .. "src/devices/cpu/i86/i286.h",
908      MAME_DIR .. "src/devices/cpu/i86/i86inline.h",
909875   }
910876end
911877
r250222r250223
917883   files {
918884      MAME_DIR .. "src/devices/cpu/i386/i386.cpp",
919885      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",
929886   }
930887end
931888
r250222r250223
942899   files {
943900      MAME_DIR .. "src/devices/cpu/i860/i860.cpp",
944901      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",
947902   }
948903end
949904
r250222r250223
959914if (CPUS["I960"]~=null) then
960915   files {
961916      MAME_DIR .. "src/devices/cpu/i960/i960.cpp",
962      MAME_DIR .. "src/devices/cpu/i960/i960.h",     
917      MAME_DIR .. "src/devices/cpu/i960/i960.h",
963918   }
964919end
965920
966921if (CPUS["I960"]~=null or _OPTIONS["with-tools"]) then
967922   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")
969923end
970924
971925--------------------------------------------------
r250222r250223
977931   files {
978932      MAME_DIR .. "src/devices/cpu/lh5801/lh5801.cpp",
979933      MAME_DIR .. "src/devices/cpu/lh5801/lh5801.h",
980      MAME_DIR .. "src/devices/cpu/lh5801/5801tbl.inc",
981934   }
982935end
983936
r250222r250223
10581011   files {
10591012      MAME_DIR .. "src/devices/cpu/pic16c5x/pic16c5x.cpp",
10601013      MAME_DIR .. "src/devices/cpu/pic16c5x/pic16c5x.h",
1061      --MAME_DIR .. "src/devices/cpu/pic16c5x/dis16c5x.cpp",
10621014   }
10631015end
10641016
r250222r250223
10751027   files {
10761028      MAME_DIR .. "src/devices/cpu/pic16c62x/pic16c62x.cpp",
10771029      MAME_DIR .. "src/devices/cpu/pic16c62x/pic16c62x.h",
1078      --MAME_DIR .. "src/devices/cpu/pic16c62x/dis16c62x.cpp",
10791030   }
10801031end
10811032
r250222r250223
11291080      MAME_DIR .. "src/devices/cpu/psx/rcnt.h",
11301081      MAME_DIR .. "src/devices/cpu/psx/sio.cpp",
11311082      MAME_DIR .. "src/devices/cpu/psx/sio.h",
1132      --MAME_DIR .. "src/devices/cpu/psx/dismips.cpp",
11331083   }
11341084end
11351085
r250222r250223
11691119      MAME_DIR .. "src/devices/cpu/m37710/m37710o1.cpp",
11701120      MAME_DIR .. "src/devices/cpu/m37710/m37710o2.cpp",
11711121      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",   
11761122   }
11771123end
11781124
r250222r250223
12801226   files {
12811227      MAME_DIR .. "src/devices/cpu/m6800/m6800.cpp",
12821228      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",
12851229   }
12861230end
12871231
r250222r250223
12981242   files {
12991243      MAME_DIR .. "src/devices/cpu/m6805/m6805.cpp",
13001244      MAME_DIR .. "src/devices/cpu/m6805/m6805.h",
1301      MAME_DIR .. "src/devices/cpu/m6805/6805ops.inc",
13021245   }
13031246end
13041247
r250222r250223
13211264      MAME_DIR .. "src/devices/cpu/m6809/hd6309.h",
13221265      MAME_DIR .. "src/devices/cpu/m6809/konami.cpp",
13231266      MAME_DIR .. "src/devices/cpu/m6809/konami.h",
1324      MAME_DIR .. "src/devices/cpu/m6809/m6809inl.h",
13251267   }
13261268
13271269   dependency {
r250222r250223
13521294   files {
13531295      MAME_DIR .. "src/devices/cpu/mc68hc11/mc68hc11.cpp",
13541296      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",
13571297   }
13581298end
13591299
r250222r250223
13721312      MAME_DIR .. "src/devices/cpu/m68000/m68kcpu.h",
13731313      MAME_DIR .. "src/devices/cpu/m68000/m68kops.cpp",
13741314      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",
13801315   }
13811316end
13821317
r250222r250223
13971332      MAME_DIR .. "src/devices/cpu/dsp56k/dsp56mem.h",
13981333      MAME_DIR .. "src/devices/cpu/dsp56k/dsp56pcu.cpp",
13991334      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",
14061335   }
14071336end
14081337
r250222r250223
14471376      MAME_DIR .. "src/devices/cpu/powerpc/ppcfe.cpp",
14481377      MAME_DIR .. "src/devices/cpu/powerpc/ppcfe.h",
14491378      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",
14611379   }
14621380end
14631381
r250222r250223
14751393   files {
14761394      MAME_DIR .. "src/devices/cpu/nec/nec.cpp",
14771395      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",
14871396      MAME_DIR .. "src/devices/cpu/nec/v25.cpp",
14881397      MAME_DIR .. "src/devices/cpu/nec/v25.h",
14891398      MAME_DIR .. "src/devices/cpu/nec/v25sfr.cpp",
r250222r250223
15161425   files {
15171426      MAME_DIR .. "src/devices/cpu/v60/v60.cpp",
15181427      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",
15311428   }
15321429end
15331430
r250222r250223
15781475      MAME_DIR .. "src/devices/cpu/upd7810/upd7810.h",
15791476      MAME_DIR .. "src/devices/cpu/upd7810/upd7810_opcodes.cpp",
15801477      MAME_DIR .. "src/devices/cpu/upd7810/upd7810_table.cpp",
1581      MAME_DIR .. "src/devices/cpu/upd7810/upd7810_macros.h",
15821478   }
15831479end
15841480
r250222r250223
16121508   files {
16131509      MAME_DIR .. "src/devices/cpu/minx/minx.cpp",
16141510      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",   
16191511   }
16201512end
16211513
r250222r250223
16651557      MAME_DIR .. "src/devices/cpu/rsp/vsub.h",
16661558      MAME_DIR .. "src/devices/cpu/rsp/vsubc.h",
16671559      MAME_DIR .. "src/devices/cpu/rsp/vxor.h",
1668      MAME_DIR .. "src/devices/cpu/rsp/rspdiv.h",
16691560   }
16701561end
16711562
r250222r250223
16981589   files {
16991590      MAME_DIR .. "src/devices/cpu/saturn/saturn.cpp",
17001591      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",     
17031592   }
17041593end
17051594
r250222r250223
17351624   files {
17361625      MAME_DIR .. "src/devices/cpu/sm8500/sm8500.cpp",
17371626      MAME_DIR .. "src/devices/cpu/sm8500/sm8500.h",
1738      MAME_DIR .. "src/devices/cpu/sm8500/sm85ops.h",
17391627   }
17401628end
17411629
r250222r250223
17521640   files {
17531641      MAME_DIR .. "src/devices/cpu/s2650/s2650.cpp",
17541642      MAME_DIR .. "src/devices/cpu/s2650/s2650.h",
1755      MAME_DIR .. "src/devices/cpu/s2650/s2650cpu.h",
17561643   }
17571644end
17581645
r250222r250223
17691656   files {
17701657      MAME_DIR .. "src/devices/cpu/sc61860/sc61860.cpp",
17711658      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",
17751659   }
17761660end
17771661
r250222r250223
17881672   files {
17891673      MAME_DIR .. "src/devices/cpu/spc700/spc700.cpp",
17901674      MAME_DIR .. "src/devices/cpu/spc700/spc700.h",
1791      MAME_DIR .. "src/devices/cpu/spc700/spc700ds.h",
17921675   }
17931676end
17941677
r250222r250223
18691752   files {
18701753      MAME_DIR .. "src/devices/cpu/tms7000/tms7000.cpp",
18711754      MAME_DIR .. "src/devices/cpu/tms7000/tms7000.h",
1872      MAME_DIR .. "src/devices/cpu/tms7000/tms70op.inc",
18731755   }
18741756end
18751757
r250222r250223
18951777      MAME_DIR .. "src/devices/cpu/tms9900/tms9995.h",
18961778      MAME_DIR .. "src/devices/cpu/tms9900/ti990_10.cpp",
18971779      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",
19001780   }
19011781end
19021782
r250222r250223
19131793   files {
19141794      MAME_DIR .. "src/devices/cpu/tms34010/tms34010.cpp",
19151795      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",
19221796   }
19231797end
19241798
r250222r250223
19351809   files {
19361810      MAME_DIR .. "src/devices/cpu/tms32010/tms32010.cpp",
19371811      MAME_DIR .. "src/devices/cpu/tms32010/tms32010.h",
1938      --MAME_DIR .. "src/devices/cpu/tms32010/dis32010.cpp",
19391812   }
19401813end
19411814
r250222r250223
19521825   files {
19531826      MAME_DIR .. "src/devices/cpu/tms32025/tms32025.cpp",
19541827      MAME_DIR .. "src/devices/cpu/tms32025/tms32025.h",
1955      --MAME_DIR .. "src/devices/cpu/tms32025/dis32025.cpp",
19561828   }
19571829end
19581830
r250222r250223
19691841   files {
19701842      MAME_DIR .. "src/devices/cpu/tms32031/tms32031.cpp",
19711843      MAME_DIR .. "src/devices/cpu/tms32031/tms32031.h",
1972      MAME_DIR .. "src/devices/cpu/tms32031/32031ops.inc",
19731844   }
19741845end
19751846
r250222r250223
19861857   files {
19871858      MAME_DIR .. "src/devices/cpu/tms32051/tms32051.cpp",
19881859      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",
19911860   }
19921861end
19931862
r250222r250223
20601929   files {
20611930      MAME_DIR .. "src/devices/cpu/tlcs900/tlcs900.cpp",
20621931      MAME_DIR .. "src/devices/cpu/tlcs900/tlcs900.h",
2063      MAME_DIR .. "src/devices/cpu/tlcs900/900tbl.inc",
20641932   }
20651933end
20661934
r250222r250223
21021970   files {
21031971      MAME_DIR .. "src/devices/cpu/lr35902/lr35902.cpp",
21041972      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",
21071973   }
21081974end
21091975
r250222r250223
21201986   files {
21211987      MAME_DIR .. "src/devices/cpu/z180/z180.cpp",
21221988      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",
21311989      MAME_DIR .. "src/devices/cpu/z80/z80daisy.cpp",
21321990      MAME_DIR .. "src/devices/cpu/z80/z80daisy.h",
21331991   }
r250222r250223
21462004   files {
21472005      MAME_DIR .. "src/devices/cpu/z8000/z8000.cpp",
21482006      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",
21542007   }
21552008end
21562009
r250222r250223
21672020   files {
21682021      MAME_DIR .. "src/devices/cpu/z8/z8.cpp",
21692022      MAME_DIR .. "src/devices/cpu/z8/z8.h",
2170      MAME_DIR .. "src/devices/cpu/z8/z8ops.inc",
21712023   }
21722024end
21732025
r250222r250223
22642116   files {
22652117      MAME_DIR .. "src/devices/cpu/score/score.cpp",
22662118      MAME_DIR .. "src/devices/cpu/score/score.h",
2267      MAME_DIR .. "src/devices/cpu/score/scorem.h",
22682119   }
22692120end
22702121
r250222r250223
23172168      MAME_DIR .. "src/devices/cpu/alto2/a2ram.h",
23182169      MAME_DIR .. "src/devices/cpu/alto2/a2roms.cpp",
23192170      MAME_DIR .. "src/devices/cpu/alto2/a2roms.h",
2320      MAME_DIR .. "src/devices/cpu/alto2/a2jkff.h",
23212171   }
23222172end
23232173
trunk/scripts/src/lib.lua
r250222r250223
178178      MAME_DIR .. "src/lib/formats/c8280_dsk.h",
179179      MAME_DIR .. "src/lib/formats/camplynx_cas.cpp",
180180      MAME_DIR .. "src/lib/formats/camplynx_cas.h",
181      MAME_DIR .. "src/lib/formats/camplynx_dsk.cpp",
182      MAME_DIR .. "src/lib/formats/camplynx_dsk.h",
183181      MAME_DIR .. "src/lib/formats/cbm_crt.cpp",
184182      MAME_DIR .. "src/lib/formats/cbm_crt.h",
185183      MAME_DIR .. "src/lib/formats/cbm_tap.cpp",
trunk/scripts/src/netlist.lua
r250222r250223
3434      MAME_DIR .. "src/lib/netlist/plib/pconfig.h",
3535      MAME_DIR .. "src/lib/netlist/plib/palloc.cpp",
3636      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",
37    MAME_DIR .. "src/lib/netlist/plib/pfmtlog.cpp",
38    MAME_DIR .. "src/lib/netlist/plib/pfmtlog.h",
3939      MAME_DIR .. "src/lib/netlist/plib/plists.h",
4040      MAME_DIR .. "src/lib/netlist/plib/poptions.h",
4141      MAME_DIR .. "src/lib/netlist/plib/pparser.cpp",
r250222r250223
4848      MAME_DIR .. "src/lib/netlist/plib/pstring.h",
4949      MAME_DIR .. "src/lib/netlist/plib/pstream.cpp",
5050      MAME_DIR .. "src/lib/netlist/plib/pstream.h",
51      MAME_DIR .. "src/lib/netlist/plib/ptypes.h",
51    MAME_DIR .. "src/lib/netlist/plib/ptypes.h",
5252      MAME_DIR .. "src/lib/netlist/tools/nl_convert.cpp",
5353      MAME_DIR .. "src/lib/netlist/tools/nl_convert.h",
5454      MAME_DIR .. "src/lib/netlist/analog/nld_bjt.cpp",
r250222r250223
6969      MAME_DIR .. "src/lib/netlist/solver/nld_ms_sor.h",
7070      MAME_DIR .. "src/lib/netlist/solver/nld_ms_sor_mat.h",
7171      MAME_DIR .. "src/lib/netlist/solver/nld_ms_gmres.h",
72      MAME_DIR .. "src/lib/netlist/solver/mat_cr.h",
73      MAME_DIR .. "src/lib/netlist/solver/nld_ms_direct_lu.h",
74      MAME_DIR .. "src/lib/netlist/solver/vector_base.h",     
7572      MAME_DIR .. "src/lib/netlist/devices/nld_4020.cpp",
7673      MAME_DIR .. "src/lib/netlist/devices/nld_4020.h",
7774      MAME_DIR .. "src/lib/netlist/devices/nld_4066.cpp",
r250222r250223
163160      MAME_DIR .. "src/lib/netlist/macro/nlm_opamp.cpp",
164161      MAME_DIR .. "src/lib/netlist/macro/nlm_opamp.h",
165162      MAME_DIR .. "src/lib/netlist/macro/nlm_other.cpp",
166      MAME_DIR .. "src/lib/netlist/macro/nlm_other.h",     
163      MAME_DIR .. "src/lib/netlist/macro/nlm_other.h",
167164}
trunk/scripts/src/osd/modules.lua
r250222r250223
3535
3636   files {
3737      MAME_DIR .. "src/osd/osdnet.cpp",
38      MAME_DIR .. "src/osd/osdnet.h",
39      MAME_DIR .. "src/osd/modules/debugger/debug_module.h",
40      MAME_DIR .. "src/osd/modules/font/font_module.h",
41      MAME_DIR .. "src/osd/modules/midi/midi_module.h",
42      MAME_DIR .. "src/osd/modules/netdev/netdev_module.h",
43      MAME_DIR .. "src/osd/modules/sound/sound_module.h",
4438      MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp",
45      MAME_DIR .. "src/osd/modules/lib/osdobj_common.h",
4639      MAME_DIR .. "src/osd/modules/debugger/none.cpp",
4740      MAME_DIR .. "src/osd/modules/debugger/debugint.cpp",
4841      MAME_DIR .. "src/osd/modules/debugger/debugwin.cpp",
r250222r250223
7871         MAME_DIR .. "src/osd/modules/render/drawogl.cpp",
7972         MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.cpp",
8073         MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.cpp",
81         MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h",
82         MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h",
83         MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h",
84         MAME_DIR .. "src/osd/modules/opengl/SDL1211_opengl.h",
8574      }
8675      defines {
8776         "USE_OPENGL=1",
r250222r250223
115104   if _OPTIONS["USE_QTDEBUG"]=="1" then
116105      files {
117106         MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.cpp",
118         MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h",
119107         MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.cpp",
120         MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h",
121108         MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.cpp",
122         MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.h",
123109         MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.cpp",
124         MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.h",
125110         MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.cpp",
126         MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.h",
127111         MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.cpp",
128         MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.h",
129112         MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.cpp",
130         MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h",
131113         MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.cpp",
132114         MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.cpp",
133         MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h",
134         MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h",
135115         GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.cpp",
136116         GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.cpp",
137117         GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.cpp",
trunk/scripts/src/osd/osdmini.lua
r250222r250223
3030
3131   files {
3232      MAME_DIR .. "src/osd/osdnet.cpp",
33      MAME_DIR .. "src/osd/osdnet.h",
3433      MAME_DIR .. "src/osd/osdmini/minimain.cpp",
35      MAME_DIR .. "src/osd/osdmini/osdmini.h",
36      MAME_DIR .. "src/osd/osdepend.h",
3734      MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp",
38      MAME_DIR .. "src/osd/modules/lib/osdobj_common.h",
3935      MAME_DIR .. "src/osd/modules/font/font_sdl.cpp",
4036      MAME_DIR .. "src/osd/modules/font/font_windows.cpp",
4137      MAME_DIR .. "src/osd/modules/font/font_osx.cpp",
r250222r250223
8985
9086   files {
9187      MAME_DIR .. "src/osd/osdcore.cpp",
92      MAME_DIR .. "src/osd/osdcore.h",
9388      MAME_DIR .. "src/osd/modules/osdmodule.cpp",
94      MAME_DIR .. "src/osd/modules/osdmodule.h",     
9589      MAME_DIR .. "src/osd/osdmini/minidir.cpp",
9690      MAME_DIR .. "src/osd/osdmini/minifile.cpp",
9791      MAME_DIR .. "src/osd/osdmini/minimisc.cpp",
trunk/scripts/src/osd/sdl.lua
r250222r250223
329329      files {
330330         MAME_DIR .. "src/osd/modules/debugger/debugosx.mm",
331331         MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.mm",
332         MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.h",
333332         MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.mm",
334         MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.h",
335333         MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.mm",
336         MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.h",
337334         MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.mm",
338         MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.h",
339335         MAME_DIR .. "src/osd/modules/debugger/osx/debugview.mm",
340         MAME_DIR .. "src/osd/modules/debugger/osx/debugview.h",
341336         MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.mm",
342         MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.h",
343337         MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.mm",
344         MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.h",
345338         MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.mm",
346         MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.h",
347339         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.mm",
348340         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.mm",
349         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.h",
350341         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.mm",
351         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.h",
352         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.h",
353342         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.mm",
354         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.h",
355343         MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.mm",
356         MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.h",
357344         MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.mm",
358         MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.h",
359345         MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.mm",
360         MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.h",
361346         MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm",
362         MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h",
363347         MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm",
364         MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",     
365         MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
366348      }
367349      if _OPTIONS["SDL_LIBVER"]=="sdl" then
368350         -- SDLMain_tmpl isn't necessary for SDL2
369351         files {
370352            MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
371            MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.h",
372353         }
373354      end
374355   end
375356
376357   files {
377      MAME_DIR .. "src/osd/sdl/osdsdl.h",
378      MAME_DIR .. "src/osd/sdl/sdlinc.h",
379      MAME_DIR .. "src/osd/sdl/sdlprefix.h",
380358      MAME_DIR .. "src/osd/sdl/sdlmain.cpp",
381      MAME_DIR .. "src/osd/osdepend.h",
382359      MAME_DIR .. "src/osd/sdl/input.cpp",
383      MAME_DIR .. "src/osd/sdl/input.h",
384360      MAME_DIR .. "src/osd/sdl/video.cpp",
385      MAME_DIR .. "src/osd/sdl/video.h",
386361      MAME_DIR .. "src/osd/sdl/window.cpp",
387      MAME_DIR .. "src/osd/sdl/window.h",
388      MAME_DIR .. "src/osd/modules/osdwindow.h",
389362      MAME_DIR .. "src/osd/sdl/output.cpp",
390363      MAME_DIR .. "src/osd/sdl/watchdog.cpp",
391      MAME_DIR .. "src/osd/sdl/watchdog.h",
392364      MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
393365   }
394366   if _OPTIONS["SDL_LIBVER"]=="sdl2" then
395367      files {
396368         MAME_DIR .. "src/osd/modules/render/draw13.cpp",
397         MAME_DIR .. "src/osd/modules/render/blit13.h",
398369      }
399370   end
400371
r250222r250223
420391
421392   files {
422393      MAME_DIR .. "src/osd/osdcore.cpp",
423      MAME_DIR .. "src/osd/osdcore.h",
424394      MAME_DIR .. "src/osd/strconv.cpp",
425      MAME_DIR .. "src/osd/strconv.h",
426395      MAME_DIR .. "src/osd/sdl/sdldir.cpp",
427396      MAME_DIR .. "src/osd/sdl/sdlfile.cpp",
428      MAME_DIR .. "src/osd/sdl/sdlfile.h",
429397      MAME_DIR .. "src/osd/sdl/sdlptty_" .. BASE_TARGETOS ..".cpp",
430398      MAME_DIR .. "src/osd/sdl/sdlsocket.cpp",
431399      MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".cpp",
432400      MAME_DIR .. "src/osd/modules/osdmodule.cpp",
433      MAME_DIR .. "src/osd/modules/osdmodule.h",     
434401      MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp",
435      MAME_DIR .. "src/osd/modules/lib/osdlib.h",
436402      MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".cpp",
437      MAME_DIR .. "src/osd/modules/sync/osdsync.h",
438403   }
439404
440405   if _OPTIONS["NOASM"]=="1" then
r250222r250223
449414
450415   if _OPTIONS["targetos"]=="macosx" then
451416      files {
452         MAME_DIR .. "src/osd/sdl/osxutils.h",
453417         MAME_DIR .. "src/osd/sdl/osxutils.mm",
454418      }
455419   end
trunk/scripts/src/osd/windows.lua
r250222r250223
129129
130130   files {
131131      MAME_DIR .. "src/osd/modules/render/drawd3d.cpp",
132      MAME_DIR .. "src/osd/modules/render/drawd3d.h",
133132      MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.cpp",
134133      MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.cpp",
135      MAME_DIR .. "src/osd/modules/render/d3d/d3dcomm.h",
136      MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.h",
137      MAME_DIR .. "src/osd/modules/render/d3d/d3dintf.h",
138134      MAME_DIR .. "src/osd/modules/render/drawdd.cpp",
139135      MAME_DIR .. "src/osd/modules/render/drawgdi.cpp",
140136      MAME_DIR .. "src/osd/modules/render/drawnone.cpp",
141137      MAME_DIR .. "src/osd/windows/input.cpp",
142      MAME_DIR .. "src/osd/windows/input.h",
143138      MAME_DIR .. "src/osd/windows/output.cpp",
144      MAME_DIR .. "src/osd/windows/output.h",
145139      MAME_DIR .. "src/osd/windows/video.cpp",
146      MAME_DIR .. "src/osd/windows/video.h",
147140      MAME_DIR .. "src/osd/windows/window.cpp",
148      MAME_DIR .. "src/osd/windows/window.h",
149      MAME_DIR .. "src/osd/modules/osdwindow.h",
150141      MAME_DIR .. "src/osd/windows/winmenu.cpp",
151142      MAME_DIR .. "src/osd/windows/winmain.cpp",
152      MAME_DIR .. "src/osd/windows/winmain.h",
153      MAME_DIR .. "src/osd/osdepend.h",
154143      MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.cpp",
155      MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.h",
156144      MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.cpp",
157      MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.h",
158145      MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.cpp",
159      MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.h",
160146      MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.cpp",
161      MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.h",
162147      MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.cpp",
163      MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.h",
164148      MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.cpp",
165      MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.h",
166149      MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.cpp",
167      MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.h",
168150      MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.cpp",
169      MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.h",
170151      MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.cpp",
171      MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.h",
172152      MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.cpp",
173      MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.h",
174153      MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.cpp",
175      MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.h",
176154      MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.cpp",
177      MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.h",
178155      MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.cpp",
179      MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.h",
180      MAME_DIR .. "src/osd/modules/debugger/win/debugwin.h",
181156   }
182157
183158
r250222r250223
208183   }
209184
210185   files {
211      MAME_DIR .. "src/osd/eigccppc.h",
212      MAME_DIR .. "src/osd/eigccx86.h",
213      MAME_DIR .. "src/osd/eivc.h",
214      MAME_DIR .. "src/osd/eivcx86.h",
215      MAME_DIR .. "src/osd/eminline.h",
216      MAME_DIR .. "src/osd/osdcomm.h",
217186      MAME_DIR .. "src/osd/osdcore.cpp",
218      MAME_DIR .. "src/osd/osdcore.h",
219187      MAME_DIR .. "src/osd/strconv.cpp",
220      MAME_DIR .. "src/osd/strconv.h",
221188      MAME_DIR .. "src/osd/windows/main.cpp",
222189      MAME_DIR .. "src/osd/windows/windir.cpp",
223190      MAME_DIR .. "src/osd/windows/winfile.cpp",
224191      MAME_DIR .. "src/osd/modules/sync/sync_windows.cpp",
225      MAME_DIR .. "src/osd/modules/sync/osdsync.h",
226192      MAME_DIR .. "src/osd/windows/winutf8.cpp",
227      MAME_DIR .. "src/osd/windows/winutf8.h",
228193      MAME_DIR .. "src/osd/windows/winutil.cpp",
229      MAME_DIR .. "src/osd/windows/winutil.h",
230      MAME_DIR .. "src/osd/windows/winfile.h",
231194      MAME_DIR .. "src/osd/windows/winclip.cpp",
232195      MAME_DIR .. "src/osd/windows/winsocket.cpp",
233196      MAME_DIR .. "src/osd/windows/winptty.cpp",
234197      MAME_DIR .. "src/osd/modules/osdmodule.cpp",
235      MAME_DIR .. "src/osd/modules/osdmodule.h",
236198      MAME_DIR .. "src/osd/modules/lib/osdlib_win32.cpp",
237199   }
238200
trunk/scripts/src/tools.lua
r250222r250223
766766
767767files {
768768   MAME_DIR .. "src/tools/imgtool/main.cpp",
769   MAME_DIR .. "src/tools/imgtool/main.h",
770769   MAME_DIR .. "src/tools/imgtool/stream.cpp",
771   MAME_DIR .. "src/tools/imgtool/stream.h",
772770   MAME_DIR .. "src/tools/imgtool/library.cpp",
773   MAME_DIR .. "src/tools/imgtool/library.h",
774771   MAME_DIR .. "src/tools/imgtool/modules.cpp",
775   MAME_DIR .. "src/tools/imgtool/modules.h",
776772   MAME_DIR .. "src/tools/imgtool/iflopimg.cpp",
777   MAME_DIR .. "src/tools/imgtool/iflopimg.h",
778773   MAME_DIR .. "src/tools/imgtool/filter.cpp",
779   MAME_DIR .. "src/tools/imgtool/filter.h",
780774   MAME_DIR .. "src/tools/imgtool/filteoln.cpp",
781775   MAME_DIR .. "src/tools/imgtool/filtbas.cpp",
782776   MAME_DIR .. "src/tools/imgtool/imgtool.cpp",
783   MAME_DIR .. "src/tools/imgtool/imgtool.h",
784777   MAME_DIR .. "src/tools/imgtool/imgterrs.cpp",
785   MAME_DIR .. "src/tools/imgtool/imgterrs.h",   
786778   MAME_DIR .. "src/tools/imgtool/imghd.cpp",
787   MAME_DIR .. "src/tools/imgtool/imghd.h",
788779   MAME_DIR .. "src/tools/imgtool/charconv.cpp",
789   MAME_DIR .. "src/tools/imgtool/charconv.h",
790780   MAME_DIR .. "src/tools/imgtool/formats/vt_dsk.cpp",
791781   MAME_DIR .. "src/tools/imgtool/formats/vt_dsk.h",
792782   MAME_DIR .. "src/tools/imgtool/formats/coco_dsk.cpp",
r250222r250223
800790   MAME_DIR .. "src/tools/imgtool/modules/ti990hd.cpp",
801791   MAME_DIR .. "src/tools/imgtool/modules/concept.cpp",
802792   MAME_DIR .. "src/tools/imgtool/modules/fat.cpp",
803   MAME_DIR .. "src/tools/imgtool/modules/fat.h",
804793   MAME_DIR .. "src/tools/imgtool/modules/pc_flop.cpp",
805794   MAME_DIR .. "src/tools/imgtool/modules/pc_hard.cpp",
806795   MAME_DIR .. "src/tools/imgtool/modules/prodos.cpp",
807796   MAME_DIR .. "src/tools/imgtool/modules/vzdos.cpp",
808797   MAME_DIR .. "src/tools/imgtool/modules/thomson.cpp",
809798   MAME_DIR .. "src/tools/imgtool/modules/macutil.cpp",
810   MAME_DIR .. "src/tools/imgtool/modules/macutil.h",
811799   MAME_DIR .. "src/tools/imgtool/modules/cybiko.cpp",
812800   MAME_DIR .. "src/tools/imgtool/modules/cybikoxt.cpp",
813801   MAME_DIR .. "src/tools/imgtool/modules/psion.cpp",
trunk/scripts/target/mame/arcade.lua
r250222r250223
787787createMAMEProjects(_target, _subtarget, "shared")
788788files {
789789   MAME_DIR .. "src/mame/machine/nmk112.cpp",
790   MAME_DIR .. "src/mame/machine/nmk112.h",
791790   MAME_DIR .. "src/mame/machine/pcshare.cpp",
792   MAME_DIR .. "src/mame/machine/pcshare.h",
793791   MAME_DIR .. "src/mame/machine/segacrpt.cpp",
794   MAME_DIR .. "src/mame/machine/segacrpt.h",
795792   MAME_DIR .. "src/mame/machine/segacrp2.cpp",
796   MAME_DIR .. "src/mame/machine/segacrp2.h",
797793   MAME_DIR .. "src/mame/machine/ticket.cpp",
798   MAME_DIR .. "src/mame/machine/ticket.h",
799794   MAME_DIR .. "src/mame/video/avgdvg.cpp",
800   MAME_DIR .. "src/mame/video/avgdvg.h",
801795   MAME_DIR .. "src/mame/audio/dcs.cpp",
802   MAME_DIR .. "src/mame/audio/dcs.h",
803796   MAME_DIR .. "src/mame/audio/decobsmt.cpp",
804   MAME_DIR .. "src/mame/audio/decobsmt.h",
805797   MAME_DIR .. "src/mame/audio/segam1audio.cpp",
806   MAME_DIR .. "src/mame/audio/segam1audio.h",
807798}
808799
809800--------------------------------------------------
r250222r250223
816807   MAME_DIR .. "src/mame/drivers/ssfindo.cpp",
817808   MAME_DIR .. "src/mame/drivers/aristmk5.cpp",
818809   MAME_DIR .. "src/mame/machine/archimds.cpp",
819   MAME_DIR .. "src/mame/includes/archimds.h",
820810   MAME_DIR .. "src/mame/video/archimds.cpp",
821811}
822812
r250222r250223
837827createMAMEProjects(_target, _subtarget, "alpha")
838828files {
839829   MAME_DIR .. "src/mame/drivers/alpha68k.cpp",
840   MAME_DIR .. "src/mame/includes/alpha68k.h",
841830   MAME_DIR .. "src/mame/video/alpha68k.cpp",
842831   MAME_DIR .. "src/mame/drivers/champbas.cpp",
843   MAME_DIR .. "src/mame/includes/champbas.h",
844832   MAME_DIR .. "src/mame/video/champbas.cpp",
845833   MAME_DIR .. "src/mame/drivers/equites.cpp",
846   MAME_DIR .. "src/mame/includes/equites.h",
847834   MAME_DIR .. "src/mame/video/equites.cpp",
848835   MAME_DIR .. "src/mame/drivers/meijinsn.cpp",
849836   MAME_DIR .. "src/mame/drivers/shougi.cpp",
850837   MAME_DIR .. "src/mame/machine/alpha8201.cpp",
851   MAME_DIR .. "src/mame/machine/alpha8201.h",
852838}
853839
854840createMAMEProjects(_target, _subtarget, "amiga")
r250222r250223
882868createMAMEProjects(_target, _subtarget, "atari")
883869files {
884870   MAME_DIR .. "src/mame/drivers/arcadecl.cpp",
885   MAME_DIR .. "src/mame/includes/arcadecl.h",
886871   MAME_DIR .. "src/mame/video/arcadecl.cpp",
887872   MAME_DIR .. "src/mame/drivers/asteroid.cpp",
888   MAME_DIR .. "src/mame/includes/asteroid.h",
889873   MAME_DIR .. "src/mame/machine/asteroid.cpp",
890874   MAME_DIR .. "src/mame/audio/asteroid.cpp",
891875   MAME_DIR .. "src/mame/audio/llander.cpp",
892876   MAME_DIR .. "src/mame/drivers/atarifb.cpp",
893   MAME_DIR .. "src/mame/includes/atarifb.h",
894877   MAME_DIR .. "src/mame/machine/atarifb.cpp",
895878   MAME_DIR .. "src/mame/audio/atarifb.cpp",
896879   MAME_DIR .. "src/mame/video/atarifb.cpp",
897880   MAME_DIR .. "src/mame/drivers/atarig1.cpp",
898   MAME_DIR .. "src/mame/includes/atarig1.h",
899881   MAME_DIR .. "src/mame/video/atarig1.cpp",
900   MAME_DIR .. "src/mame/includes/slapstic.h",
901882   MAME_DIR .. "src/mame/drivers/atarig42.cpp",
902   MAME_DIR .. "src/mame/includes/atarig42.h",
903883   MAME_DIR .. "src/mame/video/atarig42.cpp",
904884   MAME_DIR .. "src/mame/drivers/atarigt.cpp",
905   MAME_DIR .. "src/mame/includes/atarigt.h",
906885   MAME_DIR .. "src/mame/video/atarigt.cpp",
907886   MAME_DIR .. "src/mame/drivers/atarigx2.cpp",
908   MAME_DIR .. "src/mame/includes/atarigx2.h",
909887   MAME_DIR .. "src/mame/video/atarigx2.cpp",
910888   MAME_DIR .. "src/mame/drivers/atarisy1.cpp",
911   MAME_DIR .. "src/mame/includes/atarisy1.h",
912889   MAME_DIR .. "src/mame/video/atarisy1.cpp",
913890   MAME_DIR .. "src/mame/drivers/atarisy2.cpp",
914   MAME_DIR .. "src/mame/includes/atarisy2.h",
915891   MAME_DIR .. "src/mame/video/atarisy2.cpp",
916892   MAME_DIR .. "src/mame/drivers/atarisy4.cpp",
917893   MAME_DIR .. "src/mame/drivers/atarittl.cpp",
918894   MAME_DIR .. "src/mame/drivers/atetris.cpp",
919   MAME_DIR .. "src/mame/includes/atetris.h",
920895   MAME_DIR .. "src/mame/video/atetris.cpp",
921896   MAME_DIR .. "src/mame/drivers/avalnche.cpp",
922   MAME_DIR .. "src/mame/includes/avalnche.h",
923897   MAME_DIR .. "src/mame/audio/avalnche.cpp",
924898   MAME_DIR .. "src/mame/drivers/badlands.cpp",
925   MAME_DIR .. "src/mame/includes/badlands.h",
926899   MAME_DIR .. "src/mame/video/badlands.cpp",
927900   MAME_DIR .. "src/mame/drivers/bartop52.cpp",
928901   MAME_DIR .. "src/mame/drivers/batman.cpp",
929   MAME_DIR .. "src/mame/includes/batman.h",
930902   MAME_DIR .. "src/mame/video/batman.cpp",
931903   MAME_DIR .. "src/mame/drivers/beathead.cpp",
932   MAME_DIR .. "src/mame/includes/beathead.h",
933904   MAME_DIR .. "src/mame/video/beathead.cpp",
934905   MAME_DIR .. "src/mame/drivers/blstroid.cpp",
935   MAME_DIR .. "src/mame/includes/blstroid.h",
936906   MAME_DIR .. "src/mame/video/blstroid.cpp",
937907   MAME_DIR .. "src/mame/drivers/boxer.cpp",
938908   MAME_DIR .. "src/mame/drivers/bsktball.cpp",
939   MAME_DIR .. "src/mame/includes/bsktball.h",
940909   MAME_DIR .. "src/mame/machine/bsktball.cpp",
941910   MAME_DIR .. "src/mame/audio/bsktball.cpp",
942911   MAME_DIR .. "src/mame/video/bsktball.cpp",
943912   MAME_DIR .. "src/mame/drivers/bwidow.cpp",
944   MAME_DIR .. "src/mame/includes/bwidow.h",
945913   MAME_DIR .. "src/mame/audio/bwidow.cpp",
946914   MAME_DIR .. "src/mame/drivers/bzone.cpp",
947   MAME_DIR .. "src/mame/includes/bzone.h",
948915   MAME_DIR .. "src/mame/audio/bzone.cpp",
949916   MAME_DIR .. "src/mame/drivers/canyon.cpp",
950   MAME_DIR .. "src/mame/includes/canyon.h",
951917   MAME_DIR .. "src/mame/audio/canyon.cpp",
952918   MAME_DIR .. "src/mame/video/canyon.cpp",
953919   MAME_DIR .. "src/mame/drivers/cball.cpp",
954920   MAME_DIR .. "src/mame/drivers/ccastles.cpp",
955   MAME_DIR .. "src/mame/includes/ccastles.h",
956921   MAME_DIR .. "src/mame/video/ccastles.cpp",
957922   MAME_DIR .. "src/mame/drivers/centiped.cpp",
958   MAME_DIR .. "src/mame/includes/centiped.h",
959923   MAME_DIR .. "src/mame/video/centiped.cpp",
960924   MAME_DIR .. "src/mame/drivers/cloak.cpp",
961   MAME_DIR .. "src/mame/includes/cloak.h",
962925   MAME_DIR .. "src/mame/video/cloak.cpp",
963926   MAME_DIR .. "src/mame/drivers/cloud9.cpp",
964   MAME_DIR .. "src/mame/includes/cloud9.h",
965927   MAME_DIR .. "src/mame/video/cloud9.cpp",
966928   MAME_DIR .. "src/mame/drivers/cmmb.cpp",
967929   MAME_DIR .. "src/mame/drivers/cops.cpp",
968930   MAME_DIR .. "src/mame/drivers/copsnrob.cpp",
969   MAME_DIR .. "src/mame/includes/copsnrob.h",
970931   MAME_DIR .. "src/mame/audio/copsnrob.cpp",
971932   MAME_DIR .. "src/mame/video/copsnrob.cpp",
972933   MAME_DIR .. "src/mame/drivers/cyberbal.cpp",
973   MAME_DIR .. "src/mame/includes/cyberbal.h",
974934   MAME_DIR .. "src/mame/audio/cyberbal.cpp",
975935   MAME_DIR .. "src/mame/video/cyberbal.cpp",
976936   MAME_DIR .. "src/mame/drivers/destroyr.cpp",
977937   MAME_DIR .. "src/mame/drivers/dragrace.cpp",
978   MAME_DIR .. "src/mame/includes/dragrace.h",
979938   MAME_DIR .. "src/mame/audio/dragrace.cpp",
980939   MAME_DIR .. "src/mame/video/dragrace.cpp",
981940   MAME_DIR .. "src/mame/drivers/eprom.cpp",
982   MAME_DIR .. "src/mame/includes/eprom.h",
983941   MAME_DIR .. "src/mame/video/eprom.cpp",
984942   MAME_DIR .. "src/mame/drivers/firefox.cpp",
985943   MAME_DIR .. "src/mame/drivers/firetrk.cpp",
986   MAME_DIR .. "src/mame/includes/firetrk.h",
987944   MAME_DIR .. "src/mame/audio/firetrk.cpp",
988945   MAME_DIR .. "src/mame/video/firetrk.cpp",
989946   MAME_DIR .. "src/mame/drivers/flyball.cpp",
990947   MAME_DIR .. "src/mame/drivers/foodf.cpp",
991   MAME_DIR .. "src/mame/includes/foodf.h",
992948   MAME_DIR .. "src/mame/video/foodf.cpp",
993949   MAME_DIR .. "src/mame/drivers/gauntlet.cpp",
994   MAME_DIR .. "src/mame/includes/gauntlet.h",
995950   MAME_DIR .. "src/mame/video/gauntlet.cpp",
996951   MAME_DIR .. "src/mame/drivers/harddriv.cpp",
997   MAME_DIR .. "src/mame/includes/harddriv.h",
998952   MAME_DIR .. "src/mame/machine/harddriv.cpp",
999953   MAME_DIR .. "src/mame/audio/harddriv.cpp",
1000954   MAME_DIR .. "src/mame/video/harddriv.cpp",
1001955   MAME_DIR .. "src/mame/drivers/irobot.cpp",
1002   MAME_DIR .. "src/mame/includes/irobot.h",
1003956   MAME_DIR .. "src/mame/machine/irobot.cpp",
1004957   MAME_DIR .. "src/mame/video/irobot.cpp",
1005958   MAME_DIR .. "src/mame/drivers/jaguar.cpp",
1006   MAME_DIR .. "src/mame/includes/jaguar.h",
1007959   MAME_DIR .. "src/mame/audio/jaguar.cpp",
1008960   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",
1012961   MAME_DIR .. "src/mame/drivers/jedi.cpp",
1013   MAME_DIR .. "src/mame/includes/jedi.h",
1014962   MAME_DIR .. "src/mame/audio/jedi.cpp",
1015963   MAME_DIR .. "src/mame/video/jedi.cpp",
1016964   MAME_DIR .. "src/mame/drivers/klax.cpp",
1017   MAME_DIR .. "src/mame/includes/klax.h",
1018965   MAME_DIR .. "src/mame/video/klax.cpp",
1019966   MAME_DIR .. "src/mame/drivers/liberatr.cpp",
1020   MAME_DIR .. "src/mame/includes/liberatr.h",
1021967   MAME_DIR .. "src/mame/video/liberatr.cpp",
1022968   MAME_DIR .. "src/mame/drivers/mediagx.cpp",
1023969   MAME_DIR .. "src/mame/drivers/metalmx.cpp",
1024   MAME_DIR .. "src/mame/includes/metalmx.h",
1025970   MAME_DIR .. "src/mame/drivers/mgolf.cpp",
1026971   MAME_DIR .. "src/mame/drivers/mhavoc.cpp",
1027   MAME_DIR .. "src/mame/includes/mhavoc.h",
1028972   MAME_DIR .. "src/mame/machine/mhavoc.cpp",
1029973   MAME_DIR .. "src/mame/drivers/missile.cpp",
1030974   MAME_DIR .. "src/mame/drivers/nitedrvr.cpp",
1031   MAME_DIR .. "src/mame/includes/nitedrvr.h",
1032975   MAME_DIR .. "src/mame/machine/nitedrvr.cpp",
1033976   MAME_DIR .. "src/mame/audio/nitedrvr.cpp",
1034977   MAME_DIR .. "src/mame/video/nitedrvr.cpp",
1035978   MAME_DIR .. "src/mame/drivers/offtwall.cpp",
1036   MAME_DIR .. "src/mame/includes/offtwall.h",
1037979   MAME_DIR .. "src/mame/video/offtwall.cpp",
1038980   MAME_DIR .. "src/mame/drivers/orbit.cpp",
1039   MAME_DIR .. "src/mame/includes/orbit.h",
1040981   MAME_DIR .. "src/mame/audio/orbit.cpp",
1041982   MAME_DIR .. "src/mame/video/orbit.cpp",
1042983   MAME_DIR .. "src/mame/drivers/pong.cpp",
r250222r250223
1044985   MAME_DIR .. "src/mame/drivers/nl_pongd.cpp",
1045986   MAME_DIR .. "src/mame/drivers/nl_breakout.cpp",
1046987   MAME_DIR .. "src/mame/drivers/poolshrk.cpp",
1047   MAME_DIR .. "src/mame/includes/poolshrk.h",
1048988   MAME_DIR .. "src/mame/audio/poolshrk.cpp",
1049989   MAME_DIR .. "src/mame/video/poolshrk.cpp",
1050990   MAME_DIR .. "src/mame/drivers/quantum.cpp",
1051991   MAME_DIR .. "src/mame/drivers/quizshow.cpp",
1052992   MAME_DIR .. "src/mame/drivers/rampart.cpp",
1053   MAME_DIR .. "src/mame/includes/rampart.h",
1054993   MAME_DIR .. "src/mame/video/rampart.cpp",
1055994   MAME_DIR .. "src/mame/drivers/relief.cpp",
1056   MAME_DIR .. "src/mame/includes/relief.h",
1057995   MAME_DIR .. "src/mame/video/relief.cpp",
1058996   MAME_DIR .. "src/mame/drivers/runaway.cpp",
1059   MAME_DIR .. "src/mame/includes/runaway.h",
1060997   MAME_DIR .. "src/mame/video/runaway.cpp",
1061998   MAME_DIR .. "src/mame/drivers/sbrkout.cpp",
1062999   MAME_DIR .. "src/mame/drivers/shuuz.cpp",
1063   MAME_DIR .. "src/mame/includes/shuuz.h",
10641000   MAME_DIR .. "src/mame/video/shuuz.cpp",
10651001   MAME_DIR .. "src/mame/drivers/skullxbo.cpp",
1066   MAME_DIR .. "src/mame/includes/skullxbo.h",
10671002   MAME_DIR .. "src/mame/video/skullxbo.cpp",
10681003   MAME_DIR .. "src/mame/drivers/skydiver.cpp",
1069   MAME_DIR .. "src/mame/includes/skydiver.h",
10701004   MAME_DIR .. "src/mame/audio/skydiver.cpp",
10711005   MAME_DIR .. "src/mame/video/skydiver.cpp",
10721006   MAME_DIR .. "src/mame/drivers/skyraid.cpp",
1073   MAME_DIR .. "src/mame/includes/skyraid.h",
10741007   MAME_DIR .. "src/mame/audio/skyraid.cpp",
10751008   MAME_DIR .. "src/mame/video/skyraid.cpp",
10761009   MAME_DIR .. "src/mame/drivers/sprint2.cpp",
1077   MAME_DIR .. "src/mame/includes/sprint2.h",
10781010   MAME_DIR .. "src/mame/audio/sprint2.cpp",
10791011   MAME_DIR .. "src/mame/video/sprint2.cpp",
10801012   MAME_DIR .. "src/mame/drivers/sprint4.cpp",
1081   MAME_DIR .. "src/mame/includes/sprint4.h",
10821013   MAME_DIR .. "src/mame/video/sprint4.cpp",
10831014   MAME_DIR .. "src/mame/audio/sprint4.cpp",
1084   MAME_DIR .. "src/mame/audio/sprint4.h",
10851015   MAME_DIR .. "src/mame/drivers/sprint8.cpp",
1086   MAME_DIR .. "src/mame/includes/sprint8.h",
10871016   MAME_DIR .. "src/mame/audio/sprint8.cpp",
10881017   MAME_DIR .. "src/mame/video/sprint8.cpp",
10891018   MAME_DIR .. "src/mame/drivers/starshp1.cpp",
1090   MAME_DIR .. "src/mame/includes/starshp1.h",
10911019   MAME_DIR .. "src/mame/audio/starshp1.cpp",
10921020   MAME_DIR .. "src/mame/video/starshp1.cpp",
10931021   MAME_DIR .. "src/mame/drivers/starwars.cpp",
1094   MAME_DIR .. "src/mame/includes/starwars.h",
10951022   MAME_DIR .. "src/mame/machine/starwars.cpp",
10961023   MAME_DIR .. "src/mame/audio/starwars.cpp",
10971024   MAME_DIR .. "src/mame/drivers/subs.cpp",
1098   MAME_DIR .. "src/mame/includes/subs.h",
10991025   MAME_DIR .. "src/mame/machine/subs.cpp",
11001026   MAME_DIR .. "src/mame/audio/subs.cpp",
11011027   MAME_DIR .. "src/mame/video/subs.cpp",
11021028   MAME_DIR .. "src/mame/drivers/tank8.cpp",
1103   MAME_DIR .. "src/mame/includes/tank8.h",
11041029   MAME_DIR .. "src/mame/audio/tank8.cpp",
11051030   MAME_DIR .. "src/mame/video/tank8.cpp",
11061031   MAME_DIR .. "src/mame/drivers/tempest.cpp",
11071032   MAME_DIR .. "src/mame/drivers/thunderj.cpp",
1108   MAME_DIR .. "src/mame/includes/thunderj.h",
11091033   MAME_DIR .. "src/mame/video/thunderj.cpp",
11101034   MAME_DIR .. "src/mame/drivers/tomcat.cpp",
11111035   MAME_DIR .. "src/mame/drivers/toobin.cpp",
1112   MAME_DIR .. "src/mame/includes/toobin.h",
11131036   MAME_DIR .. "src/mame/video/toobin.cpp",
11141037   MAME_DIR .. "src/mame/drivers/tourtabl.cpp",
11151038   MAME_DIR .. "src/mame/video/tia.cpp",
1116   MAME_DIR .. "src/mame/video/tia.h",
11171039   MAME_DIR .. "src/mame/drivers/triplhnt.cpp",
1118   MAME_DIR .. "src/mame/includes/triplhnt.h",
11191040   MAME_DIR .. "src/mame/audio/triplhnt.cpp",
11201041   MAME_DIR .. "src/mame/video/triplhnt.cpp",
11211042   MAME_DIR .. "src/mame/drivers/tunhunt.cpp",
1122   MAME_DIR .. "src/mame/includes/tunhunt.h",
11231043   MAME_DIR .. "src/mame/video/tunhunt.cpp",
11241044   MAME_DIR .. "src/mame/drivers/ultratnk.cpp",
1125   MAME_DIR .. "src/mame/includes/ultratnk.h",
11261045   MAME_DIR .. "src/mame/video/ultratnk.cpp",
11271046   MAME_DIR .. "src/mame/drivers/videopin.cpp",
1128   MAME_DIR .. "src/mame/includes/videopin.h",
11291047   MAME_DIR .. "src/mame/audio/videopin.cpp",
11301048   MAME_DIR .. "src/mame/video/videopin.cpp",
11311049   MAME_DIR .. "src/mame/drivers/vindictr.cpp",
1132   MAME_DIR .. "src/mame/includes/vindictr.h",
11331050   MAME_DIR .. "src/mame/video/vindictr.cpp",
11341051   MAME_DIR .. "src/mame/drivers/wolfpack.cpp",
1135   MAME_DIR .. "src/mame/includes/wolfpack.h",
11361052   MAME_DIR .. "src/mame/video/wolfpack.cpp",
11371053   MAME_DIR .. "src/mame/drivers/xybots.cpp",
1138   MAME_DIR .. "src/mame/includes/xybots.h",
11391054   MAME_DIR .. "src/mame/video/xybots.cpp",
11401055   MAME_DIR .. "src/mame/machine/asic65.cpp",
1141   MAME_DIR .. "src/mame/machine/asic65.h",
11421056   MAME_DIR .. "src/mame/machine/atari_vg.cpp",
1143   MAME_DIR .. "src/mame/machine/atari_vg.h",
11441057   MAME_DIR .. "src/mame/machine/atarigen.cpp",
1145   MAME_DIR .. "src/mame/machine/atarigen.h",
11461058   MAME_DIR .. "src/mame/machine/mathbox.cpp",
1147   MAME_DIR .. "src/mame/machine/mathbox.h",
11481059   MAME_DIR .. "src/mame/machine/slapstic.cpp",
11491060   MAME_DIR .. "src/mame/audio/atarijsa.cpp",
1150   MAME_DIR .. "src/mame/audio/atarijsa.h",
11511061   MAME_DIR .. "src/mame/audio/cage.cpp",
1152   MAME_DIR .. "src/mame/audio/cage.h",
11531062   MAME_DIR .. "src/mame/audio/redbaron.cpp",
1154   MAME_DIR .. "src/mame/audio/redbaron.h",
11551063   MAME_DIR .. "src/mame/video/atarimo.cpp",
1156   MAME_DIR .. "src/mame/video/atarimo.h",
11571064   MAME_DIR .. "src/mame/video/atarirle.cpp",
1158   MAME_DIR .. "src/mame/video/atarirle.h",
11591065}
11601066
11611067createMAMEProjects(_target, _subtarget, "atlus")
11621068files {
11631069   MAME_DIR .. "src/mame/drivers/blmbycar.cpp",
1164   MAME_DIR .. "src/mame/includes/blmbycar.h",
11651070   MAME_DIR .. "src/mame/video/blmbycar.cpp",
11661071   MAME_DIR .. "src/mame/drivers/ohmygod.cpp",
1167   MAME_DIR .. "src/mame/includes/ohmygod.h",
11681072   MAME_DIR .. "src/mame/video/ohmygod.cpp",
11691073   MAME_DIR .. "src/mame/drivers/powerins.cpp",
1170   MAME_DIR .. "src/mame/includes/powerins.h",
11711074   MAME_DIR .. "src/mame/video/powerins.cpp",
11721075   MAME_DIR .. "src/mame/drivers/bowltry.cpp",
11731076}
r250222r250223
11791082   MAME_DIR .. "src/mame/drivers/mpu4hw.cpp",
11801083   MAME_DIR .. "src/mame/drivers/mpu4sw.cpp",
11811084   MAME_DIR .. "src/mame/drivers/mpu4.cpp",
1182   MAME_DIR .. "src/mame/includes/mpu4.h",
11831085   MAME_DIR .. "src/mame/drivers/mpu4mod2sw.cpp",
11841086   MAME_DIR .. "src/mame/drivers/mpu4mod4yam.cpp",
11851087   MAME_DIR .. "src/mame/drivers/mpu4plasma.cpp",
r250222r250223
11961098   MAME_DIR .. "src/mame/drivers/mpu5hw.cpp",
11971099   MAME_DIR .. "src/mame/drivers/mpu5.cpp",
11981100   MAME_DIR .. "src/mame/video/awpvid.cpp",
1199   MAME_DIR .. "src/mame/video/awpvid.h",
12001101   MAME_DIR .. "src/mame/machine/meters.cpp",
1201   MAME_DIR .. "src/mame/machine/meters.h",
12021102}
12031103
12041104createMAMEProjects(_target, _subtarget, "bfm")
12051105files {
12061106   MAME_DIR .. "src/mame/drivers/bfcobra.cpp",
12071107   MAME_DIR .. "src/mame/machine/bfm_comn.cpp",
1208   MAME_DIR .. "src/mame/machine/bfm_comn.h",
12091108   MAME_DIR .. "src/mame/drivers/bfm_sc1.cpp",
12101109   MAME_DIR .. "src/mame/drivers/bfm_sc2.cpp",
12111110   MAME_DIR .. "src/mame/video/bfm_adr2.cpp",
1212   MAME_DIR .. "src/mame/video/bfm_adr2.h",
12131111   MAME_DIR .. "src/mame/drivers/bfm_sc4.cpp",
12141112   MAME_DIR .. "src/mame/drivers/bfm_sc4h.cpp",
12151113   MAME_DIR .. "src/mame/drivers/bfm_sc5.cpp",
1216   MAME_DIR .. "src/mame/includes/bfm_sc5.h",
12171114   MAME_DIR .. "src/mame/drivers/bfm_sc5sw.cpp",
12181115   MAME_DIR .. "src/mame/drivers/bfm_ad5.cpp",
1219   MAME_DIR .. "src/mame/includes/bfm_ad5.h",
12201116   MAME_DIR .. "src/mame/drivers/bfm_ad5sw.cpp",
12211117   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",
12241118   MAME_DIR .. "src/mame/drivers/bfm_swp.cpp",
12251119   MAME_DIR .. "src/mame/drivers/bfmsys83.cpp",
12261120   MAME_DIR .. "src/mame/drivers/bfmsys85.cpp",
12271121   MAME_DIR .. "src/mame/machine/sec.cpp",
1228   MAME_DIR .. "src/mame/machine/sec.h",
12291122   MAME_DIR .. "src/mame/machine/bfm_bd1.cpp",
1230   MAME_DIR .. "src/mame/machine/bfm_bd1.h",
12311123   MAME_DIR .. "src/mame/machine/bfm_bda.cpp",
1232   MAME_DIR .. "src/mame/machine/bfm_bda.h",
12331124   MAME_DIR .. "src/mame/video/bfm_dm01.cpp",
1234   MAME_DIR .. "src/mame/video/bfm_dm01.h",
12351125   MAME_DIR .. "src/mame/drivers/rastersp.cpp",
12361126}
12371127
r250222r250223
12461136createMAMEProjects(_target, _subtarget, "capcom")
12471137files {
12481138   MAME_DIR .. "src/mame/drivers/1942.cpp",
1249   MAME_DIR .. "src/mame/includes/1942.h",
12501139   MAME_DIR .. "src/mame/video/1942.cpp",
12511140   MAME_DIR .. "src/mame/drivers/1943.cpp",
1252   MAME_DIR .. "src/mame/includes/1943.h",
12531141   MAME_DIR .. "src/mame/video/1943.cpp",
12541142   MAME_DIR .. "src/mame/drivers/alien.cpp",
12551143   MAME_DIR .. "src/mame/drivers/bionicc.cpp",
1256   MAME_DIR .. "src/mame/includes/bionicc.h",
12571144   MAME_DIR .. "src/mame/video/bionicc.cpp",
12581145   MAME_DIR .. "src/mame/drivers/supduck.cpp",
12591146   MAME_DIR .. "src/mame/video/tigeroad_spr.cpp",
1260   MAME_DIR .. "src/mame/video/tigeroad_spr.h",
12611147   MAME_DIR .. "src/mame/drivers/blktiger.cpp",
1262   MAME_DIR .. "src/mame/includes/blktiger.h",
12631148   MAME_DIR .. "src/mame/video/blktiger.cpp",
12641149   MAME_DIR .. "src/mame/drivers/cbasebal.cpp",
1265   MAME_DIR .. "src/mame/includes/cbasebal.h",
12661150   MAME_DIR .. "src/mame/video/cbasebal.cpp",
12671151   MAME_DIR .. "src/mame/drivers/commando.cpp",
1268   MAME_DIR .. "src/mame/includes/commando.h",
12691152   MAME_DIR .. "src/mame/video/commando.cpp",
12701153   MAME_DIR .. "src/mame/drivers/cps1.cpp",
1271   MAME_DIR .. "src/mame/includes/cps1.h",
12721154   MAME_DIR .. "src/mame/video/cps1.cpp",
12731155   MAME_DIR .. "src/mame/drivers/kenseim.cpp",
12741156   MAME_DIR .. "src/mame/drivers/cps2.cpp",
12751157   MAME_DIR .. "src/mame/machine/cps2crpt.cpp",
1276   MAME_DIR .. "src/mame/machine/cps2crypt.h",
12771158   MAME_DIR .. "src/mame/drivers/cps3.cpp",
1278   MAME_DIR .. "src/mame/includes/cps3.h",
12791159   MAME_DIR .. "src/mame/audio/cps3.cpp",
1280   MAME_DIR .. "src/mame/audio/cps3.h",
12811160   MAME_DIR .. "src/mame/drivers/egghunt.cpp",
12821161   MAME_DIR .. "src/mame/drivers/exedexes.cpp",
1283   MAME_DIR .. "src/mame/includes/exedexes.h",
12841162   MAME_DIR .. "src/mame/video/exedexes.cpp",
12851163   MAME_DIR .. "src/mame/drivers/fcrash.cpp",
12861164   MAME_DIR .. "src/mame/drivers/gng.cpp",
1287   MAME_DIR .. "src/mame/includes/gng.h",
12881165   MAME_DIR .. "src/mame/video/gng.cpp",
12891166   MAME_DIR .. "src/mame/drivers/gunsmoke.cpp",
1290   MAME_DIR .. "src/mame/includes/gunsmoke.h",
12911167   MAME_DIR .. "src/mame/video/gunsmoke.cpp",
12921168   MAME_DIR .. "src/mame/drivers/higemaru.cpp",
1293   MAME_DIR .. "src/mame/includes/higemaru.h",
12941169   MAME_DIR .. "src/mame/video/higemaru.cpp",
12951170   MAME_DIR .. "src/mame/drivers/lastduel.cpp",
1296   MAME_DIR .. "src/mame/includes/lastduel.h",
12971171   MAME_DIR .. "src/mame/video/lastduel.cpp",
12981172   MAME_DIR .. "src/mame/drivers/lwings.cpp",
1299   MAME_DIR .. "src/mame/includes/lwings.h",
13001173   MAME_DIR .. "src/mame/video/lwings.cpp",
13011174   MAME_DIR .. "src/mame/drivers/mitchell.cpp",
1302   MAME_DIR .. "src/mame/includes/mitchell.h",
13031175   MAME_DIR .. "src/mame/video/mitchell.cpp",
13041176   MAME_DIR .. "src/mame/drivers/sf.cpp",
1305   MAME_DIR .. "src/mame/includes/sf.h",
13061177   MAME_DIR .. "src/mame/video/sf.cpp",
13071178   MAME_DIR .. "src/mame/drivers/sidearms.cpp",
1308   MAME_DIR .. "src/mame/includes/sidearms.h",
13091179   MAME_DIR .. "src/mame/video/sidearms.cpp",
13101180   MAME_DIR .. "src/mame/drivers/sonson.cpp",
1311   MAME_DIR .. "src/mame/includes/sonson.h",
13121181   MAME_DIR .. "src/mame/video/sonson.cpp",
13131182   MAME_DIR .. "src/mame/drivers/srumbler.cpp",
1314   MAME_DIR .. "src/mame/includes/srumbler.h",
13151183   MAME_DIR .. "src/mame/video/srumbler.cpp",
13161184   MAME_DIR .. "src/mame/drivers/tigeroad.cpp",
1317   MAME_DIR .. "src/mame/includes/tigeroad.h",
13181185   MAME_DIR .. "src/mame/video/tigeroad.cpp",
13191186   MAME_DIR .. "src/mame/machine/tigeroad.cpp",
13201187   MAME_DIR .. "src/mame/drivers/vulgus.cpp",
1321   MAME_DIR .. "src/mame/includes/vulgus.h",
13221188   MAME_DIR .. "src/mame/video/vulgus.cpp",
13231189   MAME_DIR .. "src/mame/machine/kabuki.cpp",
1324   MAME_DIR .. "src/mame/machine/kabuki.h",
13251190}
13261191
13271192createMAMEProjects(_target, _subtarget, "cinemat")
13281193files {
13291194   MAME_DIR .. "src/mame/drivers/ataxx.cpp",
13301195   MAME_DIR .. "src/mame/drivers/cinemat.cpp",
1331   MAME_DIR .. "src/mame/includes/cinemat.h",
13321196   MAME_DIR .. "src/mame/audio/cinemat.cpp",
13331197   MAME_DIR .. "src/mame/video/cinemat.cpp",
13341198   MAME_DIR .. "src/mame/drivers/cchasm.cpp",
1335   MAME_DIR .. "src/mame/includes/cchasm.h",
13361199   MAME_DIR .. "src/mame/machine/cchasm.cpp",
13371200   MAME_DIR .. "src/mame/audio/cchasm.cpp",
13381201   MAME_DIR .. "src/mame/video/cchasm.cpp",
r250222r250223
13401203   MAME_DIR .. "src/mame/drivers/dlair2.cpp",
13411204   MAME_DIR .. "src/mame/drivers/embargo.cpp",
13421205   MAME_DIR .. "src/mame/drivers/jack.cpp",
1343   MAME_DIR .. "src/mame/includes/jack.h",
13441206   MAME_DIR .. "src/mame/video/jack.cpp",
13451207   MAME_DIR .. "src/mame/drivers/leland.cpp",
1346   MAME_DIR .. "src/mame/includes/leland.h",
13471208   MAME_DIR .. "src/mame/machine/leland.cpp",
13481209   MAME_DIR .. "src/mame/audio/leland.cpp",
13491210   MAME_DIR .. "src/mame/video/leland.cpp",
r250222r250223
13521213createMAMEProjects(_target, _subtarget, "comad")
13531214files {
13541215   MAME_DIR .. "src/mame/drivers/funybubl.cpp",
1355   MAME_DIR .. "src/mame/includes/funybubl.h",
13561216   MAME_DIR .. "src/mame/video/funybubl.cpp",
13571217   MAME_DIR .. "src/mame/drivers/galspnbl.cpp",
1358   MAME_DIR .. "src/mame/includes/galspnbl.h",
13591218   MAME_DIR .. "src/mame/video/galspnbl.cpp",
13601219   MAME_DIR .. "src/mame/drivers/zerozone.cpp",
1361   MAME_DIR .. "src/mame/includes/zerozone.h",
13621220   MAME_DIR .. "src/mame/video/zerozone.cpp",
13631221}
13641222
13651223createMAMEProjects(_target, _subtarget, "cvs")
13661224files {
13671225   MAME_DIR .. "src/mame/drivers/cvs.cpp",
1368   MAME_DIR .. "src/mame/includes/cvs.h",
13691226   MAME_DIR .. "src/mame/video/cvs.cpp",
13701227   MAME_DIR .. "src/mame/drivers/galaxia.cpp",
1371   MAME_DIR .. "src/mame/includes/galaxia.h",
13721228   MAME_DIR .. "src/mame/video/galaxia.cpp",
13731229   MAME_DIR .. "src/mame/drivers/quasar.cpp",
1374   MAME_DIR .. "src/mame/includes/quasar.h",
13751230   MAME_DIR .. "src/mame/video/quasar.cpp",
13761231}
13771232
13781233createMAMEProjects(_target, _subtarget, "dataeast")
13791234files {
13801235   MAME_DIR .. "src/mame/drivers/actfancr.cpp",
1381   MAME_DIR .. "src/mame/includes/actfancr.h",
13821236   MAME_DIR .. "src/mame/video/actfancr.cpp",
13831237   MAME_DIR .. "src/mame/drivers/astrof.cpp",
1384   MAME_DIR .. "src/mame/includes/astrof.h",
13851238   MAME_DIR .. "src/mame/audio/astrof.cpp",
13861239   MAME_DIR .. "src/mame/drivers/backfire.cpp",
13871240   MAME_DIR .. "src/mame/drivers/battlera.cpp",
1388   MAME_DIR .. "src/mame/includes/battlera.h",
13891241   MAME_DIR .. "src/mame/drivers/boogwing.cpp",
1390   MAME_DIR .. "src/mame/includes/boogwing.h",
13911242   MAME_DIR .. "src/mame/video/boogwing.cpp",
13921243   MAME_DIR .. "src/mame/drivers/brkthru.cpp",
1393   MAME_DIR .. "src/mame/includes/brkthru.h",
13941244   MAME_DIR .. "src/mame/video/brkthru.cpp",
13951245   MAME_DIR .. "src/mame/drivers/btime.cpp",
1396   MAME_DIR .. "src/mame/includes/btime.h",
13971246   MAME_DIR .. "src/mame/machine/btime.cpp",
13981247   MAME_DIR .. "src/mame/video/btime.cpp",
13991248   MAME_DIR .. "src/mame/drivers/bwing.cpp",
1400   MAME_DIR .. "src/mame/includes/bwing.h",
14011249   MAME_DIR .. "src/mame/video/bwing.cpp",
14021250   MAME_DIR .. "src/mame/drivers/cbuster.cpp",
1403   MAME_DIR .. "src/mame/includes/cbuster.h",
14041251   MAME_DIR .. "src/mame/video/cbuster.cpp",
14051252   MAME_DIR .. "src/mame/drivers/chanbara.cpp",
14061253   MAME_DIR .. "src/mame/drivers/cninja.cpp",
1407   MAME_DIR .. "src/mame/includes/cninja.h",
14081254   MAME_DIR .. "src/mame/video/cninja.cpp",
14091255   MAME_DIR .. "src/mame/drivers/cntsteer.cpp",
14101256   MAME_DIR .. "src/mame/drivers/compgolf.cpp",
1411   MAME_DIR .. "src/mame/includes/compgolf.h",
14121257   MAME_DIR .. "src/mame/video/compgolf.cpp",
14131258   MAME_DIR .. "src/mame/drivers/darkseal.cpp",
1414   MAME_DIR .. "src/mame/includes/darkseal.h",
14151259   MAME_DIR .. "src/mame/video/darkseal.cpp",
14161260   MAME_DIR .. "src/mame/drivers/dassault.cpp",
1417   MAME_DIR .. "src/mame/includes/dassault.h",
14181261   MAME_DIR .. "src/mame/video/dassault.cpp",
14191262   MAME_DIR .. "src/mame/drivers/dblewing.cpp",
14201263   MAME_DIR .. "src/mame/drivers/dec0.cpp",
1421   MAME_DIR .. "src/mame/includes/dec0.h",
14221264   MAME_DIR .. "src/mame/machine/dec0.cpp",
14231265   MAME_DIR .. "src/mame/video/dec0.cpp",
14241266   MAME_DIR .. "src/mame/drivers/dec8.cpp",
1425   MAME_DIR .. "src/mame/includes/dec8.h",
14261267   MAME_DIR .. "src/mame/video/dec8.cpp",
14271268   MAME_DIR .. "src/mame/machine/deco222.cpp",
1428   MAME_DIR .. "src/mame/machine/deco222.h",
14291269   MAME_DIR .. "src/mame/machine/decocpu7.cpp",
1430   MAME_DIR .. "src/mame/machine/decocpu7.h",
14311270   MAME_DIR .. "src/mame/machine/decocpu6.cpp",
1432   MAME_DIR .. "src/mame/machine/decocpu6.h",
14331271   MAME_DIR .. "src/mame/drivers/deco_ld.cpp",
14341272   MAME_DIR .. "src/mame/drivers/deco_mlc.cpp",
1435   MAME_DIR .. "src/mame/includes/deco_mlc.h",
14361273   MAME_DIR .. "src/mame/video/deco_mlc.cpp",
14371274   MAME_DIR .. "src/mame/drivers/deco156.cpp",
14381275   MAME_DIR .. "src/mame/machine/deco156.cpp",
14391276   MAME_DIR .. "src/mame/drivers/deco32.cpp",
1440   MAME_DIR .. "src/mame/includes/deco32.h",
14411277   MAME_DIR .. "src/mame/video/deco32.cpp",
14421278   MAME_DIR .. "src/mame/video/dvi.cpp",
14431279   MAME_DIR .. "src/mame/video/deco_zoomspr.cpp",
1444   MAME_DIR .. "src/mame/video/deco_zoomspr.h",
14451280   MAME_DIR .. "src/mame/drivers/decocass.cpp",
1446   MAME_DIR .. "src/mame/includes/decocass.h",
14471281   MAME_DIR .. "src/mame/machine/decocass.cpp",
14481282   MAME_DIR .. "src/mame/machine/decocass_tape.cpp",
1449   MAME_DIR .. "src/mame/machine/decocass_tape.h",
14501283   MAME_DIR .. "src/mame/video/decocass.cpp",
14511284   MAME_DIR .. "src/mame/drivers/deshoros.cpp",
14521285   MAME_DIR .. "src/mame/drivers/dietgo.cpp",
1453   MAME_DIR .. "src/mame/includes/dietgo.h",
14541286   MAME_DIR .. "src/mame/video/dietgo.cpp",
14551287   MAME_DIR .. "src/mame/drivers/dreambal.cpp",
14561288   MAME_DIR .. "src/mame/drivers/exprraid.cpp",
1457   MAME_DIR .. "src/mame/includes/exprraid.h",
14581289   MAME_DIR .. "src/mame/video/exprraid.cpp",
14591290   MAME_DIR .. "src/mame/drivers/firetrap.cpp",
1460   MAME_DIR .. "src/mame/includes/firetrap.h",
14611291   MAME_DIR .. "src/mame/video/firetrap.cpp",
14621292   MAME_DIR .. "src/mame/drivers/funkyjet.cpp",
1463   MAME_DIR .. "src/mame/includes/funkyjet.h",
14641293   MAME_DIR .. "src/mame/video/funkyjet.cpp",
14651294   MAME_DIR .. "src/mame/drivers/karnov.cpp",
1466   MAME_DIR .. "src/mame/includes/karnov.h",
14671295   MAME_DIR .. "src/mame/video/karnov.cpp",
14681296   MAME_DIR .. "src/mame/drivers/kchamp.cpp",
1469   MAME_DIR .. "src/mame/includes/kchamp.h",
14701297   MAME_DIR .. "src/mame/video/kchamp.cpp",
14711298   MAME_DIR .. "src/mame/drivers/kingobox.cpp",
1472   MAME_DIR .. "src/mame/includes/kingobox.h",
14731299   MAME_DIR .. "src/mame/video/kingobox.cpp",
14741300   MAME_DIR .. "src/mame/drivers/lemmings.cpp",
1475   MAME_DIR .. "src/mame/includes/lemmings.h",
14761301   MAME_DIR .. "src/mame/video/lemmings.cpp",
14771302   MAME_DIR .. "src/mame/drivers/liberate.cpp",
1478   MAME_DIR .. "src/mame/includes/liberate.h",
14791303   MAME_DIR .. "src/mame/video/liberate.cpp",
14801304   MAME_DIR .. "src/mame/drivers/madalien.cpp",
1481   MAME_DIR .. "src/mame/includes/madalien.h",
14821305   MAME_DIR .. "src/mame/audio/madalien.cpp",
14831306   MAME_DIR .. "src/mame/video/madalien.cpp",
14841307   MAME_DIR .. "src/mame/drivers/madmotor.cpp",
1485   MAME_DIR .. "src/mame/includes/madmotor.h",
14861308   MAME_DIR .. "src/mame/video/madmotor.cpp",
14871309   MAME_DIR .. "src/mame/drivers/metlclsh.cpp",
1488   MAME_DIR .. "src/mame/includes/metlclsh.h",
14891310   MAME_DIR .. "src/mame/video/metlclsh.cpp",
14901311   MAME_DIR .. "src/mame/drivers/mirage.cpp",
14911312   MAME_DIR .. "src/mame/drivers/pcktgal.cpp",
1492   MAME_DIR .. "src/mame/includes/pcktgal.h",
14931313   MAME_DIR .. "src/mame/video/pcktgal.cpp",
14941314   MAME_DIR .. "src/mame/drivers/pktgaldx.cpp",
1495   MAME_DIR .. "src/mame/includes/pktgaldx.h",
14961315   MAME_DIR .. "src/mame/video/pktgaldx.cpp",
14971316   MAME_DIR .. "src/mame/drivers/progolf.cpp",
14981317   MAME_DIR .. "src/mame/drivers/rohga.cpp",
1499   MAME_DIR .. "src/mame/includes/rohga.h",
15001318   MAME_DIR .. "src/mame/video/rohga.cpp",
15011319   MAME_DIR .. "src/mame/drivers/shootout.cpp",
1502   MAME_DIR .. "src/mame/includes/shootout.h",
15031320   MAME_DIR .. "src/mame/video/shootout.cpp",
15041321   MAME_DIR .. "src/mame/drivers/sidepckt.cpp",
1505   MAME_DIR .. "src/mame/includes/sidepckt.h",
15061322   MAME_DIR .. "src/mame/video/sidepckt.cpp",
15071323   MAME_DIR .. "src/mame/drivers/simpl156.cpp",
1508   MAME_DIR .. "src/mame/includes/simpl156.h",
15091324   MAME_DIR .. "src/mame/video/simpl156.cpp",
15101325   MAME_DIR .. "src/mame/drivers/sshangha.cpp",
1511   MAME_DIR .. "src/mame/includes/sshangha.h",
15121326   MAME_DIR .. "src/mame/video/sshangha.cpp",
15131327   MAME_DIR .. "src/mame/drivers/stadhero.cpp",
1514   MAME_DIR .. "src/mame/includes/stadhero.h",
15151328   MAME_DIR .. "src/mame/video/stadhero.cpp",
15161329   MAME_DIR .. "src/mame/drivers/supbtime.cpp",
1517   MAME_DIR .. "src/mame/includes/supbtime.h",
15181330   MAME_DIR .. "src/mame/video/supbtime.cpp",
15191331   MAME_DIR .. "src/mame/drivers/tryout.cpp",
1520   MAME_DIR .. "src/mame/includes/tryout.h",
15211332   MAME_DIR .. "src/mame/video/tryout.cpp",
15221333   MAME_DIR .. "src/mame/drivers/tumbleb.cpp",
1523   MAME_DIR .. "src/mame/includes/tumbleb.h",
15241334   MAME_DIR .. "src/mame/video/tumbleb.cpp",
15251335   MAME_DIR .. "src/mame/drivers/tumblep.cpp",
1526   MAME_DIR .. "src/mame/includes/tumblep.h",
15271336   MAME_DIR .. "src/mame/video/tumblep.cpp",
15281337   MAME_DIR .. "src/mame/drivers/vaportra.cpp",
1529   MAME_DIR .. "src/mame/includes/vaportra.h",
15301338   MAME_DIR .. "src/mame/video/vaportra.cpp",
15311339   MAME_DIR .. "src/mame/machine/deco102.cpp",
15321340   MAME_DIR .. "src/mame/machine/decocrpt.cpp",
1533   MAME_DIR .. "src/mame/includes/decocrpt.h",
15341341   MAME_DIR .. "src/mame/machine/deco104.cpp",
1535   MAME_DIR .. "src/mame/machine/deco104.h",
15361342   MAME_DIR .. "src/mame/machine/deco146.cpp",
1537   MAME_DIR .. "src/mame/machine/deco146.h",
15381343   MAME_DIR .. "src/mame/video/decbac06.cpp",
1539   MAME_DIR .. "src/mame/video/decbac06.h",
15401344   MAME_DIR .. "src/mame/video/deco16ic.cpp",
1541   MAME_DIR .. "src/mame/video/deco16ic.h",
15421345   MAME_DIR .. "src/mame/video/decocomn.cpp",
1543   MAME_DIR .. "src/mame/video/decocomn.h",
15441346   MAME_DIR .. "src/mame/video/decospr.cpp",
1545   MAME_DIR .. "src/mame/video/decospr.h",
15461347   MAME_DIR .. "src/mame/video/decmxc06.cpp",
1547   MAME_DIR .. "src/mame/video/decmxc06.h",
15481348   MAME_DIR .. "src/mame/video/deckarn.cpp",
1549   MAME_DIR .. "src/mame/video/deckarn.h",
15501349}
15511350
15521351createMAMEProjects(_target, _subtarget, "dgrm")
15531352files {
15541353   MAME_DIR .. "src/mame/drivers/blackt96.cpp",
15551354   MAME_DIR .. "src/mame/drivers/pokechmp.cpp",
1556   MAME_DIR .. "src/mame/includes/pokechmp.h",
15571355   MAME_DIR .. "src/mame/video/pokechmp.cpp",
15581356}
15591357
15601358createMAMEProjects(_target, _subtarget, "dooyong")
15611359files {
15621360   MAME_DIR .. "src/mame/drivers/dooyong.cpp",
1563   MAME_DIR .. "src/mame/includes/dooyong.h",
15641361   MAME_DIR .. "src/mame/video/dooyong.cpp",
15651362   MAME_DIR .. "src/mame/drivers/gundealr.cpp",
1566   MAME_DIR .. "src/mame/includes/gundealr.h",
15671363   MAME_DIR .. "src/mame/video/gundealr.cpp",
15681364}
15691365
r250222r250223
15711367files {
15721368   MAME_DIR .. "src/mame/drivers/ddenlovr.cpp",
15731369   MAME_DIR .. "src/mame/drivers/dynax.cpp",
1574   MAME_DIR .. "src/mame/includes/dynax.h",
15751370   MAME_DIR .. "src/mame/video/dynax.cpp",
15761371   MAME_DIR .. "src/mame/drivers/hnayayoi.cpp",
1577   MAME_DIR .. "src/mame/includes/hnayayoi.h",
15781372   MAME_DIR .. "src/mame/video/hnayayoi.cpp",
15791373   MAME_DIR .. "src/mame/drivers/realbrk.cpp",
1580   MAME_DIR .. "src/mame/includes/realbrk.h",
15811374   MAME_DIR .. "src/mame/video/realbrk.cpp",
15821375   MAME_DIR .. "src/mame/drivers/royalmah.cpp",
15831376}
r250222r250223
15861379files {
15871380   MAME_DIR .. "src/mame/drivers/diverboy.cpp",
15881381   MAME_DIR .. "src/mame/drivers/fantland.cpp",
1589   MAME_DIR .. "src/mame/includes/fantland.h",
15901382   MAME_DIR .. "src/mame/video/fantland.cpp",
15911383   MAME_DIR .. "src/mame/drivers/mwarr.cpp",
15921384   MAME_DIR .. "src/mame/drivers/mugsmash.cpp",
1593   MAME_DIR .. "src/mame/includes/mugsmash.h",
15941385   MAME_DIR .. "src/mame/video/mugsmash.cpp",
15951386   MAME_DIR .. "src/mame/drivers/ppmast93.cpp",
15961387   MAME_DIR .. "src/mame/drivers/pzletime.cpp",
15971388   MAME_DIR .. "src/mame/drivers/stlforce.cpp",
1598   MAME_DIR .. "src/mame/includes/stlforce.h",
15991389   MAME_DIR .. "src/mame/video/stlforce.cpp",
16001390   MAME_DIR .. "src/mame/drivers/twins.cpp",
16011391}
r250222r250223
16031393createMAMEProjects(_target, _subtarget, "eolith")
16041394files {
16051395   MAME_DIR .. "src/mame/drivers/eolith.cpp",
1606   MAME_DIR .. "src/mame/includes/eolith.h",
16071396   MAME_DIR .. "src/mame/video/eolith.cpp",
16081397   MAME_DIR .. "src/mame/drivers/eolith16.cpp",
16091398   MAME_DIR .. "src/mame/drivers/eolithsp.cpp",
r250222r250223
16141403createMAMEProjects(_target, _subtarget, "excelent")
16151404files {
16161405   MAME_DIR .. "src/mame/drivers/aquarium.cpp",
1617   MAME_DIR .. "src/mame/includes/aquarium.h",
16181406   MAME_DIR .. "src/mame/video/aquarium.cpp",
16191407   MAME_DIR .. "src/mame/drivers/d9final.cpp",
16201408   MAME_DIR .. "src/mame/drivers/dblcrown.cpp",
16211409   MAME_DIR .. "src/mame/drivers/gcpinbal.cpp",
1622   MAME_DIR .. "src/mame/includes/gcpinbal.h",
16231410   MAME_DIR .. "src/mame/video/gcpinbal.cpp",
16241411   MAME_DIR .. "src/mame/video/excellent_spr.cpp",
1625   MAME_DIR .. "src/mame/video/excellent_spr.h",
16261412   MAME_DIR .. "src/mame/drivers/lastbank.cpp",
16271413}
16281414
16291415createMAMEProjects(_target, _subtarget, "exidy")
16301416files {
16311417   MAME_DIR .. "src/mame/drivers/carpolo.cpp",
1632   MAME_DIR .. "src/mame/includes/carpolo.h",
16331418   MAME_DIR .. "src/mame/machine/carpolo.cpp",
16341419   MAME_DIR .. "src/mame/video/carpolo.cpp",
16351420   MAME_DIR .. "src/mame/drivers/circus.cpp",
1636   MAME_DIR .. "src/mame/includes/circus.h",
16371421   MAME_DIR .. "src/mame/audio/circus.cpp",
16381422   MAME_DIR .. "src/mame/video/circus.cpp",
16391423   MAME_DIR .. "src/mame/drivers/exidy.cpp",
1640   MAME_DIR .. "src/mame/includes/exidy.h",
16411424   MAME_DIR .. "src/mame/audio/exidy.cpp",
1642   MAME_DIR .. "src/mame/audio/exidy.h",
16431425   MAME_DIR .. "src/mame/video/exidy.cpp",
16441426   MAME_DIR .. "src/mame/audio/targ.cpp",
16451427   MAME_DIR .. "src/mame/drivers/exidy440.cpp",
1646   MAME_DIR .. "src/mame/includes/exidy440.h",
16471428   MAME_DIR .. "src/mame/audio/exidy440.cpp",
1648   MAME_DIR .. "src/mame/audio/exidy440.h",
16491429   MAME_DIR .. "src/mame/video/exidy440.cpp",
16501430   MAME_DIR .. "src/mame/drivers/exidyttl.cpp",
16511431   MAME_DIR .. "src/mame/drivers/maxaflex.cpp",
16521432   MAME_DIR .. "src/mame/machine/atari.cpp",
1653   MAME_DIR .. "src/mame/includes/atari.h",
16541433   MAME_DIR .. "src/mame/video/atari.cpp",
16551434   MAME_DIR .. "src/mame/video/antic.cpp",
1656   MAME_DIR .. "src/mame/video/antic.h",
16571435   MAME_DIR .. "src/mame/video/gtia.cpp",
1658   MAME_DIR .. "src/mame/video/gtia.h",
16591436   MAME_DIR .. "src/mame/drivers/starfire.cpp",
1660   MAME_DIR .. "src/mame/includes/starfire.h",
16611437   MAME_DIR .. "src/mame/video/starfire.cpp",
16621438   MAME_DIR .. "src/mame/drivers/vertigo.cpp",
1663   MAME_DIR .. "src/mame/includes/vertigo.h",
16641439   MAME_DIR .. "src/mame/machine/vertigo.cpp",
16651440   MAME_DIR .. "src/mame/video/vertigo.cpp",
16661441   MAME_DIR .. "src/mame/drivers/victory.cpp",
1667   MAME_DIR .. "src/mame/includes/victory.h",
16681442   MAME_DIR .. "src/mame/video/victory.cpp",
16691443}
16701444
16711445createMAMEProjects(_target, _subtarget, "f32")
16721446files {
16731447   MAME_DIR .. "src/mame/drivers/crospang.cpp",
1674   MAME_DIR .. "src/mame/includes/crospang.h",
16751448   MAME_DIR .. "src/mame/video/crospang.cpp",
16761449   MAME_DIR .. "src/mame/drivers/silvmil.cpp",
16771450   MAME_DIR .. "src/mame/drivers/f-32.cpp",
r250222r250223
16811454files {
16821455   MAME_DIR .. "src/mame/drivers/4roses.cpp",
16831456   MAME_DIR .. "src/mame/drivers/funworld.cpp",
1684   MAME_DIR .. "src/mame/includes/funworld.h",
16851457   MAME_DIR .. "src/mame/video/funworld.cpp",
16861458   MAME_DIR .. "src/mame/drivers/snookr10.cpp",
1687   MAME_DIR .. "src/mame/includes/snookr10.h",
16881459   MAME_DIR .. "src/mame/video/snookr10.cpp",
16891460}
16901461
16911462createMAMEProjects(_target, _subtarget, "fuuki")
16921463files {
16931464   MAME_DIR .. "src/mame/drivers/fuukifg2.cpp",
1694   MAME_DIR .. "src/mame/includes/fuukifg2.h",
16951465   MAME_DIR .. "src/mame/video/fuukifg2.cpp",
16961466   MAME_DIR .. "src/mame/drivers/fuukifg3.cpp",
1697   MAME_DIR .. "src/mame/includes/fuukifg3.h",
16981467   MAME_DIR .. "src/mame/video/fuukifg3.cpp",
16991468   MAME_DIR .. "src/mame/video/fuukifg.cpp",
1700   MAME_DIR .. "src/mame/video/fuukifg.h",
17011469}
17021470
17031471createMAMEProjects(_target, _subtarget, "gaelco")
17041472files {
17051473   MAME_DIR .. "src/mame/drivers/atvtrack.cpp",
17061474   MAME_DIR .. "src/mame/drivers/gaelco.cpp",
1707   MAME_DIR .. "src/mame/includes/gaelco.h",
17081475   MAME_DIR .. "src/mame/video/gaelco.cpp",
17091476   MAME_DIR .. "src/mame/machine/gaelcrpt.cpp",
1710   MAME_DIR .. "src/mame/includes/gaelcrpt.h",
17111477   MAME_DIR .. "src/mame/drivers/gaelco2.cpp",
1712   MAME_DIR .. "src/mame/includes/gaelco2.h",
17131478   MAME_DIR .. "src/mame/machine/gaelco2.cpp",
17141479   MAME_DIR .. "src/mame/video/gaelco2.cpp",
17151480   MAME_DIR .. "src/mame/drivers/gaelco3d.cpp",
1716   MAME_DIR .. "src/mame/includes/gaelco3d.h",
17171481   MAME_DIR .. "src/mame/video/gaelco3d.cpp",
17181482   MAME_DIR .. "src/mame/machine/gaelco3d.cpp",
1719   MAME_DIR .. "src/mame/machine/gaelco3d.h",
17201483   MAME_DIR .. "src/mame/drivers/glass.cpp",
1721   MAME_DIR .. "src/mame/includes/glass.h",
17221484   MAME_DIR .. "src/mame/video/glass.cpp",
17231485   MAME_DIR .. "src/mame/drivers/mastboy.cpp",
17241486   MAME_DIR .. "src/mame/drivers/rollext.cpp",
17251487   MAME_DIR .. "src/mame/drivers/splash.cpp",
1726   MAME_DIR .. "src/mame/includes/splash.h",
17271488   MAME_DIR .. "src/mame/video/splash.cpp",
17281489   MAME_DIR .. "src/mame/drivers/targeth.cpp",
1729   MAME_DIR .. "src/mame/includes/targeth.h",
17301490   MAME_DIR .. "src/mame/video/targeth.cpp",
17311491   MAME_DIR .. "src/mame/drivers/thoop2.cpp",
1732   MAME_DIR .. "src/mame/includes/thoop2.h",
17331492   MAME_DIR .. "src/mame/video/thoop2.cpp",
17341493   MAME_DIR .. "src/mame/drivers/tokyocop.cpp",
17351494   MAME_DIR .. "src/mame/drivers/wrally.cpp",
1736   MAME_DIR .. "src/mame/includes/wrally.h",
17371495   MAME_DIR .. "src/mame/machine/wrally.cpp",
17381496   MAME_DIR .. "src/mame/video/wrally.cpp",
17391497   MAME_DIR .. "src/mame/drivers/xorworld.cpp",
1740   MAME_DIR .. "src/mame/includes/xorworld.h",
17411498   MAME_DIR .. "src/mame/video/xorworld.cpp",
17421499}
17431500
r250222r250223
17451502files {
17461503   MAME_DIR .. "src/mame/drivers/enigma2.cpp",
17471504   MAME_DIR .. "src/mame/drivers/gameplan.cpp",
1748   MAME_DIR .. "src/mame/includes/gameplan.h",
17491505   MAME_DIR .. "src/mame/video/gameplan.cpp",
17501506   MAME_DIR .. "src/mame/drivers/toratora.cpp",
17511507}
r250222r250223
17531509createMAMEProjects(_target, _subtarget, "gametron")
17541510files {
17551511   MAME_DIR .. "src/mame/drivers/gatron.cpp",
1756   MAME_DIR .. "src/mame/includes/gatron.h",
17571512   MAME_DIR .. "src/mame/video/gatron.cpp",
17581513   MAME_DIR .. "src/mame/drivers/gotya.cpp",
1759   MAME_DIR .. "src/mame/includes/gotya.h",
17601514   MAME_DIR .. "src/mame/audio/gotya.cpp",
17611515   MAME_DIR .. "src/mame/video/gotya.cpp",
17621516   MAME_DIR .. "src/mame/drivers/sbugger.cpp",
1763   MAME_DIR .. "src/mame/includes/sbugger.h",
17641517   MAME_DIR .. "src/mame/video/sbugger.cpp",
17651518}
17661519
17671520createMAMEProjects(_target, _subtarget, "gottlieb")
17681521files {
17691522   MAME_DIR .. "src/mame/drivers/exterm.cpp",
1770   MAME_DIR .. "src/mame/includes/exterm.h",
17711523   MAME_DIR .. "src/mame/video/exterm.cpp",
17721524   MAME_DIR .. "src/mame/drivers/gottlieb.cpp",
1773   MAME_DIR .. "src/mame/includes/gottlieb.h",
17741525   MAME_DIR .. "src/mame/audio/gottlieb.cpp",
1775   MAME_DIR .. "src/mame/audio/gottlieb.h",
17761526   MAME_DIR .. "src/mame/video/gottlieb.cpp",
17771527}
17781528
r250222r250223
17951545   MAME_DIR .. "src/mame/drivers/ddz.cpp",
17961546   MAME_DIR .. "src/mame/drivers/dunhuang.cpp",
17971547   MAME_DIR .. "src/mame/drivers/goldstar.cpp",
1798   MAME_DIR .. "src/mame/includes/goldstar.h",
17991548   MAME_DIR .. "src/mame/video/goldstar.cpp",
18001549   MAME_DIR .. "src/mame/drivers/jackie.cpp",
18011550   MAME_DIR .. "src/mame/drivers/igspoker.cpp",
r250222r250223
18031552   MAME_DIR .. "src/mame/drivers/igs011.cpp",
18041553   MAME_DIR .. "src/mame/drivers/igs017.cpp",
18051554   MAME_DIR .. "src/mame/video/igs017_igs031.cpp",
1806   MAME_DIR .. "src/mame/video/igs017_igs031.h",
18071555   MAME_DIR .. "src/mame/drivers/igs_fear.cpp",
18081556   MAME_DIR .. "src/mame/drivers/igs_m027.cpp",
18091557   MAME_DIR .. "src/mame/drivers/igs_m036.cpp",
18101558   MAME_DIR .. "src/mame/drivers/iqblock.cpp",
1811   MAME_DIR .. "src/mame/includes/iqblock.h",
18121559   MAME_DIR .. "src/mame/video/iqblock.cpp",
18131560   MAME_DIR .. "src/mame/drivers/lordgun.cpp",
1814   MAME_DIR .. "src/mame/includes/lordgun.h",
18151561   MAME_DIR .. "src/mame/video/lordgun.cpp",
18161562   MAME_DIR .. "src/mame/drivers/pgm.cpp",
1817   MAME_DIR .. "src/mame/includes/pgm.h",
18181563   MAME_DIR .. "src/mame/video/pgm.cpp",
18191564   MAME_DIR .. "src/mame/machine/pgmprot_igs027a_type1.cpp",
18201565   MAME_DIR .. "src/mame/machine/pgmprot_igs027a_type2.cpp",
r250222r250223
18261571   MAME_DIR .. "src/mame/drivers/pgm2.cpp",
18271572   MAME_DIR .. "src/mame/drivers/spoker.cpp",
18281573   MAME_DIR .. "src/mame/machine/igs036crypt.cpp",
1829   MAME_DIR .. "src/mame/machine/igs036crypt.h",
18301574   MAME_DIR .. "src/mame/machine/pgmcrypt.cpp",
1831   MAME_DIR .. "src/mame/machine/pgmcrypt.h",
18321575   MAME_DIR .. "src/mame/machine/igs025.cpp",
1833   MAME_DIR .. "src/mame/machine/igs025.h",
18341576   MAME_DIR .. "src/mame/machine/igs022.cpp",
1835   MAME_DIR .. "src/mame/machine/igs022.h",
18361577   MAME_DIR .. "src/mame/machine/igs028.cpp",
1837   MAME_DIR .. "src/mame/machine/igs028.h",
18381578}
18391579
18401580createMAMEProjects(_target, _subtarget, "irem")
18411581files {
18421582   MAME_DIR .. "src/mame/drivers/m10.cpp",
1843   MAME_DIR .. "src/mame/includes/m10.h",
18441583   MAME_DIR .. "src/mame/video/m10.cpp",
18451584   MAME_DIR .. "src/mame/drivers/m14.cpp",
18461585   MAME_DIR .. "src/mame/drivers/m52.cpp",
1847   MAME_DIR .. "src/mame/includes/m52.h",
18481586   MAME_DIR .. "src/mame/video/m52.cpp",
18491587   MAME_DIR .. "src/mame/drivers/m57.cpp",
1850   MAME_DIR .. "src/mame/includes/m57.h",
18511588   MAME_DIR .. "src/mame/video/m57.cpp",
18521589   MAME_DIR .. "src/mame/drivers/m58.cpp",
1853   MAME_DIR .. "src/mame/includes/m58.h",
18541590   MAME_DIR .. "src/mame/video/m58.cpp",
18551591   MAME_DIR .. "src/mame/drivers/m62.cpp",
1856   MAME_DIR .. "src/mame/includes/m62.h",
18571592   MAME_DIR .. "src/mame/video/m62.cpp",
18581593   MAME_DIR .. "src/mame/drivers/m63.cpp",
18591594   MAME_DIR .. "src/mame/drivers/m72.cpp",
1860   MAME_DIR .. "src/mame/includes/m72.h",
18611595   MAME_DIR .. "src/mame/audio/m72.cpp",
1862   MAME_DIR .. "src/mame/audio/m72.h",
18631596   MAME_DIR .. "src/mame/video/m72.cpp",
18641597   MAME_DIR .. "src/mame/drivers/m90.cpp",
1865   MAME_DIR .. "src/mame/includes/m90.h",
18661598   MAME_DIR .. "src/mame/video/m90.cpp",
18671599   MAME_DIR .. "src/mame/drivers/m92.cpp",
1868   MAME_DIR .. "src/mame/includes/m92.h",
18691600   MAME_DIR .. "src/mame/video/m92.cpp",
18701601   MAME_DIR .. "src/mame/drivers/m107.cpp",
1871   MAME_DIR .. "src/mame/includes/m107.h",
18721602   MAME_DIR .. "src/mame/video/m107.cpp",
1873   MAME_DIR .. "src/mame/includes/iremipt.h",
18741603   MAME_DIR .. "src/mame/drivers/olibochu.cpp",
18751604   MAME_DIR .. "src/mame/drivers/redalert.cpp",
1876   MAME_DIR .. "src/mame/includes/redalert.h",
18771605   MAME_DIR .. "src/mame/audio/redalert.cpp",
18781606   MAME_DIR .. "src/mame/video/redalert.cpp",
18791607   MAME_DIR .. "src/mame/drivers/shisen.cpp",
1880   MAME_DIR .. "src/mame/includes/shisen.h",
18811608   MAME_DIR .. "src/mame/video/shisen.cpp",
18821609   MAME_DIR .. "src/mame/drivers/travrusa.cpp",
1883   MAME_DIR .. "src/mame/includes/travrusa.h",
18841610   MAME_DIR .. "src/mame/video/travrusa.cpp",
18851611   MAME_DIR .. "src/mame/drivers/vigilant.cpp",
1886   MAME_DIR .. "src/mame/includes/vigilant.h",
18871612   MAME_DIR .. "src/mame/video/vigilant.cpp",
18881613   MAME_DIR .. "src/mame/machine/irem_cpu.cpp",
1889   MAME_DIR .. "src/mame/machine/irem_cpu.h",
18901614   MAME_DIR .. "src/mame/audio/irem.cpp",
1891   MAME_DIR .. "src/mame/audio/irem.h",
18921615}
18931616
18941617createMAMEProjects(_target, _subtarget, "itech")
18951618files {
18961619   MAME_DIR .. "src/mame/drivers/capbowl.cpp",
1897   MAME_DIR .. "src/mame/includes/capbowl.h",
18981620   MAME_DIR .. "src/mame/video/capbowl.cpp",
18991621   MAME_DIR .. "src/mame/drivers/itech8.cpp",
1900   MAME_DIR .. "src/mame/includes/itech8.h",
19011622   MAME_DIR .. "src/mame/machine/slikshot.cpp",
19021623   MAME_DIR .. "src/mame/video/itech8.cpp",
19031624   MAME_DIR .. "src/mame/drivers/itech32.cpp",
1904   MAME_DIR .. "src/mame/includes/itech32.h",
19051625   MAME_DIR .. "src/mame/video/itech32.cpp",
19061626   MAME_DIR .. "src/mame/drivers/iteagle.cpp",
19071627   MAME_DIR .. "src/mame/machine/iteagle_fpga.cpp",
1908   MAME_DIR .. "src/mame/machine/iteagle_fpga.h",
19091628}
19101629
19111630createMAMEProjects(_target, _subtarget, "jaleco")
19121631files {
19131632   MAME_DIR .. "src/mame/drivers/aeroboto.cpp",
1914   MAME_DIR .. "src/mame/includes/aeroboto.h",
19151633   MAME_DIR .. "src/mame/video/aeroboto.cpp",
19161634   MAME_DIR .. "src/mame/drivers/argus.cpp",
1917   MAME_DIR .. "src/mame/includes/argus.h",
19181635   MAME_DIR .. "src/mame/video/argus.cpp",
19191636   MAME_DIR .. "src/mame/drivers/bestleag.cpp",
19201637   MAME_DIR .. "src/mame/drivers/bigstrkb.cpp",
1921   MAME_DIR .. "src/mame/includes/bigstrkb.h",
19221638   MAME_DIR .. "src/mame/video/bigstrkb.cpp",
19231639   MAME_DIR .. "src/mame/drivers/blueprnt.cpp",
1924   MAME_DIR .. "src/mame/includes/blueprnt.h",
19251640   MAME_DIR .. "src/mame/video/blueprnt.cpp",
19261641   MAME_DIR .. "src/mame/drivers/bnstars.cpp",
19271642   MAME_DIR .. "src/mame/drivers/cischeat.cpp",
1928   MAME_DIR .. "src/mame/includes/cischeat.h",
19291643   MAME_DIR .. "src/mame/video/cischeat.cpp",
19301644   MAME_DIR .. "src/mame/drivers/citycon.cpp",
1931   MAME_DIR .. "src/mame/includes/citycon.h",
19321645   MAME_DIR .. "src/mame/video/citycon.cpp",
19331646   MAME_DIR .. "src/mame/drivers/ddayjlc.cpp",
19341647   MAME_DIR .. "src/mame/drivers/exerion.cpp",
1935   MAME_DIR .. "src/mame/includes/exerion.h",
19361648   MAME_DIR .. "src/mame/video/exerion.cpp",
19371649   MAME_DIR .. "src/mame/drivers/fcombat.cpp",
1938   MAME_DIR .. "src/mame/includes/fcombat.h",
19391650   MAME_DIR .. "src/mame/video/fcombat.cpp",
19401651   MAME_DIR .. "src/mame/drivers/ginganin.cpp",
1941   MAME_DIR .. "src/mame/includes/ginganin.h",
19421652   MAME_DIR .. "src/mame/video/ginganin.cpp",
19431653   MAME_DIR .. "src/mame/drivers/homerun.cpp",
1944   MAME_DIR .. "src/mame/includes/homerun.h",
19451654   MAME_DIR .. "src/mame/video/homerun.cpp",
19461655   MAME_DIR .. "src/mame/drivers/megasys1.cpp",
1947   MAME_DIR .. "src/mame/includes/megasys1.h",
19481656   MAME_DIR .. "src/mame/video/megasys1.cpp",
19491657   MAME_DIR .. "src/mame/drivers/momoko.cpp",
1950   MAME_DIR .. "src/mame/includes/momoko.h",
19511658   MAME_DIR .. "src/mame/video/momoko.cpp",
19521659   MAME_DIR .. "src/mame/drivers/ms32.cpp",
1953   MAME_DIR .. "src/mame/includes/ms32.h",
19541660   MAME_DIR .. "src/mame/video/ms32.cpp",
19551661   MAME_DIR .. "src/mame/drivers/psychic5.cpp",
1956   MAME_DIR .. "src/mame/includes/psychic5.h",
19571662   MAME_DIR .. "src/mame/video/psychic5.cpp",
19581663   MAME_DIR .. "src/mame/drivers/pturn.cpp",
19591664   MAME_DIR .. "src/mame/drivers/skyfox.cpp",
1960   MAME_DIR .. "src/mame/includes/skyfox.h",
19611665   MAME_DIR .. "src/mame/video/skyfox.cpp",
19621666   MAME_DIR .. "src/mame/drivers/tetrisp2.cpp",
1963   MAME_DIR .. "src/mame/includes/tetrisp2.h",
19641667   MAME_DIR .. "src/mame/video/tetrisp2.cpp",
19651668   MAME_DIR .. "src/mame/machine/jalcrpt.cpp",
1966   MAME_DIR .. "src/mame/machine/jalcrpt.h",
19671669   MAME_DIR .. "src/mame/video/jalblend.cpp",
1968   MAME_DIR .. "src/mame/video/jalblend.h",
19691670}
19701671
19711672createMAMEProjects(_target, _subtarget, "jpm")
19721673files {
19731674   MAME_DIR .. "src/mame/drivers/guab.cpp",
19741675   MAME_DIR .. "src/mame/drivers/jpmsys5.cpp",
1975   MAME_DIR .. "src/mame/includes/jpmsys5.h",
19761676   MAME_DIR .. "src/mame/drivers/jpmsys5sw.cpp",
19771677   MAME_DIR .. "src/mame/drivers/jpmmps.cpp",
19781678   MAME_DIR .. "src/mame/drivers/jpms80.cpp",
19791679   MAME_DIR .. "src/mame/drivers/jpmsru.cpp",
19801680   MAME_DIR .. "src/mame/drivers/jpmimpct.cpp",
1981   MAME_DIR .. "src/mame/includes/jpmimpct.h",
19821681   MAME_DIR .. "src/mame/video/jpmimpct.cpp",
19831682   MAME_DIR .. "src/mame/drivers/jpmimpctsw.cpp",
19841683   MAME_DIR .. "src/mame/drivers/pluto5.cpp",
19851684   MAME_DIR .. "src/mame/drivers/jpmsys7.cpp",
19861685   MAME_DIR .. "src/mame/video/awpvid.cpp",
1987   MAME_DIR .. "src/mame/video/awpvid.h",
19881686   MAME_DIR .. "src/mame/machine/meters.cpp",
1989   MAME_DIR .. "src/mame/machine/meters.h",
19901687}
19911688
19921689createMAMEProjects(_target, _subtarget, "kaneko")
19931690files {
19941691   MAME_DIR .. "src/mame/drivers/airbustr.cpp",
1995   MAME_DIR .. "src/mame/includes/airbustr.h",
19961692   MAME_DIR .. "src/mame/video/airbustr.cpp",
19971693   MAME_DIR .. "src/mame/drivers/djboy.cpp",
1998   MAME_DIR .. "src/mame/includes/djboy.h",
19991694   MAME_DIR .. "src/mame/video/djboy.cpp",
20001695   MAME_DIR .. "src/mame/drivers/expro02.cpp",
20011696   MAME_DIR .. "src/mame/drivers/galpanic.cpp",
2002   MAME_DIR .. "src/mame/includes/galpnipt.h",
2003   MAME_DIR .. "src/mame/includes/galpanic.h",
20041697   MAME_DIR .. "src/mame/video/galpanic.cpp",
20051698   MAME_DIR .. "src/mame/drivers/galpani2.cpp",
2006   MAME_DIR .. "src/mame/includes/galpani2.h",
20071699   MAME_DIR .. "src/mame/video/galpani2.cpp",
20081700   MAME_DIR .. "src/mame/drivers/galpani3.cpp",
20091701   MAME_DIR .. "src/mame/video/kaneko_grap2.cpp",
2010   MAME_DIR .. "src/mame/video/kaneko_grap2.h",
20111702   MAME_DIR .. "src/mame/drivers/hvyunit.cpp",
20121703   MAME_DIR .. "src/mame/drivers/jchan.cpp",
20131704   MAME_DIR .. "src/mame/drivers/kaneko16.cpp",
2014   MAME_DIR .. "src/mame/includes/kaneko16.h",
20151705   MAME_DIR .. "src/mame/video/kaneko16.cpp",
20161706   MAME_DIR .. "src/mame/video/kaneko_tmap.cpp",
2017   MAME_DIR .. "src/mame/video/kaneko_tmap.h",
20181707   MAME_DIR .. "src/mame/video/kaneko_spr.cpp",
2019   MAME_DIR .. "src/mame/video/kaneko_spr.h",
20201708   MAME_DIR .. "src/mame/machine/kaneko_hit.cpp",
2021   MAME_DIR .. "src/mame/machine/kaneko_hit.h",
20221709   MAME_DIR .. "src/mame/machine/kaneko_calc3.cpp",
2023   MAME_DIR .. "src/mame/machine/kaneko_calc3.h",
20241710   MAME_DIR .. "src/mame/machine/kaneko_toybox.cpp",
2025   MAME_DIR .. "src/mame/machine/kaneko_toybox.h",
20261711   MAME_DIR .. "src/mame/drivers/sandscrp.cpp",
20271712   MAME_DIR .. "src/mame/drivers/suprnova.cpp",
2028   MAME_DIR .. "src/mame/includes/suprnova.h",
20291713   MAME_DIR .. "src/mame/video/suprnova.cpp",
20301714   MAME_DIR .. "src/mame/video/sknsspr.cpp",
2031   MAME_DIR .. "src/mame/video/sknsspr.h",
20321715}
20331716
20341717createMAMEProjects(_target, _subtarget, "konami")
20351718files {
20361719   MAME_DIR .. "src/mame/drivers/88games.cpp",
2037   MAME_DIR .. "src/mame/includes/88games.h",
20381720   MAME_DIR .. "src/mame/video/88games.cpp",
20391721   MAME_DIR .. "src/mame/drivers/ajax.cpp",
2040   MAME_DIR .. "src/mame/includes/ajax.h",
20411722   MAME_DIR .. "src/mame/machine/ajax.cpp",
20421723   MAME_DIR .. "src/mame/video/ajax.cpp",
20431724   MAME_DIR .. "src/mame/drivers/aliens.cpp",
2044   MAME_DIR .. "src/mame/includes/aliens.h",
20451725   MAME_DIR .. "src/mame/video/aliens.cpp",
20461726   MAME_DIR .. "src/mame/drivers/asterix.cpp",
2047   MAME_DIR .. "src/mame/includes/asterix.h",
20481727   MAME_DIR .. "src/mame/video/asterix.cpp",
20491728   MAME_DIR .. "src/mame/drivers/battlnts.cpp",
2050   MAME_DIR .. "src/mame/includes/battlnts.h",
20511729   MAME_DIR .. "src/mame/video/battlnts.cpp",
20521730   MAME_DIR .. "src/mame/drivers/bishi.cpp",
2053   MAME_DIR .. "src/mame/includes/bishi.h",
20541731   MAME_DIR .. "src/mame/video/bishi.cpp",
20551732   MAME_DIR .. "src/mame/drivers/bladestl.cpp",
2056   MAME_DIR .. "src/mame/includes/bladestl.h",
20571733   MAME_DIR .. "src/mame/video/bladestl.cpp",
20581734   MAME_DIR .. "src/mame/drivers/blockhl.cpp",
20591735   MAME_DIR .. "src/mame/drivers/bottom9.cpp",
2060   MAME_DIR .. "src/mame/includes/bottom9.h",
20611736   MAME_DIR .. "src/mame/video/bottom9.cpp",
20621737   MAME_DIR .. "src/mame/drivers/chqflag.cpp",
2063   MAME_DIR .. "src/mame/includes/chqflag.h",
20641738   MAME_DIR .. "src/mame/video/chqflag.cpp",
20651739   MAME_DIR .. "src/mame/drivers/circusc.cpp",
2066   MAME_DIR .. "src/mame/includes/circusc.h",
20671740   MAME_DIR .. "src/mame/video/circusc.cpp",
20681741   MAME_DIR .. "src/mame/drivers/cobra.cpp",
20691742   MAME_DIR .. "src/mame/drivers/combatsc.cpp",
2070   MAME_DIR .. "src/mame/includes/combatsc.h",
20711743   MAME_DIR .. "src/mame/video/combatsc.cpp",
20721744   MAME_DIR .. "src/mame/drivers/contra.cpp",
2073   MAME_DIR .. "src/mame/includes/contra.h",
20741745   MAME_DIR .. "src/mame/video/contra.cpp",
20751746   MAME_DIR .. "src/mame/drivers/crimfght.cpp",
2076   MAME_DIR .. "src/mame/includes/crimfght.h",
20771747   MAME_DIR .. "src/mame/video/crimfght.cpp",
20781748   MAME_DIR .. "src/mame/drivers/dbz.cpp",
2079   MAME_DIR .. "src/mame/includes/dbz.h",
20801749   MAME_DIR .. "src/mame/video/dbz.cpp",
20811750   MAME_DIR .. "src/mame/drivers/ddribble.cpp",
2082   MAME_DIR .. "src/mame/includes/ddribble.h",
20831751   MAME_DIR .. "src/mame/video/ddribble.cpp",
20841752   MAME_DIR .. "src/mame/drivers/djmain.cpp",
2085   MAME_DIR .. "src/mame/includes/djmain.h",
20861753   MAME_DIR .. "src/mame/video/djmain.cpp",
20871754   MAME_DIR .. "src/mame/drivers/fastfred.cpp",
2088   MAME_DIR .. "src/mame/includes/fastfred.h",
20891755   MAME_DIR .. "src/mame/video/fastfred.cpp",
20901756   MAME_DIR .. "src/mame/drivers/fastlane.cpp",
2091   MAME_DIR .. "src/mame/includes/fastlane.h",
20921757   MAME_DIR .. "src/mame/video/fastlane.cpp",
20931758   MAME_DIR .. "src/mame/drivers/finalizr.cpp",
2094   MAME_DIR .. "src/mame/includes/finalizr.h",
20951759   MAME_DIR .. "src/mame/video/finalizr.cpp",
20961760   MAME_DIR .. "src/mame/drivers/firebeat.cpp",
20971761   MAME_DIR .. "src/mame/machine/midikbd.cpp",
2098   MAME_DIR .. "src/mame/machine/midikbd.h",
20991762   MAME_DIR .. "src/mame/drivers/flkatck.cpp",
2100   MAME_DIR .. "src/mame/includes/flkatck.h",
21011763   MAME_DIR .. "src/mame/video/flkatck.cpp",
21021764   MAME_DIR .. "src/mame/drivers/gberet.cpp",
2103   MAME_DIR .. "src/mame/includes/gberet.h",
21041765   MAME_DIR .. "src/mame/video/gberet.cpp",
21051766   MAME_DIR .. "src/mame/drivers/gijoe.cpp",
2106   MAME_DIR .. "src/mame/includes/gijoe.h",
21071767   MAME_DIR .. "src/mame/video/gijoe.cpp",
21081768   MAME_DIR .. "src/mame/drivers/gradius3.cpp",
2109   MAME_DIR .. "src/mame/includes/gradius3.h",
21101769   MAME_DIR .. "src/mame/video/gradius3.cpp",
21111770   MAME_DIR .. "src/mame/drivers/gticlub.cpp",
21121771   MAME_DIR .. "src/mame/drivers/gyruss.cpp",
2113   MAME_DIR .. "src/mame/includes/gyruss.h",
21141772   MAME_DIR .. "src/mame/video/gyruss.cpp",
21151773   MAME_DIR .. "src/mame/drivers/hcastle.cpp",
2116   MAME_DIR .. "src/mame/includes/hcastle.h",
21171774   MAME_DIR .. "src/mame/video/hcastle.cpp",
21181775   MAME_DIR .. "src/mame/drivers/hexion.cpp",
2119   MAME_DIR .. "src/mame/includes/hexion.h",
21201776   MAME_DIR .. "src/mame/video/hexion.cpp",
21211777   MAME_DIR .. "src/mame/drivers/hornet.cpp",
21221778   MAME_DIR .. "src/mame/machine/konppc.cpp",
2123   MAME_DIR .. "src/mame/machine/konppc.h",
21241779   MAME_DIR .. "src/mame/drivers/hyperspt.cpp",
2125   MAME_DIR .. "src/mame/includes/hyperspt.h",
21261780   MAME_DIR .. "src/mame/audio/hyprolyb.cpp",
2127   MAME_DIR .. "src/mame/audio/hyprolyb.h",
21281781   MAME_DIR .. "src/mame/video/hyperspt.cpp",
21291782   MAME_DIR .. "src/mame/drivers/ironhors.cpp",
2130   MAME_DIR .. "src/mame/includes/ironhors.h",
21311783   MAME_DIR .. "src/mame/video/ironhors.cpp",
21321784   MAME_DIR .. "src/mame/drivers/jackal.cpp",
2133   MAME_DIR .. "src/mame/includes/jackal.h",
21341785   MAME_DIR .. "src/mame/video/jackal.cpp",
21351786   MAME_DIR .. "src/mame/drivers/jailbrek.cpp",
2136   MAME_DIR .. "src/mame/includes/jailbrek.h",
21371787   MAME_DIR .. "src/mame/video/jailbrek.cpp",
21381788   MAME_DIR .. "src/mame/drivers/junofrst.cpp",
21391789   MAME_DIR .. "src/mame/drivers/konamigq.cpp",
21401790   MAME_DIR .. "src/mame/drivers/konamigv.cpp",
21411791   MAME_DIR .. "src/mame/drivers/konamigx.cpp",
2142   MAME_DIR .. "src/mame/includes/konamigx.h",
21431792   MAME_DIR .. "src/mame/machine/konamigx.cpp",
21441793   MAME_DIR .. "src/mame/video/konamigx.cpp",
21451794   MAME_DIR .. "src/mame/drivers/konamim2.cpp",
r250222r250223
21471796   MAME_DIR .. "src/mame/drivers/konendev.cpp",
21481797   MAME_DIR .. "src/mame/drivers/ksys573.cpp",
21491798   MAME_DIR .. "src/mame/machine/k573cass.cpp",
2150   MAME_DIR .. "src/mame/machine/k573cass.h",
21511799   MAME_DIR .. "src/mame/machine/k573dio.cpp",
2152   MAME_DIR .. "src/mame/machine/k573dio.h",
21531800   MAME_DIR .. "src/mame/machine/k573mcr.cpp",
2154   MAME_DIR .. "src/mame/machine/k573mcr.h",
21551801   MAME_DIR .. "src/mame/machine/k573msu.cpp",
2156   MAME_DIR .. "src/mame/machine/k573msu.h",
21571802   MAME_DIR .. "src/mame/machine/k573npu.cpp",
2158   MAME_DIR .. "src/mame/machine/k573npu.h",
21591803   MAME_DIR .. "src/mame/machine/zs01.cpp",
2160   MAME_DIR .. "src/mame/machine/zs01.h",
21611804   MAME_DIR .. "src/mame/drivers/labyrunr.cpp",
2162   MAME_DIR .. "src/mame/includes/labyrunr.h",
21631805   MAME_DIR .. "src/mame/video/labyrunr.cpp",
21641806   MAME_DIR .. "src/mame/drivers/lethal.cpp",
2165   MAME_DIR .. "src/mame/includes/lethal.h",
21661807   MAME_DIR .. "src/mame/video/lethal.cpp",
21671808   MAME_DIR .. "src/mame/drivers/mainevt.cpp",
2168   MAME_DIR .. "src/mame/includes/mainevt.h",
21691809   MAME_DIR .. "src/mame/video/mainevt.cpp",
21701810   MAME_DIR .. "src/mame/drivers/megazone.cpp",
2171   MAME_DIR .. "src/mame/includes/megazone.h",
21721811   MAME_DIR .. "src/mame/video/megazone.cpp",
21731812   MAME_DIR .. "src/mame/drivers/mikie.cpp",
2174   MAME_DIR .. "src/mame/includes/mikie.h",
21751813   MAME_DIR .. "src/mame/video/mikie.cpp",
21761814   MAME_DIR .. "src/mame/drivers/mogura.cpp",
21771815   MAME_DIR .. "src/mame/drivers/moo.cpp",
2178   MAME_DIR .. "src/mame/includes/moo.h",
21791816   MAME_DIR .. "src/mame/video/moo.cpp",
21801817   MAME_DIR .. "src/mame/drivers/mystwarr.cpp",
2181   MAME_DIR .. "src/mame/includes/mystwarr.h",
21821818   MAME_DIR .. "src/mame/video/mystwarr.cpp",
21831819   MAME_DIR .. "src/mame/drivers/nemesis.cpp",
2184   MAME_DIR .. "src/mame/includes/nemesis.h",
21851820   MAME_DIR .. "src/mame/video/nemesis.cpp",
21861821   MAME_DIR .. "src/mame/drivers/nwk-tr.cpp",
21871822   MAME_DIR .. "src/mame/drivers/overdriv.cpp",
2188   MAME_DIR .. "src/mame/includes/overdriv.h",
21891823   MAME_DIR .. "src/mame/video/overdriv.cpp",
21901824   MAME_DIR .. "src/mame/drivers/pandoras.cpp",
2191   MAME_DIR .. "src/mame/includes/pandoras.h",
21921825   MAME_DIR .. "src/mame/video/pandoras.cpp",
21931826   MAME_DIR .. "src/mame/drivers/parodius.cpp",
2194   MAME_DIR .. "src/mame/includes/parodius.h",
21951827   MAME_DIR .. "src/mame/video/parodius.cpp",
21961828   MAME_DIR .. "src/mame/drivers/pingpong.cpp",
2197   MAME_DIR .. "src/mame/includes/pingpong.h",
21981829   MAME_DIR .. "src/mame/video/pingpong.cpp",
21991830   MAME_DIR .. "src/mame/drivers/plygonet.cpp",
2200   MAME_DIR .. "src/mame/includes/plygonet.h",
22011831   MAME_DIR .. "src/mame/video/plygonet.cpp",
22021832   MAME_DIR .. "src/mame/drivers/pooyan.cpp",
2203   MAME_DIR .. "src/mame/includes/pooyan.h",
22041833   MAME_DIR .. "src/mame/video/pooyan.cpp",
22051834   MAME_DIR .. "src/mame/drivers/pyson.cpp",
22061835   MAME_DIR .. "src/mame/drivers/qdrmfgp.cpp",
2207   MAME_DIR .. "src/mame/includes/qdrmfgp.h",
22081836   MAME_DIR .. "src/mame/video/qdrmfgp.cpp",
22091837   MAME_DIR .. "src/mame/drivers/rockrage.cpp",
2210   MAME_DIR .. "src/mame/includes/rockrage.h",
22111838   MAME_DIR .. "src/mame/video/rockrage.cpp",
22121839   MAME_DIR .. "src/mame/drivers/rocnrope.cpp",
2213   MAME_DIR .. "src/mame/includes/rocnrope.h",
22141840   MAME_DIR .. "src/mame/video/rocnrope.cpp",
22151841   MAME_DIR .. "src/mame/drivers/rollerg.cpp",
2216   MAME_DIR .. "src/mame/includes/rollerg.h",
22171842   MAME_DIR .. "src/mame/video/rollerg.cpp",
22181843   MAME_DIR .. "src/mame/drivers/rungun.cpp",
2219   MAME_DIR .. "src/mame/includes/rungun.h",
22201844   MAME_DIR .. "src/mame/video/rungun.cpp",
22211845   MAME_DIR .. "src/mame/drivers/sbasketb.cpp",
2222   MAME_DIR .. "src/mame/includes/sbasketb.h",
22231846   MAME_DIR .. "src/mame/video/sbasketb.cpp",
22241847   MAME_DIR .. "src/mame/drivers/scobra.cpp",
22251848   MAME_DIR .. "src/mame/drivers/scotrsht.cpp",
2226   MAME_DIR .. "src/mame/includes/scotrsht.h",
22271849   MAME_DIR .. "src/mame/video/scotrsht.cpp",
22281850   MAME_DIR .. "src/mame/drivers/scramble.cpp",
2229   MAME_DIR .. "src/mame/includes/scramble.h",
22301851   MAME_DIR .. "src/mame/machine/scramble.cpp",
22311852   MAME_DIR .. "src/mame/audio/scramble.cpp",
22321853   MAME_DIR .. "src/mame/drivers/shaolins.cpp",
2233   MAME_DIR .. "src/mame/includes/shaolins.h",
22341854   MAME_DIR .. "src/mame/video/shaolins.cpp",
22351855   MAME_DIR .. "src/mame/drivers/simpsons.cpp",
2236   MAME_DIR .. "src/mame/includes/simpsons.h",
22371856   MAME_DIR .. "src/mame/machine/simpsons.cpp",
22381857   MAME_DIR .. "src/mame/video/simpsons.cpp",
22391858   MAME_DIR .. "src/mame/drivers/spy.cpp",
2240   MAME_DIR .. "src/mame/includes/spy.h",
22411859   MAME_DIR .. "src/mame/video/spy.cpp",
22421860   MAME_DIR .. "src/mame/drivers/surpratk.cpp",
2243   MAME_DIR .. "src/mame/includes/surpratk.h",
22441861   MAME_DIR .. "src/mame/video/surpratk.cpp",
22451862   MAME_DIR .. "src/mame/drivers/tasman.cpp",
22461863   MAME_DIR .. "src/mame/drivers/tgtpanic.cpp",
22471864   MAME_DIR .. "src/mame/drivers/thunderx.cpp",
2248   MAME_DIR .. "src/mame/includes/thunderx.h",
22491865   MAME_DIR .. "src/mame/video/thunderx.cpp",
22501866   MAME_DIR .. "src/mame/drivers/timeplt.cpp",
2251   MAME_DIR .. "src/mame/includes/timeplt.h",
22521867   MAME_DIR .. "src/mame/audio/timeplt.cpp",
2253   MAME_DIR .. "src/mame/audio/timeplt.h",
22541868   MAME_DIR .. "src/mame/video/timeplt.cpp",
22551869   MAME_DIR .. "src/mame/drivers/tmnt.cpp",
2256   MAME_DIR .. "src/mame/includes/tmnt.h",
22571870   MAME_DIR .. "src/mame/video/tmnt.cpp",
22581871   MAME_DIR .. "src/mame/drivers/tp84.cpp",
2259   MAME_DIR .. "src/mame/includes/tp84.h",
22601872   MAME_DIR .. "src/mame/video/tp84.cpp",
22611873   MAME_DIR .. "src/mame/drivers/trackfld.cpp",
2262   MAME_DIR .. "src/mame/includes/trackfld.h",
22631874   MAME_DIR .. "src/mame/machine/konami1.cpp",
2264   MAME_DIR .. "src/mame/machine/konami1.h",
22651875   MAME_DIR .. "src/mame/audio/trackfld.cpp",
2266   MAME_DIR .. "src/mame/audio/trackfld.h",
22671876   MAME_DIR .. "src/mame/video/trackfld.cpp",
22681877   MAME_DIR .. "src/mame/drivers/tutankhm.cpp",
2269   MAME_DIR .. "src/mame/includes/tutankhm.h",
22701878   MAME_DIR .. "src/mame/video/tutankhm.cpp",
22711879   MAME_DIR .. "src/mame/drivers/twin16.cpp",
2272   MAME_DIR .. "src/mame/includes/twin16.h",
22731880   MAME_DIR .. "src/mame/video/twin16.cpp",
22741881   MAME_DIR .. "src/mame/drivers/twinkle.cpp",
22751882   MAME_DIR .. "src/mame/drivers/ultrsprt.cpp",
22761883   MAME_DIR .. "src/mame/drivers/ultraman.cpp",
2277   MAME_DIR .. "src/mame/includes/ultraman.h",
22781884   MAME_DIR .. "src/mame/video/ultraman.cpp",
22791885   MAME_DIR .. "src/mame/drivers/vendetta.cpp",
2280   MAME_DIR .. "src/mame/includes/vendetta.h",
22811886   MAME_DIR .. "src/mame/video/vendetta.cpp",
22821887   MAME_DIR .. "src/mame/drivers/viper.cpp",
22831888   MAME_DIR .. "src/mame/drivers/wecleman.cpp",
2284   MAME_DIR .. "src/mame/includes/wecleman.h",
22851889   MAME_DIR .. "src/mame/video/wecleman.cpp",
22861890   MAME_DIR .. "src/mame/drivers/xexex.cpp",
2287   MAME_DIR .. "src/mame/includes/xexex.h",
22881891   MAME_DIR .. "src/mame/video/xexex.cpp",
22891892   MAME_DIR .. "src/mame/drivers/xmen.cpp",
2290   MAME_DIR .. "src/mame/includes/xmen.h",
22911893   MAME_DIR .. "src/mame/video/xmen.cpp",
22921894   MAME_DIR .. "src/mame/drivers/yiear.cpp",
2293   MAME_DIR .. "src/mame/includes/yiear.h",
22941895   MAME_DIR .. "src/mame/video/yiear.cpp",
22951896   MAME_DIR .. "src/mame/drivers/zr107.cpp",
2296   MAME_DIR .. "src/mame/includes/konamipt.h",
22971897   MAME_DIR .. "src/mame/video/konami_helper.cpp",
2298   MAME_DIR .. "src/mame/video/konami_helper.h",
22991898   MAME_DIR .. "src/mame/video/k007121.cpp",
2300   MAME_DIR .. "src/mame/video/k007121.h",
23011899   MAME_DIR .. "src/mame/video/k007342.cpp",
2302   MAME_DIR .. "src/mame/video/k007342.h",
23031900   MAME_DIR .. "src/mame/video/k007420.cpp",
2304   MAME_DIR .. "src/mame/video/k007420.h",
23051901   MAME_DIR .. "src/mame/video/k037122.cpp",
2306   MAME_DIR .. "src/mame/video/k037122.h",
23071902   MAME_DIR .. "src/mame/video/k051316.cpp",
2308   MAME_DIR .. "src/mame/video/k051316.h",
23091903   MAME_DIR .. "src/mame/video/k051733.cpp",
2310   MAME_DIR .. "src/mame/video/k051733.h",
23111904   MAME_DIR .. "src/mame/video/k051960.cpp",
2312   MAME_DIR .. "src/mame/video/k051960.h",
23131905   MAME_DIR .. "src/mame/video/k052109.cpp",
2314   MAME_DIR .. "src/mame/video/k052109.h",
23151906   MAME_DIR .. "src/mame/video/k053250.cpp",
2316   MAME_DIR .. "src/mame/video/k053250.h",
23171907   MAME_DIR .. "src/mame/video/k053251.cpp",
2318   MAME_DIR .. "src/mame/video/k053251.h",
23191908   MAME_DIR .. "src/mame/video/k054156_k054157_k056832.cpp",
2320   MAME_DIR .. "src/mame/video/k054156_k054157_k056832.h",
23211909   MAME_DIR .. "src/mame/video/k053244_k053245.cpp",
2322   MAME_DIR .. "src/mame/video/k053244_k053245.h",
23231910   MAME_DIR .. "src/mame/video/k053246_k053247_k055673.cpp",
2324   MAME_DIR .. "src/mame/video/k053246_k053247_k055673.h",
23251911   MAME_DIR .. "src/mame/video/k055555.cpp",
2326   MAME_DIR .. "src/mame/video/k055555.h",
23271912   MAME_DIR .. "src/mame/video/k054000.cpp",
2328   MAME_DIR .. "src/mame/video/k054000.h",
23291913   MAME_DIR .. "src/mame/video/k054338.cpp",
2330   MAME_DIR .. "src/mame/video/k054338.h",
23311914   MAME_DIR .. "src/mame/video/k053936.cpp",
2332   MAME_DIR .. "src/mame/video/k053936.h",
23331915   MAME_DIR .. "src/mame/video/k001006.cpp",
2334   MAME_DIR .. "src/mame/video/k001006.h",
23351916   MAME_DIR .. "src/mame/video/k001005.cpp",
2336   MAME_DIR .. "src/mame/video/k001005.h",
23371917   MAME_DIR .. "src/mame/video/k001604.cpp",
2338   MAME_DIR .. "src/mame/video/k001604.h",
23391918   MAME_DIR .. "src/mame/video/k057714.cpp",
2340   MAME_DIR .. "src/mame/video/k057714.h",
23411919}
23421920
23431921createMAMEProjects(_target, _subtarget, "matic")
r250222r250223
23481926createMAMEProjects(_target, _subtarget, "maygay")
23491927files {
23501928   MAME_DIR .. "src/mame/drivers/maygay1b.cpp",
2351   MAME_DIR .. "src/mame/includes/maygay1b.h",
23521929   MAME_DIR .. "src/mame/drivers/maygay1bsw.cpp",
23531930   MAME_DIR .. "src/mame/drivers/maygayv1.cpp",
23541931   MAME_DIR .. "src/mame/drivers/maygayep.cpp",
r250222r250223
23591936createMAMEProjects(_target, _subtarget, "meadows")
23601937files {
23611938   MAME_DIR .. "src/mame/drivers/lazercmd.cpp",
2362   MAME_DIR .. "src/mame/includes/lazercmd.h",
23631939   MAME_DIR .. "src/mame/video/lazercmd.cpp",
23641940   MAME_DIR .. "src/mame/drivers/meadwttl.cpp",
23651941   MAME_DIR .. "src/mame/drivers/meadows.cpp",
2366   MAME_DIR .. "src/mame/includes/meadows.h",
23671942   MAME_DIR .. "src/mame/audio/meadows.cpp",
23681943   MAME_DIR .. "src/mame/video/meadows.cpp",
23691944   MAME_DIR .. "src/mame/drivers/warpsped.cpp",
r250222r250223
23791954createMAMEProjects(_target, _subtarget, "metro")
23801955files {
23811956   MAME_DIR .. "src/mame/drivers/hyprduel.cpp",
2382   MAME_DIR .. "src/mame/includes/hyprduel.h",
23831957   MAME_DIR .. "src/mame/video/hyprduel.cpp",
23841958   MAME_DIR .. "src/mame/drivers/metro.cpp",
2385   MAME_DIR .. "src/mame/includes/metro.h",
23861959   MAME_DIR .. "src/mame/video/metro.cpp",
23871960   MAME_DIR .. "src/mame/drivers/rabbit.cpp",
23881961   MAME_DIR .. "src/mame/drivers/tmmjprd.cpp",
r250222r250223
23981971createMAMEProjects(_target, _subtarget, "midw8080")
23991972files {
24001973   MAME_DIR .. "src/mame/drivers/8080bw.cpp",
2401   MAME_DIR .. "src/mame/includes/8080bw.h",
24021974   MAME_DIR .. "src/mame/audio/8080bw.cpp",
24031975   MAME_DIR .. "src/mame/video/8080bw.cpp",
24041976   MAME_DIR .. "src/mame/drivers/m79amb.cpp",
2405   MAME_DIR .. "src/mame/includes/m79amb.h",
24061977   MAME_DIR .. "src/mame/audio/m79amb.cpp",
24071978   MAME_DIR .. "src/mame/drivers/mw8080bw.cpp",
2408   MAME_DIR .. "src/mame/includes/mw8080bw.h",
24091979   MAME_DIR .. "src/mame/machine/mw8080bw.cpp",
24101980   MAME_DIR .. "src/mame/audio/mw8080bw.cpp",
24111981   MAME_DIR .. "src/mame/video/mw8080bw.cpp",
r250222r250223
24151985createMAMEProjects(_target, _subtarget, "midway")
24161986files {
24171987   MAME_DIR .. "src/mame/drivers/astrocde.cpp",
2418   MAME_DIR .. "src/mame/includes/astrocde.h",
24191988   MAME_DIR .. "src/mame/video/astrocde.cpp",
24201989   MAME_DIR .. "src/mame/audio/gorf.cpp",
24211990   MAME_DIR .. "src/mame/audio/wow.cpp",
24221991   MAME_DIR .. "src/mame/drivers/atlantis.cpp",
24231992   MAME_DIR .. "src/mame/drivers/balsente.cpp",
2424   MAME_DIR .. "src/mame/includes/balsente.h",
24251993   MAME_DIR .. "src/mame/machine/balsente.cpp",
24261994   MAME_DIR .. "src/mame/video/balsente.cpp",
24271995   MAME_DIR .. "src/mame/drivers/gridlee.cpp",
2428   MAME_DIR .. "src/mame/includes/gridlee.h",
24291996   MAME_DIR .. "src/mame/audio/gridlee.cpp",
24301997   MAME_DIR .. "src/mame/video/gridlee.cpp",
24311998   MAME_DIR .. "src/mame/drivers/mcr.cpp",
2432   MAME_DIR .. "src/mame/includes/mcr.h",
24331999   MAME_DIR .. "src/mame/machine/mcr.cpp",
24342000   MAME_DIR .. "src/mame/video/mcr.cpp",
24352001   MAME_DIR .. "src/mame/drivers/mcr3.cpp",
2436   MAME_DIR .. "src/mame/includes/mcr3.h",
24372002   MAME_DIR .. "src/mame/video/mcr3.cpp",
24382003   MAME_DIR .. "src/mame/drivers/mcr68.cpp",
2439   MAME_DIR .. "src/mame/includes/mcr68.h",
24402004   MAME_DIR .. "src/mame/machine/mcr68.cpp",
24412005   MAME_DIR .. "src/mame/video/mcr68.cpp",
24422006   MAME_DIR .. "src/mame/drivers/midqslvr.cpp",
24432007   MAME_DIR .. "src/mame/drivers/midtunit.cpp",
2444   MAME_DIR .. "src/mame/includes/midtunit.h",
24452008   MAME_DIR .. "src/mame/machine/midtunit.cpp",
24462009   MAME_DIR .. "src/mame/video/midtunit.cpp",
24472010   MAME_DIR .. "src/mame/drivers/midvunit.cpp",
2448   MAME_DIR .. "src/mame/includes/midvunit.h",
24492011   MAME_DIR .. "src/mame/video/midvunit.cpp",
24502012   MAME_DIR .. "src/mame/drivers/midwunit.cpp",
2451   MAME_DIR .. "src/mame/includes/midwunit.h",
24522013   MAME_DIR .. "src/mame/machine/midwunit.cpp",
24532014   MAME_DIR .. "src/mame/drivers/midxunit.cpp",
2454   MAME_DIR .. "src/mame/includes/midxunit.h",
24552015   MAME_DIR .. "src/mame/machine/midxunit.cpp",
24562016   MAME_DIR .. "src/mame/drivers/midyunit.cpp",
2457   MAME_DIR .. "src/mame/includes/midyunit.h",
24582017   MAME_DIR .. "src/mame/machine/midyunit.cpp",
24592018   MAME_DIR .. "src/mame/video/midyunit.cpp",
24602019   MAME_DIR .. "src/mame/drivers/midzeus.cpp",
2461   MAME_DIR .. "src/mame/includes/midzeus.h",
24622020   MAME_DIR .. "src/mame/video/midzeus.cpp",
24632021   MAME_DIR .. "src/mame/video/midzeus2.cpp",
24642022   MAME_DIR .. "src/mame/drivers/mw18w.cpp",
r250222r250223
24672025   MAME_DIR .. "src/mame/drivers/pinball2k.cpp",
24682026   MAME_DIR .. "src/mame/drivers/seattle.cpp",
24692027   MAME_DIR .. "src/mame/drivers/sspeedr.cpp",
2470   MAME_DIR .. "src/mame/includes/sspeedr.h",
24712028   MAME_DIR .. "src/mame/video/sspeedr.cpp",
24722029   MAME_DIR .. "src/mame/drivers/tmaster.cpp",
24732030   MAME_DIR .. "src/mame/drivers/vegas.cpp",
24742031   MAME_DIR .. "src/mame/drivers/wmg.cpp",
24752032   MAME_DIR .. "src/mame/drivers/williams.cpp",
2476   MAME_DIR .. "src/mame/includes/williams.h",
24772033   MAME_DIR .. "src/mame/machine/williams.cpp",
24782034   MAME_DIR .. "src/mame/audio/williams.cpp",
2479   MAME_DIR .. "src/mame/audio/williams.h",
24802035   MAME_DIR .. "src/mame/video/williams.cpp",
24812036   MAME_DIR .. "src/mame/machine/midwayic.cpp",
2482   MAME_DIR .. "src/mame/machine/midwayic.h",
24832037   MAME_DIR .. "src/mame/audio/midway.cpp",
2484   MAME_DIR .. "src/mame/audio/midway.h",
24852038}
24862039
24872040createMAMEProjects(_target, _subtarget, "namco")
24882041files {
24892042   MAME_DIR .. "src/mame/drivers/20pacgal.cpp",
2490   MAME_DIR .. "src/mame/includes/20pacgal.h",
24912043   MAME_DIR .. "src/mame/video/20pacgal.cpp",
24922044   MAME_DIR .. "src/mame/drivers/30test.cpp",
24932045   MAME_DIR .. "src/mame/drivers/baraduke.cpp",
2494   MAME_DIR .. "src/mame/includes/baraduke.h",
24952046   MAME_DIR .. "src/mame/video/baraduke.cpp",
24962047   MAME_DIR .. "src/mame/drivers/cswat.cpp",
24972048   MAME_DIR .. "src/mame/drivers/dambustr.cpp",
24982049   MAME_DIR .. "src/mame/drivers/gal3.cpp",
24992050   MAME_DIR .. "src/mame/drivers/galaga.cpp",
2500   MAME_DIR .. "src/mame/includes/galaga.h",
25012051   MAME_DIR .. "src/mame/audio/galaga.cpp",
25022052   MAME_DIR .. "src/mame/video/galaga.cpp",
25032053   MAME_DIR .. "src/mame/video/bosco.cpp",
r250222r250223
25052055   MAME_DIR .. "src/mame/machine/xevious.cpp",
25062056   MAME_DIR .. "src/mame/video/xevious.cpp",
25072057   MAME_DIR .. "src/mame/drivers/galaxian.cpp",
2508   MAME_DIR .. "src/mame/includes/galaxian.h",
25092058   MAME_DIR .. "src/mame/audio/galaxian.cpp",
2510   MAME_DIR .. "src/mame/audio/galaxian.h",
25112059   MAME_DIR .. "src/mame/video/galaxian.cpp",
25122060   MAME_DIR .. "src/mame/drivers/galaxold.cpp",
2513   MAME_DIR .. "src/mame/includes/galaxold.h",
25142061   MAME_DIR .. "src/mame/machine/galaxold.cpp",
25152062   MAME_DIR .. "src/mame/video/galaxold.cpp",
25162063   MAME_DIR .. "src/mame/drivers/gaplus.cpp",
2517   MAME_DIR .. "src/mame/includes/gaplus.h",
25182064   MAME_DIR .. "src/mame/machine/gaplus.cpp",
25192065   MAME_DIR .. "src/mame/video/gaplus.cpp",
25202066   MAME_DIR .. "src/mame/drivers/kungfur.cpp",
25212067   MAME_DIR .. "src/mame/drivers/mappy.cpp",
2522   MAME_DIR .. "src/mame/includes/mappy.h",
25232068   MAME_DIR .. "src/mame/video/mappy.cpp",
25242069   MAME_DIR .. "src/mame/drivers/namcofl.cpp",
2525   MAME_DIR .. "src/mame/includes/namcofl.h",
25262070   MAME_DIR .. "src/mame/video/namcofl.cpp",
25272071   MAME_DIR .. "src/mame/drivers/namcoic.cpp",
2528   MAME_DIR .. "src/mame/includes/namcoic.h",
25292072   MAME_DIR .. "src/mame/drivers/namcona1.cpp",
2530   MAME_DIR .. "src/mame/includes/namcona1.h",
25312073   MAME_DIR .. "src/mame/video/namcona1.cpp",
25322074   MAME_DIR .. "src/mame/drivers/namconb1.cpp",
2533   MAME_DIR .. "src/mame/includes/namconb1.h",
25342075   MAME_DIR .. "src/mame/video/namconb1.cpp",
25352076   MAME_DIR .. "src/mame/drivers/namcond1.cpp",
2536   MAME_DIR .. "src/mame/includes/namcond1.h",
25372077   MAME_DIR .. "src/mame/machine/namcond1.cpp",
25382078   MAME_DIR .. "src/mame/video/ygv608.cpp",
2539   MAME_DIR .. "src/mame/video/ygv608.h",
25402079   MAME_DIR .. "src/mame/drivers/namcops2.cpp",
25412080   MAME_DIR .. "src/mame/drivers/namcos1.cpp",
2542   MAME_DIR .. "src/mame/includes/namcos1.h",
25432081   MAME_DIR .. "src/mame/machine/namcos1.cpp",
25442082   MAME_DIR .. "src/mame/video/namcos1.cpp",
25452083   MAME_DIR .. "src/mame/drivers/namcos10.cpp",
25462084   MAME_DIR .. "src/mame/machine/ns10crypt.cpp",
2547   MAME_DIR .. "src/mame/machine/ns10crypt.h",
25482085   MAME_DIR .. "src/mame/drivers/namcos11.cpp",
25492086   MAME_DIR .. "src/mame/machine/ns11prot.cpp",
2550   MAME_DIR .. "src/mame/machine/ns11prot.h",
25512087   MAME_DIR .. "src/mame/drivers/namcos12.cpp",
25522088   MAME_DIR .. "src/mame/machine/namco_settings.cpp",
2553   MAME_DIR .. "src/mame/machine/namco_settings.h",
25542089   MAME_DIR .. "src/mame/drivers/namcos2.cpp",
2555   MAME_DIR .. "src/mame/includes/namcos2.h",
25562090   MAME_DIR .. "src/mame/machine/namcos2.cpp",
25572091   MAME_DIR .. "src/mame/video/namcos2.cpp",
25582092   MAME_DIR .. "src/mame/drivers/namcos21.cpp",
2559   MAME_DIR .. "src/mame/includes/namcos21.h",
25602093   MAME_DIR .. "src/mame/video/namcos21.cpp",
25612094   MAME_DIR .. "src/mame/drivers/namcos22.cpp",
2562   MAME_DIR .. "src/mame/includes/namcos22.h",
25632095   MAME_DIR .. "src/mame/video/namcos22.cpp",
25642096   MAME_DIR .. "src/mame/drivers/namcos23.cpp",
25652097   MAME_DIR .. "src/mame/drivers/namcos86.cpp",
2566   MAME_DIR .. "src/mame/includes/namcos86.h",
25672098   MAME_DIR .. "src/mame/video/namcos86.cpp",
25682099   MAME_DIR .. "src/mame/drivers/pacland.cpp",
2569   MAME_DIR .. "src/mame/includes/pacland.h",
25702100   MAME_DIR .. "src/mame/video/pacland.cpp",
25712101   MAME_DIR .. "src/mame/drivers/polepos.cpp",
2572   MAME_DIR .. "src/mame/includes/polepos.h",
25732102   MAME_DIR .. "src/mame/audio/polepos.cpp",
25742103   MAME_DIR .. "src/mame/video/polepos.cpp",
25752104   MAME_DIR .. "src/mame/drivers/rallyx.cpp",
2576   MAME_DIR .. "src/mame/includes/rallyx.h",
25772105   MAME_DIR .. "src/mame/video/rallyx.cpp",
25782106   MAME_DIR .. "src/mame/drivers/skykid.cpp",
2579   MAME_DIR .. "src/mame/includes/skykid.h",
25802107   MAME_DIR .. "src/mame/video/skykid.cpp",
25812108   MAME_DIR .. "src/mame/drivers/tankbatt.cpp",
2582   MAME_DIR .. "src/mame/includes/tankbatt.h",
25832109   MAME_DIR .. "src/mame/video/tankbatt.cpp",
25842110   MAME_DIR .. "src/mame/drivers/tceptor.cpp",
2585   MAME_DIR .. "src/mame/includes/tceptor.h",
25862111   MAME_DIR .. "src/mame/video/tceptor.cpp",
25872112   MAME_DIR .. "src/mame/drivers/toypop.cpp",
2588   MAME_DIR .. "src/mame/includes/toypop.h",
25892113   MAME_DIR .. "src/mame/video/toypop.cpp",
25902114   MAME_DIR .. "src/mame/drivers/turrett.cpp",
2591   MAME_DIR .. "src/mame/includes/turrett.h",
25922115   MAME_DIR .. "src/mame/audio/turrett.cpp",
25932116   MAME_DIR .. "src/mame/video/turrett.cpp",
25942117   MAME_DIR .. "src/mame/drivers/warpwarp.cpp",
2595   MAME_DIR .. "src/mame/includes/warpwarp.h",
25962118   MAME_DIR .. "src/mame/audio/geebee.cpp",
25972119   MAME_DIR .. "src/mame/audio/warpwarp.cpp",
2598   MAME_DIR .. "src/mame/audio/warpwarp.h",
25992120   MAME_DIR .. "src/mame/video/warpwarp.cpp",
26002121   MAME_DIR .. "src/mame/machine/c117.cpp",
2601   MAME_DIR .. "src/mame/machine/c117.h",
26022122   MAME_DIR .. "src/mame/machine/namcoio.cpp",
2603   MAME_DIR .. "src/mame/machine/namcoio.h",
26042123   MAME_DIR .. "src/mame/machine/namco06.cpp",
2605   MAME_DIR .. "src/mame/machine/namco06.h",
26062124   MAME_DIR .. "src/mame/machine/namco50.cpp",
2607   MAME_DIR .. "src/mame/machine/namco50.h",
26082125   MAME_DIR .. "src/mame/machine/namco51.cpp",
2609   MAME_DIR .. "src/mame/machine/namco51.h",
26102126   MAME_DIR .. "src/mame/machine/namco53.cpp",
2611   MAME_DIR .. "src/mame/machine/namco53.h",
26122127   MAME_DIR .. "src/mame/machine/namco62.cpp",
2613   MAME_DIR .. "src/mame/machine/namco62.h",
26142128   MAME_DIR .. "src/mame/machine/namcomcu.cpp",
2615   MAME_DIR .. "src/mame/machine/namcomcu.h",
26162129   MAME_DIR .. "src/mame/audio/namco52.cpp",
2617   MAME_DIR .. "src/mame/audio/namco52.h",
26182130   MAME_DIR .. "src/mame/audio/namco54.cpp",
2619   MAME_DIR .. "src/mame/audio/namco54.h",
26202131   MAME_DIR .. "src/mame/video/c116.cpp",
2621   MAME_DIR .. "src/mame/video/c116.h",
26222132   MAME_DIR .. "src/mame/video/c45.cpp",
2623   MAME_DIR .. "src/mame/video/c45.h",
26242133}
26252134
26262135createMAMEProjects(_target, _subtarget, "nasco")
26272136files {
26282137   MAME_DIR .. "src/mame/drivers/crgolf.cpp",
2629   MAME_DIR .. "src/mame/includes/crgolf.h",
26302138   MAME_DIR .. "src/mame/video/crgolf.cpp",
26312139   MAME_DIR .. "src/mame/drivers/suprgolf.cpp",
26322140}
r250222r250223
26342142createMAMEProjects(_target, _subtarget, "neogeo")
26352143files {
26362144   MAME_DIR .. "src/mame/drivers/neogeo.cpp",
2637   MAME_DIR .. "src/mame/includes/neogeo.h",
26382145   MAME_DIR .. "src/mame/video/neogeo.cpp",
26392146   MAME_DIR .. "src/mame/drivers/neogeo_noslot.cpp",
26402147   MAME_DIR .. "src/mame/video/neogeo_spr.cpp",
2641   MAME_DIR .. "src/mame/video/neogeo_spr.h",
26422148   MAME_DIR .. "src/mame/machine/neocrypt.cpp",
26432149   MAME_DIR .. "src/mame/machine/ng_memcard.cpp",
2644   MAME_DIR .. "src/mame/machine/ng_memcard.h",
26452150}
26462151
26472152createMAMEProjects(_target, _subtarget, "nichibut")
26482153files {
26492154   MAME_DIR .. "src/mame/drivers/armedf.cpp",
2650   MAME_DIR .. "src/mame/includes/armedf.h",
26512155   MAME_DIR .. "src/mame/video/armedf.cpp",
26522156   MAME_DIR .. "src/mame/drivers/cclimber.cpp",
2653   MAME_DIR .. "src/mame/includes/cclimber.h",
26542157   MAME_DIR .. "src/mame/machine/cclimber.cpp",
26552158   MAME_DIR .. "src/mame/audio/cclimber.cpp",
2656   MAME_DIR .. "src/mame/audio/cclimber.h",
26572159   MAME_DIR .. "src/mame/video/cclimber.cpp",
26582160   MAME_DIR .. "src/mame/drivers/clshroad.cpp",
2659   MAME_DIR .. "src/mame/includes/clshroad.h",
26602161   MAME_DIR .. "src/mame/video/clshroad.cpp",
26612162   MAME_DIR .. "src/mame/drivers/csplayh5.cpp",
26622163   MAME_DIR .. "src/mame/drivers/cop01.cpp",
2663   MAME_DIR .. "src/mame/includes/cop01.h",
26642164   MAME_DIR .. "src/mame/video/cop01.cpp",
26652165   MAME_DIR .. "src/mame/drivers/dacholer.cpp",
26662166   MAME_DIR .. "src/mame/drivers/galivan.cpp",
2667   MAME_DIR .. "src/mame/includes/galivan.h",
26682167   MAME_DIR .. "src/mame/video/galivan.cpp",
26692168   MAME_DIR .. "src/mame/drivers/gomoku.cpp",
2670   MAME_DIR .. "src/mame/includes/gomoku.h",
26712169   MAME_DIR .. "src/mame/audio/gomoku.cpp",
26722170   MAME_DIR .. "src/mame/video/gomoku.cpp",
26732171   MAME_DIR .. "src/mame/drivers/hyhoo.cpp",
2674   MAME_DIR .. "src/mame/includes/hyhoo.h",
26752172   MAME_DIR .. "src/mame/video/hyhoo.cpp",
26762173   MAME_DIR .. "src/mame/drivers/jangou.cpp",
26772174   MAME_DIR .. "src/mame/drivers/magmax.cpp",
2678   MAME_DIR .. "src/mame/includes/magmax.h",
26792175   MAME_DIR .. "src/mame/video/magmax.cpp",
26802176   MAME_DIR .. "src/mame/drivers/nbmj8688.cpp",
2681   MAME_DIR .. "src/mame/includes/nbmj8688.h",
26822177   MAME_DIR .. "src/mame/video/nbmj8688.cpp",
26832178   MAME_DIR .. "src/mame/drivers/nbmj8891.cpp",
2684   MAME_DIR .. "src/mame/includes/nbmj8891.h",
26852179   MAME_DIR .. "src/mame/video/nbmj8891.cpp",
26862180   MAME_DIR .. "src/mame/drivers/nbmj8900.cpp",
2687   MAME_DIR .. "src/mame/includes/nbmj8900.h",
26882181   MAME_DIR .. "src/mame/video/nbmj8900.cpp",
26892182   MAME_DIR .. "src/mame/drivers/nbmj8991.cpp",
2690   MAME_DIR .. "src/mame/includes/nbmj8991.h",
26912183   MAME_DIR .. "src/mame/video/nbmj8991.cpp",
26922184   MAME_DIR .. "src/mame/drivers/nbmj9195.cpp",
2693   MAME_DIR .. "src/mame/includes/nbmj9195.h",
26942185   MAME_DIR .. "src/mame/video/nbmj9195.cpp",
26952186   MAME_DIR .. "src/mame/drivers/nightgal.cpp",
26962187   MAME_DIR .. "src/mame/drivers/niyanpai.cpp",
2697   MAME_DIR .. "src/mame/includes/niyanpai.h",
26982188   MAME_DIR .. "src/mame/video/niyanpai.cpp",
26992189   MAME_DIR .. "src/mame/drivers/pastelg.cpp",
2700   MAME_DIR .. "src/mame/includes/pastelg.h",
27012190   MAME_DIR .. "src/mame/video/pastelg.cpp",
27022191   MAME_DIR .. "src/mame/drivers/seicross.cpp",
2703   MAME_DIR .. "src/mame/includes/seicross.h",
27042192   MAME_DIR .. "src/mame/video/seicross.cpp",
27052193   MAME_DIR .. "src/mame/drivers/terracre.cpp",
2706   MAME_DIR .. "src/mame/includes/terracre.h",
27072194   MAME_DIR .. "src/mame/video/terracre.cpp",
27082195   MAME_DIR .. "src/mame/drivers/tubep.cpp",
2709   MAME_DIR .. "src/mame/includes/tubep.h",
27102196   MAME_DIR .. "src/mame/video/tubep.cpp",
27112197   MAME_DIR .. "src/mame/drivers/wiping.cpp",
2712   MAME_DIR .. "src/mame/includes/wiping.h",
27132198   MAME_DIR .. "src/mame/audio/wiping.cpp",
2714   MAME_DIR .. "src/mame/audio/wiping.h",
27152199   MAME_DIR .. "src/mame/video/wiping.cpp",
27162200   MAME_DIR .. "src/mame/machine/nb1413m3.cpp",
2717   MAME_DIR .. "src/mame/includes/nb1413m3.h",
27182201   MAME_DIR .. "src/mame/machine/nb1414m4.cpp",
2719   MAME_DIR .. "src/mame/includes/nb1414m4.h",
27202202}
27212203
27222204createMAMEProjects(_target, _subtarget, "nintendo")
27232205files {
27242206   MAME_DIR .. "src/mame/drivers/cham24.cpp",
27252207   MAME_DIR .. "src/mame/drivers/dkong.cpp",
2726   MAME_DIR .. "src/mame/includes/dkong.h",
27272208   MAME_DIR .. "src/mame/audio/dkong.cpp",
27282209   MAME_DIR .. "src/mame/video/dkong.cpp",
27292210   MAME_DIR .. "src/mame/drivers/mario.cpp",
2730   MAME_DIR .. "src/mame/includes/mario.h",
27312211   MAME_DIR .. "src/mame/audio/mario.cpp",
27322212   MAME_DIR .. "src/mame/video/mario.cpp",
27332213   MAME_DIR .. "src/mame/drivers/mmagic.cpp",
27342214   MAME_DIR .. "src/mame/drivers/multigam.cpp",
27352215   MAME_DIR .. "src/mame/drivers/n8080.cpp",
2736   MAME_DIR .. "src/mame/includes/n8080.h",
27372216   MAME_DIR .. "src/mame/audio/n8080.cpp",
27382217   MAME_DIR .. "src/mame/video/n8080.cpp",
27392218   MAME_DIR .. "src/mame/drivers/nss.cpp",
27402219   MAME_DIR .. "src/mame/machine/snes.cpp",
27412220   MAME_DIR .. "src/mame/audio/snes_snd.cpp",
2742   MAME_DIR .. "src/mame/audio/snes_snd.h",
27432221   MAME_DIR .. "src/mame/drivers/playch10.cpp",
2744   MAME_DIR .. "src/mame/includes/playch10.h",
27452222   MAME_DIR .. "src/mame/machine/playch10.cpp",
27462223   MAME_DIR .. "src/mame/video/playch10.cpp",
27472224   MAME_DIR .. "src/mame/drivers/popeye.cpp",
2748   MAME_DIR .. "src/mame/includes/popeye.h",
27492225   MAME_DIR .. "src/mame/video/popeye.cpp",
27502226   MAME_DIR .. "src/mame/drivers/punchout.cpp",
2751   MAME_DIR .. "src/mame/includes/punchout.h",
27522227   MAME_DIR .. "src/mame/video/punchout.cpp",
27532228   MAME_DIR .. "src/mame/drivers/famibox.cpp",
27542229   MAME_DIR .. "src/mame/drivers/sfcbox.cpp",
27552230   MAME_DIR .. "src/mame/drivers/snesb.cpp",
27562231   MAME_DIR .. "src/mame/drivers/spacefb.cpp",
2757   MAME_DIR .. "src/mame/includes/spacefb.h",
27582232   MAME_DIR .. "src/mame/audio/spacefb.cpp",
27592233   MAME_DIR .. "src/mame/video/spacefb.cpp",
27602234   MAME_DIR .. "src/mame/drivers/vsnes.cpp",
2761   MAME_DIR .. "src/mame/includes/vsnes.h",
27622235   MAME_DIR .. "src/mame/machine/vsnes.cpp",
27632236   MAME_DIR .. "src/mame/video/vsnes.cpp",
27642237   MAME_DIR .. "src/mame/video/ppu2c0x.cpp",
2765   MAME_DIR .. "src/mame/video/ppu2c0x.h",
27662238
27672239
27682240}
r250222r250223
27702242createMAMEProjects(_target, _subtarget, "nix")
27712243files {
27722244   MAME_DIR .. "src/mame/drivers/fitfight.cpp",
2773   MAME_DIR .. "src/mame/includes/fitfight.h",
27742245   MAME_DIR .. "src/mame/video/fitfight.cpp",
27752246   MAME_DIR .. "src/mame/drivers/pirates.cpp",
2776   MAME_DIR .. "src/mame/includes/pirates.h",
27772247   MAME_DIR .. "src/mame/video/pirates.cpp",
27782248}
27792249
r250222r250223
27842254   MAME_DIR .. "src/mame/drivers/ddealer.cpp",
27852255   MAME_DIR .. "src/mame/drivers/jalmah.cpp",
27862256   MAME_DIR .. "src/mame/drivers/macrossp.cpp",
2787   MAME_DIR .. "src/mame/includes/macrossp.h",
27882257   MAME_DIR .. "src/mame/video/macrossp.cpp",
27892258   MAME_DIR .. "src/mame/drivers/nmk16.cpp",
2790   MAME_DIR .. "src/mame/includes/nmk16.h",
27912259   MAME_DIR .. "src/mame/machine/nmk004.cpp",
2792   MAME_DIR .. "src/mame/machine/nmk004.h",
27932260   MAME_DIR .. "src/mame/video/nmk16.cpp",
27942261   MAME_DIR .. "src/mame/drivers/quizdna.cpp",
2795   MAME_DIR .. "src/mame/includes/quizdna.h",
27962262   MAME_DIR .. "src/mame/video/quizdna.cpp",
27972263   MAME_DIR .. "src/mame/drivers/quizpani.cpp",
2798   MAME_DIR .. "src/mame/includes/quizpani.h",
27992264   MAME_DIR .. "src/mame/video/quizpani.cpp",
28002265}
28012266
28022267createMAMEProjects(_target, _subtarget, "olympia")
28032268files {
28042269   MAME_DIR .. "src/mame/drivers/dday.cpp",
2805   MAME_DIR .. "src/mame/includes/dday.h",
28062270   MAME_DIR .. "src/mame/video/dday.cpp",
28072271   MAME_DIR .. "src/mame/drivers/lbeach.cpp",
28082272   MAME_DIR .. "src/mame/drivers/monzagp.cpp",
28092273   MAME_DIR .. "src/mame/drivers/portrait.cpp",
2810   MAME_DIR .. "src/mame/includes/portrait.h",
28112274   MAME_DIR .. "src/mame/video/portrait.cpp",
28122275   MAME_DIR .. "src/mame/drivers/vega.cpp",
28132276}
r250222r250223
28152278createMAMEProjects(_target, _subtarget, "omori")
28162279files {
28172280   MAME_DIR .. "src/mame/drivers/battlex.cpp",
2818   MAME_DIR .. "src/mame/includes/battlex.h",
28192281   MAME_DIR .. "src/mame/video/battlex.cpp",
28202282   MAME_DIR .. "src/mame/drivers/carjmbre.cpp",
2821   MAME_DIR .. "src/mame/includes/carjmbre.h",
28222283   MAME_DIR .. "src/mame/video/carjmbre.cpp",
28232284   MAME_DIR .. "src/mame/drivers/popper.cpp",
2824   MAME_DIR .. "src/mame/includes/popper.h",
28252285   MAME_DIR .. "src/mame/video/popper.cpp",
28262286   MAME_DIR .. "src/mame/drivers/spaceg.cpp",
28272287}
r250222r250223
28292289createMAMEProjects(_target, _subtarget, "orca")
28302290files {
28312291   MAME_DIR .. "src/mame/drivers/espial.cpp",
2832   MAME_DIR .. "src/mame/includes/espial.h",
28332292   MAME_DIR .. "src/mame/video/espial.cpp",
28342293   MAME_DIR .. "src/mame/drivers/funkybee.cpp",
2835   MAME_DIR .. "src/mame/includes/funkybee.h",
28362294   MAME_DIR .. "src/mame/video/funkybee.cpp",
28372295   MAME_DIR .. "src/mame/drivers/marineb.cpp",
2838   MAME_DIR .. "src/mame/includes/marineb.h",
28392296   MAME_DIR .. "src/mame/video/marineb.cpp",
28402297   MAME_DIR .. "src/mame/drivers/vastar.cpp",
2841   MAME_DIR .. "src/mame/includes/vastar.h",
28422298   MAME_DIR .. "src/mame/video/vastar.cpp",
28432299   MAME_DIR .. "src/mame/drivers/zodiack.cpp",
2844   MAME_DIR .. "src/mame/includes/zodiack.h",
28452300   MAME_DIR .. "src/mame/video/zodiack.cpp",
28462301}
28472302
28482303createMAMEProjects(_target, _subtarget, "pacific")
28492304files {
28502305   MAME_DIR .. "src/mame/drivers/mrflea.cpp",
2851   MAME_DIR .. "src/mame/includes/mrflea.h",
28522306   MAME_DIR .. "src/mame/video/mrflea.cpp",
28532307   MAME_DIR .. "src/mame/drivers/thief.cpp",
2854   MAME_DIR .. "src/mame/includes/thief.h",
28552308   MAME_DIR .. "src/mame/video/thief.cpp",
28562309}
28572310
r250222r250223
28592312files {
28602313   MAME_DIR .. "src/mame/drivers/jrpacman.cpp",
28612314   MAME_DIR .. "src/mame/drivers/pacman.cpp",
2862   MAME_DIR .. "src/mame/includes/pacman.h",
28632315   MAME_DIR .. "src/mame/video/pacman.cpp",
28642316   MAME_DIR .. "src/mame/machine/acitya.cpp",
28652317   MAME_DIR .. "src/mame/machine/jumpshot.cpp",
r250222r250223
28752327   MAME_DIR .. "src/mame/drivers/tourvis.cpp",
28762328   MAME_DIR .. "src/mame/drivers/uapce.cpp",
28772329   MAME_DIR .. "src/mame/machine/pcecommn.cpp",
2878   MAME_DIR .. "src/mame/machine/pcecommn.h",
28792330}
28802331
28812332createMAMEProjects(_target, _subtarget, "phoenix")
28822333files {
28832334   MAME_DIR .. "src/mame/drivers/naughtyb.cpp",
2884   MAME_DIR .. "src/mame/includes/naughtyb.h",
28852335   MAME_DIR .. "src/mame/video/naughtyb.cpp",
28862336   MAME_DIR .. "src/mame/drivers/phoenix.cpp",
2887   MAME_DIR .. "src/mame/includes/phoenix.h",
28882337   MAME_DIR .. "src/mame/audio/phoenix.cpp",
28892338   MAME_DIR .. "src/mame/video/phoenix.cpp",
28902339   MAME_DIR .. "src/mame/drivers/safarir.cpp",
28912340   MAME_DIR .. "src/mame/audio/pleiads.cpp",
2892   MAME_DIR .. "src/mame/audio/pleiads.h",
28932341}
28942342
28952343createMAMEProjects(_target, _subtarget, "playmark")
28962344files {
28972345   MAME_DIR .. "src/mame/drivers/drtomy.cpp",
28982346   MAME_DIR .. "src/mame/drivers/playmark.cpp",
2899   MAME_DIR .. "src/mame/includes/playmark.h",
29002347   MAME_DIR .. "src/mame/video/playmark.cpp",
29012348   MAME_DIR .. "src/mame/drivers/powerbal.cpp",
29022349   MAME_DIR .. "src/mame/drivers/sderby.cpp",
2903   MAME_DIR .. "src/mame/includes/sderby.h",
29042350   MAME_DIR .. "src/mame/video/sderby.cpp",
29052351   MAME_DIR .. "src/mame/drivers/sslam.cpp",
2906   MAME_DIR .. "src/mame/includes/sslam.h",
29072352   MAME_DIR .. "src/mame/video/sslam.cpp",
29082353}
29092354
29102355createMAMEProjects(_target, _subtarget, "psikyo")
29112356files {
29122357   MAME_DIR .. "src/mame/drivers/psikyo.cpp",
2913   MAME_DIR .. "src/mame/includes/psikyo.h",
29142358   MAME_DIR .. "src/mame/video/psikyo.cpp",
29152359   MAME_DIR .. "src/mame/drivers/psikyo4.cpp",
2916   MAME_DIR .. "src/mame/includes/psikyo4.h",
29172360   MAME_DIR .. "src/mame/video/psikyo4.cpp",
29182361   MAME_DIR .. "src/mame/drivers/psikyosh.cpp",
2919   MAME_DIR .. "src/mame/includes/psikyosh.h",
29202362   MAME_DIR .. "src/mame/video/psikyosh.cpp",
29212363}
29222364
29232365createMAMEProjects(_target, _subtarget, "ramtek")
29242366files {
29252367   MAME_DIR .. "src/mame/drivers/hitme.cpp",
2926   MAME_DIR .. "src/mame/includes/hitme.h",
29272368   MAME_DIR .. "src/mame/audio/hitme.cpp",
29282369   MAME_DIR .. "src/mame/drivers/ramtek.cpp",
29292370   MAME_DIR .. "src/mame/drivers/starcrus.cpp",
2930   MAME_DIR .. "src/mame/includes/starcrus.h",
29312371   MAME_DIR .. "src/mame/video/starcrus.cpp",
29322372}
29332373
29342374createMAMEProjects(_target, _subtarget, "rare")
29352375files {
29362376   MAME_DIR .. "src/mame/drivers/btoads.cpp",
2937   MAME_DIR .. "src/mame/includes/btoads.h",
29382377   MAME_DIR .. "src/mame/video/btoads.cpp",
29392378   MAME_DIR .. "src/mame/drivers/kinst.cpp",
29402379   MAME_DIR .. "src/mame/drivers/xtheball.cpp",
r250222r250223
29432382createMAMEProjects(_target, _subtarget, "sanritsu")
29442383files {
29452384   MAME_DIR .. "src/mame/drivers/appoooh.cpp",
2946   MAME_DIR .. "src/mame/includes/appoooh.h",
29472385   MAME_DIR .. "src/mame/video/appoooh.cpp",
29482386   MAME_DIR .. "src/mame/drivers/bankp.cpp",
2949   MAME_DIR .. "src/mame/includes/bankp.h",
29502387   MAME_DIR .. "src/mame/video/bankp.cpp",
29512388   MAME_DIR .. "src/mame/drivers/chinsan.cpp",
29522389   MAME_DIR .. "src/mame/drivers/drmicro.cpp",
2953   MAME_DIR .. "src/mame/includes/drmicro.h",
29542390   MAME_DIR .. "src/mame/video/drmicro.cpp",
29552391   MAME_DIR .. "src/mame/drivers/jantotsu.cpp",
29562392   MAME_DIR .. "src/mame/drivers/mayumi.cpp",
29572393   MAME_DIR .. "src/mame/drivers/mermaid.cpp",
2958   MAME_DIR .. "src/mame/includes/mermaid.h",
29592394   MAME_DIR .. "src/mame/video/mermaid.cpp",
29602395   MAME_DIR .. "src/mame/drivers/mjkjidai.cpp",
2961   MAME_DIR .. "src/mame/includes/mjkjidai.h",
29622396   MAME_DIR .. "src/mame/video/mjkjidai.cpp",
29632397}
29642398
29652399createMAMEProjects(_target, _subtarget, "sega")
29662400files {
29672401   MAME_DIR .. "src/mame/drivers/angelkds.cpp",
2968   MAME_DIR .. "src/mame/includes/angelkds.h",
29692402   MAME_DIR .. "src/mame/video/angelkds.cpp",
29702403   MAME_DIR .. "src/mame/drivers/bingoc.cpp",
29712404   MAME_DIR .. "src/mame/drivers/blockade.cpp",
2972   MAME_DIR .. "src/mame/includes/blockade.h",
29732405   MAME_DIR .. "src/mame/audio/blockade.cpp",
29742406   MAME_DIR .. "src/mame/video/blockade.cpp",
29752407   MAME_DIR .. "src/mame/drivers/calorie.cpp",
29762408   MAME_DIR .. "src/mame/drivers/chihiro.cpp",
2977   MAME_DIR .. "src/mame/includes/chihiro.h",
29782409   MAME_DIR .. "src/mame/video/chihiro.cpp",
29792410   MAME_DIR .. "src/mame/drivers/coolridr.cpp",
29802411   MAME_DIR .. "src/mame/drivers/deniam.cpp",
2981   MAME_DIR .. "src/mame/includes/deniam.h",
29822412   MAME_DIR .. "src/mame/video/deniam.cpp",
29832413   MAME_DIR .. "src/mame/drivers/dotrikun.cpp",
29842414   MAME_DIR .. "src/mame/drivers/gpworld.cpp",
29852415   MAME_DIR .. "src/mame/drivers/hikaru.cpp",
29862416   MAME_DIR .. "src/mame/drivers/hshavoc.cpp",
29872417   MAME_DIR .. "src/mame/drivers/kopunch.cpp",
2988   MAME_DIR .. "src/mame/includes/kopunch.h",
29892418   MAME_DIR .. "src/mame/video/kopunch.cpp",
29902419   MAME_DIR .. "src/mame/drivers/lindbergh.cpp",
29912420   MAME_DIR .. "src/mame/machine/segabb.cpp",
2992   MAME_DIR .. "src/mame/machine/segabb.h",
29932421   MAME_DIR .. "src/mame/machine/megadriv.cpp",
2994   MAME_DIR .. "src/mame/includes/md_cons.h",
29952422   MAME_DIR .. "src/mame/drivers/megadrvb.cpp",
29962423   MAME_DIR .. "src/mame/drivers/megaplay.cpp",
29972424   MAME_DIR .. "src/mame/drivers/megatech.cpp",
29982425   MAME_DIR .. "src/mame/drivers/model1.cpp",
2999   MAME_DIR .. "src/mame/includes/model1.h",
30002426   MAME_DIR .. "src/mame/machine/model1.cpp",
30012427   MAME_DIR .. "src/mame/video/model1.cpp",
30022428   MAME_DIR .. "src/mame/machine/s32comm.cpp",
3003   MAME_DIR .. "src/mame/machine/s32comm.h",
30042429   MAME_DIR .. "src/mame/machine/m1comm.cpp",
3005   MAME_DIR .. "src/mame/machine/m1comm.h",
30062430   MAME_DIR .. "src/mame/audio/dsbz80.cpp",
3007   MAME_DIR .. "src/mame/audio/dsbz80.h",
30082431   MAME_DIR .. "src/mame/drivers/model2.cpp",
3009   MAME_DIR .. "src/mame/includes/model2.h",
3010   MAME_DIR .. "src/mame/video/model2rd.inc",
30112432   MAME_DIR .. "src/mame/video/model2.cpp",
30122433   MAME_DIR .. "src/mame/drivers/model3.cpp",
3013   MAME_DIR .. "src/mame/includes/model3.h",
30142434   MAME_DIR .. "src/mame/video/model3.cpp",
30152435   MAME_DIR .. "src/mame/machine/model3.cpp",
30162436   MAME_DIR .. "src/mame/drivers/monacogp.cpp",
30172437   MAME_DIR .. "src/mame/drivers/naomi.cpp",
3018   MAME_DIR .. "src/mame/includes/naomi.h",
3019   MAME_DIR .. "src/mame/includes/dc.h",
30202438   MAME_DIR .. "src/mame/drivers/segasp.cpp",
3021   MAME_DIR .. "src/mame/includes/segasp.h",
30222439   MAME_DIR .. "src/mame/machine/dc.cpp",
30232440   MAME_DIR .. "src/mame/video/powervr2.cpp",
3024   MAME_DIR .. "src/mame/video/powervr2.h",
30252441   MAME_DIR .. "src/mame/machine/naomi.cpp",
30262442   MAME_DIR .. "src/mame/machine/naomig1.cpp",
3027   MAME_DIR .. "src/mame/machine/naomig1.h",
30282443   MAME_DIR .. "src/mame/machine/naomibd.cpp",
3029   MAME_DIR .. "src/mame/machine/naomibd.h",
30302444   MAME_DIR .. "src/mame/machine/naomirom.cpp",
3031   MAME_DIR .. "src/mame/machine/naomirom.h",
30322445   MAME_DIR .. "src/mame/machine/naomigd.cpp",
3033   MAME_DIR .. "src/mame/machine/naomigd.h",
30342446   MAME_DIR .. "src/mame/machine/naomim1.cpp",
3035   MAME_DIR .. "src/mame/machine/naomim1.h",
30362447   MAME_DIR .. "src/mame/machine/naomim2.cpp",
3037   MAME_DIR .. "src/mame/machine/naomim2.h",
30382448   MAME_DIR .. "src/mame/machine/naomim4.cpp",
3039   MAME_DIR .. "src/mame/machine/naomim4.h",
30402449   MAME_DIR .. "src/mame/machine/315-5881_crypt.cpp",
3041   MAME_DIR .. "src/mame/machine/315-5881_crypt.h",
30422450   MAME_DIR .. "src/mame/machine/awboard.cpp",
3043   MAME_DIR .. "src/mame/machine/awboard.h",
30442451   MAME_DIR .. "src/mame/machine/mie.cpp",
3045   MAME_DIR .. "src/mame/machine/mie.h",
30462452   MAME_DIR .. "src/mame/machine/maple-dc.cpp",
3047   MAME_DIR .. "src/mame/machine/maple-dc.h",
30482453   MAME_DIR .. "src/mame/machine/mapledev.cpp",
3049   MAME_DIR .. "src/mame/machine/mapledev.h",
30502454   MAME_DIR .. "src/mame/machine/dc-ctrl.cpp",
3051   MAME_DIR .. "src/mame/machine/dc-ctrl.h",
30522455   MAME_DIR .. "src/mame/machine/jvs13551.cpp",
3053   MAME_DIR .. "src/mame/machine/jvs13551.h",
30542456   MAME_DIR .. "src/mame/drivers/triforce.cpp",
30552457   MAME_DIR .. "src/mame/drivers/puckpkmn.cpp",
30562458   MAME_DIR .. "src/mame/drivers/segac2.cpp",
r250222r250223
30582460   MAME_DIR .. "src/mame/drivers/shtzone.cpp",
30592461   MAME_DIR .. "src/mame/drivers/segacoin.cpp",
30602462   MAME_DIR .. "src/mame/drivers/segag80r.cpp",
3061   MAME_DIR .. "src/mame/includes/segag80r.h",
30622463   MAME_DIR .. "src/mame/machine/segag80.cpp",
3063   MAME_DIR .. "src/mame/machine/segag80.h",
30642464   MAME_DIR .. "src/mame/audio/segag80r.cpp",
30652465   MAME_DIR .. "src/mame/video/segag80r.cpp",
30662466   MAME_DIR .. "src/mame/drivers/segag80v.cpp",
3067   MAME_DIR .. "src/mame/includes/segag80v.h",
30682467   MAME_DIR .. "src/mame/audio/segag80v.cpp",
30692468   MAME_DIR .. "src/mame/video/segag80v.cpp",
30702469   MAME_DIR .. "src/mame/drivers/segahang.cpp",
3071   MAME_DIR .. "src/mame/includes/segahang.h",
30722470   MAME_DIR .. "src/mame/video/segahang.cpp",
30732471   MAME_DIR .. "src/mame/drivers/segajw.cpp",
30742472   MAME_DIR .. "src/mame/drivers/segald.cpp",
30752473   MAME_DIR .. "src/mame/drivers/segaorun.cpp",
3076   MAME_DIR .. "src/mame/includes/segaorun.h",
30772474   MAME_DIR .. "src/mame/video/segaorun.cpp",
30782475   MAME_DIR .. "src/mame/drivers/segas16a.cpp",
3079   MAME_DIR .. "src/mame/includes/segas16a.h",
30802476   MAME_DIR .. "src/mame/video/segas16a.cpp",
30812477   MAME_DIR .. "src/mame/drivers/segas16b.cpp",
3082   MAME_DIR .. "src/mame/includes/segas16b.h",
30832478   MAME_DIR .. "src/mame/video/segas16b.cpp",
30842479   MAME_DIR .. "src/mame/drivers/segas18.cpp",
3085   MAME_DIR .. "src/mame/includes/segas18.h",
30862480   MAME_DIR .. "src/mame/video/segas18.cpp",
30872481   MAME_DIR .. "src/mame/drivers/segas24.cpp",
3088   MAME_DIR .. "src/mame/includes/segas24.h",
30892482   MAME_DIR .. "src/mame/video/segas24.cpp",
30902483   MAME_DIR .. "src/mame/drivers/segam1.cpp",
30912484   MAME_DIR .. "src/mame/drivers/segas32.cpp",
3092   MAME_DIR .. "src/mame/includes/segas32.h",
30932485   MAME_DIR .. "src/mame/machine/segas32.cpp",
30942486   MAME_DIR .. "src/mame/video/segas32.cpp",
30952487   MAME_DIR .. "src/mame/drivers/segaufo.cpp",
30962488   MAME_DIR .. "src/mame/drivers/segaxbd.cpp",
3097   MAME_DIR .. "src/mame/includes/segaxbd.h",
30982489   MAME_DIR .. "src/mame/video/segaxbd.cpp",
30992490   MAME_DIR .. "src/mame/drivers/segaybd.cpp",
3100   MAME_DIR .. "src/mame/includes/segaybd.h",
31012491   MAME_DIR .. "src/mame/video/segaybd.cpp",
3102   MAME_DIR .. "src/mame/includes/segaipt.h",
31032492   MAME_DIR .. "src/mame/drivers/sg1000a.cpp",
31042493   MAME_DIR .. "src/mame/drivers/stactics.cpp",
3105   MAME_DIR .. "src/mame/includes/stactics.h",
31062494   MAME_DIR .. "src/mame/video/stactics.cpp",
31072495   MAME_DIR .. "src/mame/drivers/stv.cpp",
3108   MAME_DIR .. "src/mame/includes/stv.h",
31092496   MAME_DIR .. "src/mame/machine/stvprot.cpp",
31102497   MAME_DIR .. "src/mame/machine/315-5838_317-0229_comp.cpp",
3111   MAME_DIR .. "src/mame/machine/315-5838_317-0229_comp.h",
31122498   MAME_DIR .. "src/mame/drivers/suprloco.cpp",
3113   MAME_DIR .. "src/mame/includes/suprloco.h",
31142499   MAME_DIR .. "src/mame/video/suprloco.cpp",
31152500   MAME_DIR .. "src/mame/drivers/system1.cpp",
3116   MAME_DIR .. "src/mame/includes/system1.h",
31172501   MAME_DIR .. "src/mame/video/system1.cpp",
31182502   MAME_DIR .. "src/mame/drivers/system16.cpp",
3119   MAME_DIR .. "src/mame/includes/system16.h",
31202503   MAME_DIR .. "src/mame/video/system16.cpp",
31212504   MAME_DIR .. "src/mame/drivers/timetrv.cpp",
31222505   MAME_DIR .. "src/mame/drivers/turbo.cpp",
3123   MAME_DIR .. "src/mame/includes/turbo.h",
31242506   MAME_DIR .. "src/mame/audio/turbo.cpp",
31252507   MAME_DIR .. "src/mame/video/turbo.cpp",
31262508   MAME_DIR .. "src/mame/drivers/vicdual.cpp",
3127   MAME_DIR .. "src/mame/includes/vicdual.h",
31282509   MAME_DIR .. "src/mame/audio/vicdual.cpp",
31292510   MAME_DIR .. "src/mame/video/vicdual.cpp",
31302511   MAME_DIR .. "src/mame/audio/carnival.cpp",
r250222r250223
31322513   MAME_DIR .. "src/mame/audio/invinco.cpp",
31332514   MAME_DIR .. "src/mame/audio/pulsar.cpp",
31342515   MAME_DIR .. "src/mame/drivers/zaxxon.cpp",
3135   MAME_DIR .. "src/mame/includes/zaxxon.h",
31362516   MAME_DIR .. "src/mame/audio/zaxxon.cpp",
31372517   MAME_DIR .. "src/mame/video/zaxxon.cpp",
31382518   MAME_DIR .. "src/mame/machine/315_5296.cpp",
3139   MAME_DIR .. "src/mame/machine/315_5296.h",
31402519   MAME_DIR .. "src/mame/machine/fd1089.cpp",
3141   MAME_DIR .. "src/mame/machine/fd1089.h",
31422520   MAME_DIR .. "src/mame/machine/fd1094.cpp",
3143   MAME_DIR .. "src/mame/machine/fd1094.h",
31442521   MAME_DIR .. "src/mame/machine/fddebug.cpp",
3145   MAME_DIR .. "src/mame/machine/fddebug.h",
31462522   MAME_DIR .. "src/mame/machine/mc8123.cpp",
3147   MAME_DIR .. "src/mame/machine/mc8123.h",
31482523   MAME_DIR .. "src/mame/machine/segaic16.cpp",
3149   MAME_DIR .. "src/mame/machine/segaic16.h",
31502524   MAME_DIR .. "src/mame/audio/segasnd.cpp",
3151   MAME_DIR .. "src/mame/audio/segasnd.h",
31522525   MAME_DIR .. "src/mame/video/segaic16.cpp",
3153   MAME_DIR .. "src/mame/video/segaic16.h",
31542526   MAME_DIR .. "src/mame/video/segaic16_road.cpp",
3155   MAME_DIR .. "src/mame/video/segaic16_road.h",
31562527   MAME_DIR .. "src/mame/video/sega16sp.cpp",
3157   MAME_DIR .. "src/mame/video/sega16sp.h",
31582528   MAME_DIR .. "src/mame/video/segaic24.cpp",
3159   MAME_DIR .. "src/mame/video/segaic24.h",
31602529   MAME_DIR .. "src/mame/machine/gdrom.cpp",
3161   MAME_DIR .. "src/mame/machine/gdrom.h",
31622530   MAME_DIR .. "src/mame/machine/xbox.cpp",
31632531}
31642532
31652533createMAMEProjects(_target, _subtarget, "seibu")
31662534files {
31672535   MAME_DIR .. "src/mame/drivers/bloodbro.cpp",
3168   MAME_DIR .. "src/mame/includes/bloodbro.h",
31692536   MAME_DIR .. "src/mame/video/bloodbro.cpp",
31702537   MAME_DIR .. "src/mame/drivers/cabal.cpp",
3171   MAME_DIR .. "src/mame/includes/cabal.h",
31722538   MAME_DIR .. "src/mame/video/cabal.cpp",
31732539   MAME_DIR .. "src/mame/drivers/cshooter.cpp",
31742540   MAME_DIR .. "src/mame/drivers/dcon.cpp",
3175   MAME_DIR .. "src/mame/includes/dcon.h",
31762541   MAME_DIR .. "src/mame/video/dcon.cpp",
31772542   MAME_DIR .. "src/mame/drivers/deadang.cpp",
3178   MAME_DIR .. "src/mame/includes/deadang.h",
31792543   MAME_DIR .. "src/mame/video/deadang.cpp",
31802544   MAME_DIR .. "src/mame/drivers/dynduke.cpp",
3181   MAME_DIR .. "src/mame/includes/dynduke.h",
31822545   MAME_DIR .. "src/mame/video/dynduke.cpp",
31832546   MAME_DIR .. "src/mame/drivers/feversoc.cpp",
31842547   MAME_DIR .. "src/mame/drivers/goal92.cpp",
3185   MAME_DIR .. "src/mame/includes/goal92.h",
31862548   MAME_DIR .. "src/mame/video/goal92.cpp",
31872549   MAME_DIR .. "src/mame/drivers/goodejan.cpp",
31882550   MAME_DIR .. "src/mame/drivers/kncljoe.cpp",
3189   MAME_DIR .. "src/mame/includes/kncljoe.h",
31902551   MAME_DIR .. "src/mame/video/kncljoe.cpp",
31912552   MAME_DIR .. "src/mame/drivers/legionna.cpp",
3192   MAME_DIR .. "src/mame/includes/legionna.h",
31932553   MAME_DIR .. "src/mame/video/legionna.cpp",
31942554   MAME_DIR .. "src/mame/drivers/mustache.cpp",
3195   MAME_DIR .. "src/mame/includes/mustache.h",
31962555   MAME_DIR .. "src/mame/video/mustache.cpp",
31972556   MAME_DIR .. "src/mame/drivers/panicr.cpp",
31982557   MAME_DIR .. "src/mame/drivers/raiden.cpp",
3199   MAME_DIR .. "src/mame/includes/raiden.h",
32002558   MAME_DIR .. "src/mame/video/raiden.cpp",
32012559   MAME_DIR .. "src/mame/drivers/raiden2.cpp",
3202   MAME_DIR .. "src/mame/includes/raiden2.h",
32032560   MAME_DIR .. "src/mame/machine/r2crypt.cpp",
32042561   MAME_DIR .. "src/mame/machine/raiden2cop.cpp",
3205   MAME_DIR .. "src/mame/machine/raiden2cop.h",
32062562   MAME_DIR .. "src/mame/drivers/r2dx_v33.cpp",
32072563   MAME_DIR .. "src/mame/drivers/seibuspi.cpp",
3208   MAME_DIR .. "src/mame/includes/seibuspi.h",
32092564   MAME_DIR .. "src/mame/machine/seibuspi.cpp",
3210   MAME_DIR .. "src/mame/machine/seibuspi.h",
32112565   MAME_DIR .. "src/mame/video/seibuspi.cpp",
32122566   MAME_DIR .. "src/mame/drivers/sengokmj.cpp",
32132567   MAME_DIR .. "src/mame/drivers/stfight.cpp",
3214   MAME_DIR .. "src/mame/includes/stfight.h",
32152568   MAME_DIR .. "src/mame/machine/stfight.cpp",
32162569   MAME_DIR .. "src/mame/video/stfight.cpp",
32172570   MAME_DIR .. "src/mame/drivers/toki.cpp",
3218   MAME_DIR .. "src/mame/includes/toki.h",
32192571   MAME_DIR .. "src/mame/video/toki.cpp",
32202572   MAME_DIR .. "src/mame/drivers/wiz.cpp",
3221   MAME_DIR .. "src/mame/includes/wiz.h",
32222573   MAME_DIR .. "src/mame/video/wiz.cpp",
32232574   MAME_DIR .. "src/mame/machine/seicop.cpp",
3224   MAME_DIR .. "src/mame/machine/seicop.h",
32252575   MAME_DIR .. "src/mame/machine/spisprit.cpp",
32262576   MAME_DIR .. "src/mame/audio/seibu.cpp",
3227   MAME_DIR .. "src/mame/audio/seibu.h",
32282577   MAME_DIR .. "src/mame/video/seibu_crtc.cpp",
3229   MAME_DIR .. "src/mame/video/seibu_crtc.h",
32302578}
32312579
32322580createMAMEProjects(_target, _subtarget, "seta")
r250222r250223
32342582   MAME_DIR .. "src/mame/drivers/aleck64.cpp",
32352583   MAME_DIR .. "src/mame/machine/n64.cpp",
32362584   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",
32402585   MAME_DIR .. "src/mame/video/rdpblend.cpp",
3241   MAME_DIR .. "src/mame/video/rdpblend.h",
32422586   MAME_DIR .. "src/mame/video/rdptpipe.cpp",
3243   MAME_DIR .. "src/mame/video/rdptpipe.h",
32442587   MAME_DIR .. "src/mame/drivers/hanaawas.cpp",
3245   MAME_DIR .. "src/mame/includes/hanaawas.h",
32462588   MAME_DIR .. "src/mame/video/hanaawas.cpp",
32472589   MAME_DIR .. "src/mame/drivers/jclub2.cpp",
32482590   MAME_DIR .. "src/mame/drivers/macs.cpp",
32492591   MAME_DIR .. "src/mame/drivers/seta.cpp",
3250   MAME_DIR .. "src/mame/includes/seta.h",
32512592   MAME_DIR .. "src/mame/video/seta.cpp",
32522593   MAME_DIR .. "src/mame/drivers/seta2.cpp",
3253   MAME_DIR .. "src/mame/includes/seta2.h",
32542594   MAME_DIR .. "src/mame/video/seta2.cpp",
32552595   MAME_DIR .. "src/mame/drivers/speedatk.cpp",
3256   MAME_DIR .. "src/mame/includes/speedatk.h",
32572596   MAME_DIR .. "src/mame/video/speedatk.cpp",
32582597   MAME_DIR .. "src/mame/drivers/speglsht.cpp",
32592598   MAME_DIR .. "src/mame/drivers/srmp2.cpp",
3260   MAME_DIR .. "src/mame/includes/srmp2.h",
32612599   MAME_DIR .. "src/mame/video/srmp2.cpp",
32622600   MAME_DIR .. "src/mame/drivers/srmp5.cpp",
32632601   MAME_DIR .. "src/mame/drivers/srmp6.cpp",
32642602   MAME_DIR .. "src/mame/drivers/ssv.cpp",
3265   MAME_DIR .. "src/mame/includes/ssv.h",
32662603   MAME_DIR .. "src/mame/video/ssv.cpp",
32672604   MAME_DIR .. "src/mame/video/st0020.cpp",
3268   MAME_DIR .. "src/mame/video/st0020.h",
32692605   MAME_DIR .. "src/mame/machine/st0016.cpp",
3270   MAME_DIR .. "src/mame/machine/st0016.h",
32712606   MAME_DIR .. "src/mame/drivers/simple_st0016.cpp",
3272   MAME_DIR .. "src/mame/includes/simple_st0016.h",
32732607   MAME_DIR .. "src/mame/video/seta001.cpp",
3274   MAME_DIR .. "src/mame/video/seta001.h",
32752608   MAME_DIR .. "src/mame/drivers/thedealr.cpp",
32762609}
32772610
r250222r250223
32822615   MAME_DIR .. "src/mame/drivers/sigmab52.cpp",
32832616   MAME_DIR .. "src/mame/drivers/sigmab98.cpp",
32842617   MAME_DIR .. "src/mame/drivers/spiders.cpp",
3285   MAME_DIR .. "src/mame/includes/spiders.h",
32862618   MAME_DIR .. "src/mame/audio/spiders.cpp",
32872619   MAME_DIR .. "src/mame/drivers/sub.cpp",
32882620}
r250222r250223
32902622createMAMEProjects(_target, _subtarget, "snk")
32912623files {
32922624   MAME_DIR .. "src/mame/drivers/bbusters.cpp",
3293   MAME_DIR .. "src/mame/includes/bbusters.h",
32942625   MAME_DIR .. "src/mame/video/bbusters.cpp",
32952626   MAME_DIR .. "src/mame/drivers/dmndrby.cpp",
32962627   MAME_DIR .. "src/mame/drivers/hng64.cpp",
3297   MAME_DIR .. "src/mame/includes/hng64.h",
32982628   MAME_DIR .. "src/mame/video/hng64.cpp",
32992629   MAME_DIR .. "src/mame/audio/hng64.cpp",
33002630   MAME_DIR .. "src/mame/machine/hng64_net.cpp",
33012631   MAME_DIR .. "src/mame/video/hng64_3d.cpp",
33022632   MAME_DIR .. "src/mame/video/hng64_sprite.cpp",
33032633   MAME_DIR .. "src/mame/drivers/lasso.cpp",
3304   MAME_DIR .. "src/mame/includes/lasso.h",
33052634   MAME_DIR .. "src/mame/video/lasso.cpp",
33062635   MAME_DIR .. "src/mame/drivers/mainsnk.cpp",
3307   MAME_DIR .. "src/mame/includes/mainsnk.h",
33082636   MAME_DIR .. "src/mame/video/mainsnk.cpp",
33092637   MAME_DIR .. "src/mame/drivers/munchmo.cpp",
3310   MAME_DIR .. "src/mame/includes/munchmo.h",
33112638   MAME_DIR .. "src/mame/video/munchmo.cpp",
33122639   MAME_DIR .. "src/mame/drivers/prehisle.cpp",
3313   MAME_DIR .. "src/mame/includes/prehisle.h",
33142640   MAME_DIR .. "src/mame/video/prehisle.cpp",
33152641   MAME_DIR .. "src/mame/drivers/snk6502.cpp",
3316   MAME_DIR .. "src/mame/includes/snk6502.h",
33172642   MAME_DIR .. "src/mame/audio/snk6502.cpp",
33182643   MAME_DIR .. "src/mame/video/snk6502.cpp",
33192644   MAME_DIR .. "src/mame/drivers/snk.cpp",
3320   MAME_DIR .. "src/mame/includes/snk.h",
33212645   MAME_DIR .. "src/mame/video/snk.cpp",
33222646   MAME_DIR .. "src/mame/drivers/snk68.cpp",
3323   MAME_DIR .. "src/mame/includes/snk68.h",
33242647   MAME_DIR .. "src/mame/video/snk68.cpp",
33252648}
33262649
r250222r250223
33282651files {
33292652   MAME_DIR .. "src/mame/drivers/zn.cpp",
33302653   MAME_DIR .. "src/mame/machine/zndip.cpp",
3331   MAME_DIR .. "src/mame/machine/zndip.h",
33322654   MAME_DIR .. "src/mame/machine/cat702.cpp",
3333   MAME_DIR .. "src/mame/machine/cat702.h",
33342655}
33352656
33362657createMAMEProjects(_target, _subtarget, "stern")
r250222r250223
33492670   MAME_DIR .. "src/mame/drivers/subsino.cpp",
33502671   MAME_DIR .. "src/mame/drivers/subsino2.cpp",
33512672   MAME_DIR .. "src/mame/machine/subsino.cpp",
3352   MAME_DIR .. "src/mame/machine/subsino.h",
33532673}
33542674
33552675createMAMEProjects(_target, _subtarget, "sun")
33562676files {
33572677   MAME_DIR .. "src/mame/drivers/arabian.cpp",
3358   MAME_DIR .. "src/mame/includes/arabian.h",
33592678   MAME_DIR .. "src/mame/video/arabian.cpp",
33602679   MAME_DIR .. "src/mame/drivers/dai3wksi.cpp",
33612680   MAME_DIR .. "src/mame/drivers/ikki.cpp",
3362   MAME_DIR .. "src/mame/includes/ikki.h",
33632681   MAME_DIR .. "src/mame/video/ikki.cpp",
33642682   MAME_DIR .. "src/mame/drivers/kangaroo.cpp",
3365   MAME_DIR .. "src/mame/includes/kangaroo.h",
33662683   MAME_DIR .. "src/mame/video/kangaroo.cpp",
33672684   MAME_DIR .. "src/mame/drivers/markham.cpp",
3368   MAME_DIR .. "src/mame/includes/markham.h",
33692685   MAME_DIR .. "src/mame/video/markham.cpp",
33702686   MAME_DIR .. "src/mame/drivers/route16.cpp",
3371   MAME_DIR .. "src/mame/includes/route16.h",
33722687   MAME_DIR .. "src/mame/video/route16.cpp",
33732688   MAME_DIR .. "src/mame/drivers/shanghai.cpp",
33742689   MAME_DIR .. "src/mame/drivers/shangha3.cpp",
3375   MAME_DIR .. "src/mame/includes/shangha3.h",
33762690   MAME_DIR .. "src/mame/video/shangha3.cpp",
33772691   MAME_DIR .. "src/mame/drivers/strnskil.cpp",
3378   MAME_DIR .. "src/mame/includes/strnskil.h",
33792692   MAME_DIR .. "src/mame/video/strnskil.cpp",
33802693   MAME_DIR .. "src/mame/drivers/tonton.cpp",
33812694}
r250222r250223
33842697files {
33852698   MAME_DIR .. "src/mame/drivers/go2000.cpp",
33862699   MAME_DIR .. "src/mame/drivers/goindol.cpp",
3387   MAME_DIR .. "src/mame/includes/goindol.h",
33882700   MAME_DIR .. "src/mame/video/goindol.cpp",
33892701   MAME_DIR .. "src/mame/drivers/suna8.cpp",
3390   MAME_DIR .. "src/mame/includes/suna8.h",
33912702   MAME_DIR .. "src/mame/audio/suna8.cpp",
33922703   MAME_DIR .. "src/mame/video/suna8.cpp",
33932704   MAME_DIR .. "src/mame/drivers/suna16.cpp",
3394   MAME_DIR .. "src/mame/includes/suna16.h",
33952705   MAME_DIR .. "src/mame/video/suna16.cpp",
33962706}
33972707
r250222r250223
34052715files {
34062716   MAME_DIR .. "src/mame/drivers/2mindril.cpp",
34072717   MAME_DIR .. "src/mame/drivers/40love.cpp",
3408   MAME_DIR .. "src/mame/includes/40love.h",
34092718   MAME_DIR .. "src/mame/video/40love.cpp",
34102719   MAME_DIR .. "src/mame/drivers/arkanoid.cpp",
3411   MAME_DIR .. "src/mame/includes/arkanoid.h",
34122720   MAME_DIR .. "src/mame/machine/arkanoid.cpp",
34132721   MAME_DIR .. "src/mame/video/arkanoid.cpp",
34142722   MAME_DIR .. "src/mame/drivers/ashnojoe.cpp",
3415   MAME_DIR .. "src/mame/includes/ashnojoe.h",
34162723   MAME_DIR .. "src/mame/video/ashnojoe.cpp",
34172724   MAME_DIR .. "src/mame/drivers/asuka.cpp",
3418   MAME_DIR .. "src/mame/includes/asuka.h",
34192725   MAME_DIR .. "src/mame/machine/bonzeadv.cpp",
34202726   MAME_DIR .. "src/mame/video/asuka.cpp",
34212727   MAME_DIR .. "src/mame/drivers/bigevglf.cpp",
3422   MAME_DIR .. "src/mame/includes/bigevglf.h",
34232728   MAME_DIR .. "src/mame/machine/bigevglf.cpp",
34242729   MAME_DIR .. "src/mame/video/bigevglf.cpp",
34252730   MAME_DIR .. "src/mame/drivers/bking.cpp",
3426   MAME_DIR .. "src/mame/includes/bking.h",
34272731   MAME_DIR .. "src/mame/video/bking.cpp",
34282732   MAME_DIR .. "src/mame/drivers/bublbobl.cpp",
3429   MAME_DIR .. "src/mame/includes/bublbobl.h",
34302733   MAME_DIR .. "src/mame/machine/bublbobl.cpp",
34312734   MAME_DIR .. "src/mame/video/bublbobl.cpp",
34322735   MAME_DIR .. "src/mame/drivers/buggychl.cpp",
3433   MAME_DIR .. "src/mame/includes/buggychl.h",
34342736   MAME_DIR .. "src/mame/machine/buggychl.cpp",
3435   MAME_DIR .. "src/mame/machine/buggychl.h",
34362737   MAME_DIR .. "src/mame/video/buggychl.cpp",
34372738   MAME_DIR .. "src/mame/drivers/capr1.cpp",
34382739   MAME_DIR .. "src/mame/drivers/caprcyc.cpp",
34392740   MAME_DIR .. "src/mame/drivers/cchance.cpp",
34402741   MAME_DIR .. "src/mame/drivers/chaknpop.cpp",
3441   MAME_DIR .. "src/mame/includes/chaknpop.h",
34422742   MAME_DIR .. "src/mame/machine/chaknpop.cpp",
34432743   MAME_DIR .. "src/mame/video/chaknpop.cpp",
34442744   MAME_DIR .. "src/mame/drivers/champbwl.cpp",
34452745   MAME_DIR .. "src/mame/drivers/changela.cpp",
3446   MAME_DIR .. "src/mame/includes/changela.h",
34472746   MAME_DIR .. "src/mame/video/changela.cpp",
34482747   MAME_DIR .. "src/mame/drivers/crbaloon.cpp",
3449   MAME_DIR .. "src/mame/includes/crbaloon.h",
34502748   MAME_DIR .. "src/mame/video/crbaloon.cpp",
34512749   MAME_DIR .. "src/mame/audio/crbaloon.cpp",
34522750   MAME_DIR .. "src/mame/drivers/cyclemb.cpp",
34532751   MAME_DIR .. "src/mame/drivers/darius.cpp",
3454   MAME_DIR .. "src/mame/includes/darius.h",
34552752   MAME_DIR .. "src/mame/video/darius.cpp",
34562753   MAME_DIR .. "src/mame/drivers/darkmist.cpp",
3457   MAME_DIR .. "src/mame/includes/darkmist.h",
34582754   MAME_DIR .. "src/mame/video/darkmist.cpp",
34592755   MAME_DIR .. "src/mame/drivers/exzisus.cpp",
3460   MAME_DIR .. "src/mame/includes/exzisus.h",
34612756   MAME_DIR .. "src/mame/video/exzisus.cpp",
34622757   MAME_DIR .. "src/mame/drivers/fgoal.cpp",
3463   MAME_DIR .. "src/mame/includes/fgoal.h",
34642758   MAME_DIR .. "src/mame/video/fgoal.cpp",
34652759   MAME_DIR .. "src/mame/drivers/flstory.cpp",
3466   MAME_DIR .. "src/mame/includes/flstory.h",
34672760   MAME_DIR .. "src/mame/machine/flstory.cpp",
34682761   MAME_DIR .. "src/mame/video/flstory.cpp",
34692762   MAME_DIR .. "src/mame/drivers/galastrm.cpp",
3470   MAME_DIR .. "src/mame/includes/galastrm.h",
34712763   MAME_DIR .. "src/mame/video/galastrm.cpp",
34722764   MAME_DIR .. "src/mame/drivers/gladiatr.cpp",
3473   MAME_DIR .. "src/mame/includes/gladiatr.h",
34742765   MAME_DIR .. "src/mame/video/gladiatr.cpp",
34752766   MAME_DIR .. "src/mame/drivers/grchamp.cpp",
3476   MAME_DIR .. "src/mame/includes/grchamp.h",
34772767   MAME_DIR .. "src/mame/audio/grchamp.cpp",
34782768   MAME_DIR .. "src/mame/video/grchamp.cpp",
34792769   MAME_DIR .. "src/mame/drivers/groundfx.cpp",
3480   MAME_DIR .. "src/mame/includes/groundfx.h",
34812770   MAME_DIR .. "src/mame/video/groundfx.cpp",
34822771   MAME_DIR .. "src/mame/drivers/gsword.cpp",
3483   MAME_DIR .. "src/mame/includes/gsword.h",
34842772   MAME_DIR .. "src/mame/machine/tait8741.cpp",
3485   MAME_DIR .. "src/mame/machine/tait8741.h",
34862773   MAME_DIR .. "src/mame/video/gsword.cpp",
34872774   MAME_DIR .. "src/mame/drivers/gunbustr.cpp",
3488   MAME_DIR .. "src/mame/includes/gunbustr.h",
34892775   MAME_DIR .. "src/mame/video/gunbustr.cpp",
34902776   MAME_DIR .. "src/mame/drivers/halleys.cpp",
34912777   MAME_DIR .. "src/mame/drivers/invqix.cpp",
34922778   MAME_DIR .. "src/mame/drivers/jollyjgr.cpp",
34932779   MAME_DIR .. "src/mame/drivers/ksayakyu.cpp",
3494   MAME_DIR .. "src/mame/includes/ksayakyu.h",
34952780   MAME_DIR .. "src/mame/video/ksayakyu.cpp",
34962781   MAME_DIR .. "src/mame/drivers/lgp.cpp",
34972782   MAME_DIR .. "src/mame/drivers/lkage.cpp",
3498   MAME_DIR .. "src/mame/includes/lkage.h",
34992783   MAME_DIR .. "src/mame/machine/lkage.cpp",
35002784   MAME_DIR .. "src/mame/video/lkage.cpp",
35012785   MAME_DIR .. "src/mame/drivers/lsasquad.cpp",
3502   MAME_DIR .. "src/mame/includes/lsasquad.h",
35032786   MAME_DIR .. "src/mame/machine/lsasquad.cpp",
35042787   MAME_DIR .. "src/mame/video/lsasquad.cpp",
35052788   MAME_DIR .. "src/mame/drivers/marinedt.cpp",
35062789   MAME_DIR .. "src/mame/drivers/mexico86.cpp",
3507   MAME_DIR .. "src/mame/includes/mexico86.h",
35082790   MAME_DIR .. "src/mame/machine/mexico86.cpp",
35092791   MAME_DIR .. "src/mame/video/mexico86.cpp",
35102792   MAME_DIR .. "src/mame/drivers/minivadr.cpp",
35112793   MAME_DIR .. "src/mame/drivers/missb2.cpp",
35122794   MAME_DIR .. "src/mame/drivers/mlanding.cpp",
35132795   MAME_DIR .. "src/mame/drivers/msisaac.cpp",
3514   MAME_DIR .. "src/mame/includes/msisaac.h",
35152796   MAME_DIR .. "src/mame/video/msisaac.cpp",
35162797   MAME_DIR .. "src/mame/drivers/ninjaw.cpp",
3517   MAME_DIR .. "src/mame/includes/ninjaw.h",
35182798   MAME_DIR .. "src/mame/video/ninjaw.cpp",
35192799   MAME_DIR .. "src/mame/drivers/nycaptor.cpp",
3520   MAME_DIR .. "src/mame/includes/nycaptor.h",
35212800   MAME_DIR .. "src/mame/machine/nycaptor.cpp",
35222801   MAME_DIR .. "src/mame/video/nycaptor.cpp",
35232802   MAME_DIR .. "src/mame/drivers/opwolf.cpp",
3524   MAME_DIR .. "src/mame/includes/opwolf.h",
35252803   MAME_DIR .. "src/mame/machine/opwolf.cpp",
35262804   MAME_DIR .. "src/mame/video/opwolf.cpp",
35272805   MAME_DIR .. "src/mame/drivers/othunder.cpp",
3528   MAME_DIR .. "src/mame/includes/othunder.h",
35292806   MAME_DIR .. "src/mame/video/othunder.cpp",
35302807   MAME_DIR .. "src/mame/drivers/pitnrun.cpp",
3531   MAME_DIR .. "src/mame/includes/pitnrun.h",
35322808   MAME_DIR .. "src/mame/machine/pitnrun.cpp",
35332809   MAME_DIR .. "src/mame/video/pitnrun.cpp",
35342810   MAME_DIR .. "src/mame/drivers/qix.cpp",
3535   MAME_DIR .. "src/mame/includes/qix.h",
35362811   MAME_DIR .. "src/mame/machine/qix.cpp",
35372812   MAME_DIR .. "src/mame/audio/qix.cpp",
35382813   MAME_DIR .. "src/mame/video/qix.cpp",
35392814   MAME_DIR .. "src/mame/drivers/rbisland.cpp",
3540   MAME_DIR .. "src/mame/includes/rbisland.h",
35412815   MAME_DIR .. "src/mame/machine/rbisland.cpp",
35422816   MAME_DIR .. "src/mame/video/rbisland.cpp",
35432817   MAME_DIR .. "src/mame/drivers/rastan.cpp",
3544   MAME_DIR .. "src/mame/includes/rastan.h",
35452818   MAME_DIR .. "src/mame/video/rastan.cpp",
35462819   MAME_DIR .. "src/mame/drivers/retofinv.cpp",
3547   MAME_DIR .. "src/mame/includes/retofinv.h",
35482820   MAME_DIR .. "src/mame/machine/retofinv.cpp",
35492821   MAME_DIR .. "src/mame/video/retofinv.cpp",
35502822   MAME_DIR .. "src/mame/drivers/rollrace.cpp",
3551   MAME_DIR .. "src/mame/includes/rollrace.h",
35522823   MAME_DIR .. "src/mame/video/rollrace.cpp",
35532824   MAME_DIR .. "src/mame/drivers/sbowling.cpp",
35542825   MAME_DIR .. "src/mame/drivers/slapshot.cpp",
3555   MAME_DIR .. "src/mame/includes/slapshot.h",
35562826   MAME_DIR .. "src/mame/video/slapshot.cpp",
35572827   MAME_DIR .. "src/mame/drivers/ssrj.cpp",
3558   MAME_DIR .. "src/mame/includes/ssrj.h",
35592828   MAME_DIR .. "src/mame/video/ssrj.cpp",
35602829   MAME_DIR .. "src/mame/drivers/superchs.cpp",
3561   MAME_DIR .. "src/mame/includes/superchs.h",
35622830   MAME_DIR .. "src/mame/video/superchs.cpp",
35632831   MAME_DIR .. "src/mame/drivers/superqix.cpp",
3564   MAME_DIR .. "src/mame/includes/superqix.h",
35652832   MAME_DIR .. "src/mame/video/superqix.cpp",
35662833   MAME_DIR .. "src/mame/drivers/taito_b.cpp",
3567   MAME_DIR .. "src/mame/includes/taito_b.h",
35682834   MAME_DIR .. "src/mame/video/taito_b.cpp",
3569   MAME_DIR .. "src/mame/includes/taitoipt.h",
35702835   MAME_DIR .. "src/mame/drivers/taito_f2.cpp",
3571   MAME_DIR .. "src/mame/includes/taito_f2.h",
35722836   MAME_DIR .. "src/mame/video/taito_f2.cpp",
35732837   MAME_DIR .. "src/mame/drivers/taito_f3.cpp",
3574   MAME_DIR .. "src/mame/includes/taito_f3.h",
35752838   MAME_DIR .. "src/mame/video/taito_f3.cpp",
35762839   MAME_DIR .. "src/mame/audio/taito_en.cpp",
3577   MAME_DIR .. "src/mame/audio/taito_en.h",
35782840   MAME_DIR .. "src/mame/drivers/taito_h.cpp",
3579   MAME_DIR .. "src/mame/includes/taito_h.h",
35802841   MAME_DIR .. "src/mame/video/taito_h.cpp",
35812842   MAME_DIR .. "src/mame/drivers/taito_l.cpp",
3582   MAME_DIR .. "src/mame/includes/taito_l.h",
35832843   MAME_DIR .. "src/mame/video/taito_l.cpp",
35842844   MAME_DIR .. "src/mame/drivers/taito_x.cpp",
3585   MAME_DIR .. "src/mame/includes/taito_x.h",
35862845   MAME_DIR .. "src/mame/machine/cchip.cpp",
35872846   MAME_DIR .. "src/mame/drivers/taito_z.cpp",
3588   MAME_DIR .. "src/mame/includes/taito_z.h",
35892847   MAME_DIR .. "src/mame/video/taito_z.cpp",
35902848   MAME_DIR .. "src/mame/drivers/taito_o.cpp",
3591   MAME_DIR .. "src/mame/includes/taito_o.h",
35922849   MAME_DIR .. "src/mame/video/taito_o.cpp",
35932850   MAME_DIR .. "src/mame/drivers/taitoair.cpp",
3594   MAME_DIR .. "src/mame/includes/taitoair.h",
35952851   MAME_DIR .. "src/mame/video/taitoair.cpp",
35962852   MAME_DIR .. "src/mame/drivers/taitogn.cpp",
35972853   MAME_DIR .. "src/mame/drivers/taitojc.cpp",
3598   MAME_DIR .. "src/mame/includes/taitojc.h",
35992854   MAME_DIR .. "src/mame/video/taitojc.cpp",
36002855   MAME_DIR .. "src/mame/drivers/taitopjc.cpp",
36012856   MAME_DIR .. "src/mame/drivers/taitosj.cpp",
3602   MAME_DIR .. "src/mame/includes/taitosj.h",
36032857   MAME_DIR .. "src/mame/machine/taitosj.cpp",
36042858   MAME_DIR .. "src/mame/video/taitosj.cpp",
36052859   MAME_DIR .. "src/mame/drivers/taitottl.cpp",
r250222r250223
36072861   MAME_DIR .. "src/mame/drivers/taitotx.cpp",
36082862   MAME_DIR .. "src/mame/drivers/taitowlf.cpp",
36092863   MAME_DIR .. "src/mame/drivers/tnzs.cpp",
3610   MAME_DIR .. "src/mame/includes/tnzs.h",
36112864   MAME_DIR .. "src/mame/machine/tnzs.cpp",
36122865   MAME_DIR .. "src/mame/video/tnzs.cpp",
36132866   MAME_DIR .. "src/mame/drivers/topspeed.cpp",
3614   MAME_DIR .. "src/mame/includes/topspeed.h",
36152867   MAME_DIR .. "src/mame/video/topspeed.cpp",
36162868   MAME_DIR .. "src/mame/drivers/tsamurai.cpp",
3617   MAME_DIR .. "src/mame/includes/tsamurai.h",
36182869   MAME_DIR .. "src/mame/video/tsamurai.cpp",
36192870   MAME_DIR .. "src/mame/drivers/undrfire.cpp",
3620   MAME_DIR .. "src/mame/includes/undrfire.h",
36212871   MAME_DIR .. "src/mame/video/undrfire.cpp",
36222872   MAME_DIR .. "src/mame/drivers/volfied.cpp",
3623   MAME_DIR .. "src/mame/includes/volfied.h",
36242873   MAME_DIR .. "src/mame/machine/volfied.cpp",
36252874   MAME_DIR .. "src/mame/video/volfied.cpp",
36262875   MAME_DIR .. "src/mame/drivers/warriorb.cpp",
3627   MAME_DIR .. "src/mame/includes/warriorb.h",
36282876   MAME_DIR .. "src/mame/video/warriorb.cpp",
36292877   MAME_DIR .. "src/mame/drivers/wgp.cpp",
3630   MAME_DIR .. "src/mame/includes/wgp.h",
36312878   MAME_DIR .. "src/mame/video/wgp.cpp",
36322879   MAME_DIR .. "src/mame/drivers/wyvernf0.cpp",
36332880   MAME_DIR .. "src/mame/audio/taitosnd.cpp",
3634   MAME_DIR .. "src/mame/audio/taitosnd.h",
36352881   MAME_DIR .. "src/mame/audio/taito_zm.cpp",
3636   MAME_DIR .. "src/mame/audio/taito_zm.h",
36372882   MAME_DIR .. "src/mame/audio/t5182.cpp",
3638   MAME_DIR .. "src/mame/audio/t5182.h",
36392883   MAME_DIR .. "src/mame/machine/taitoio.cpp",
3640   MAME_DIR .. "src/mame/machine/taitoio.h",
36412884   MAME_DIR .. "src/mame/video/taito_helper.cpp",
3642   MAME_DIR .. "src/mame/video/taito_helper.h",
36432885   MAME_DIR .. "src/mame/video/pc080sn.cpp",
3644   MAME_DIR .. "src/mame/video/pc080sn.h",
36452886   MAME_DIR .. "src/mame/video/pc090oj.cpp",
3646   MAME_DIR .. "src/mame/video/pc090oj.h",
36472887   MAME_DIR .. "src/mame/video/tc0080vco.cpp",
3648   MAME_DIR .. "src/mame/video/tc0080vco.h",
36492888   MAME_DIR .. "src/mame/video/tc0100scn.cpp",
3650   MAME_DIR .. "src/mame/video/tc0100scn.h",
36512889   MAME_DIR .. "src/mame/video/tc0150rod.cpp",
3652   MAME_DIR .. "src/mame/video/tc0150rod.h",
36532890   MAME_DIR .. "src/mame/video/tc0280grd.cpp",
3654   MAME_DIR .. "src/mame/video/tc0280grd.h",
36552891   MAME_DIR .. "src/mame/video/tc0360pri.cpp",
3656   MAME_DIR .. "src/mame/video/tc0360pri.h",
36572892   MAME_DIR .. "src/mame/video/tc0480scp.cpp",
3658   MAME_DIR .. "src/mame/video/tc0480scp.h",
36592893   MAME_DIR .. "src/mame/video/tc0110pcr.cpp",
3660   MAME_DIR .. "src/mame/video/tc0110pcr.h",
36612894   MAME_DIR .. "src/mame/video/tc0180vcu.cpp",
3662   MAME_DIR .. "src/mame/video/tc0180vcu.h",
36632895}
36642896
36652897createMAMEProjects(_target, _subtarget, "tatsumi")
36662898files {
36672899   MAME_DIR .. "src/mame/drivers/kingdrby.cpp",
36682900   MAME_DIR .. "src/mame/drivers/lockon.cpp",
3669   MAME_DIR .. "src/mame/includes/lockon.h",
36702901   MAME_DIR .. "src/mame/video/lockon.cpp",
36712902   MAME_DIR .. "src/mame/drivers/tatsumi.cpp",
3672   MAME_DIR .. "src/mame/includes/tatsumi.h",
36732903   MAME_DIR .. "src/mame/machine/tatsumi.cpp",
36742904   MAME_DIR .. "src/mame/video/tatsumi.cpp",
36752905   MAME_DIR .. "src/mame/drivers/tx1.cpp",
3676   MAME_DIR .. "src/mame/includes/tx1.h",
36772906   MAME_DIR .. "src/mame/machine/tx1.cpp",
36782907   MAME_DIR .. "src/mame/audio/tx1.cpp",
36792908   MAME_DIR .. "src/mame/video/tx1.cpp",
r250222r250223
36822911createMAMEProjects(_target, _subtarget, "tch")
36832912files {
36842913   MAME_DIR .. "src/mame/drivers/kickgoal.cpp",
3685   MAME_DIR .. "src/mame/includes/kickgoal.h",
36862914   MAME_DIR .. "src/mame/video/kickgoal.cpp",
36872915   MAME_DIR .. "src/mame/drivers/littlerb.cpp",
36882916   MAME_DIR .. "src/mame/drivers/rltennis.cpp",
3689   MAME_DIR .. "src/mame/includes/rltennis.h",
36902917   MAME_DIR .. "src/mame/video/rltennis.cpp",
36912918   MAME_DIR .. "src/mame/drivers/speedspn.cpp",
3692   MAME_DIR .. "src/mame/includes/speedspn.h",
36932919   MAME_DIR .. "src/mame/video/speedspn.cpp",
36942920   MAME_DIR .. "src/mame/drivers/wheelfir.cpp",
36952921}
r250222r250223
36972923createMAMEProjects(_target, _subtarget, "tecfri")
36982924files {
36992925   MAME_DIR .. "src/mame/drivers/ambush.cpp",
3700   MAME_DIR .. "src/mame/includes/ambush.h",
37012926   MAME_DIR .. "src/mame/video/ambush.cpp",
37022927   MAME_DIR .. "src/mame/drivers/holeland.cpp",
3703   MAME_DIR .. "src/mame/includes/holeland.h",
37042928   MAME_DIR .. "src/mame/video/holeland.cpp",
37052929   MAME_DIR .. "src/mame/drivers/sauro.cpp",
3706   MAME_DIR .. "src/mame/includes/sauro.h",
37072930   MAME_DIR .. "src/mame/video/sauro.cpp",
37082931   MAME_DIR .. "src/mame/drivers/speedbal.cpp",
3709   MAME_DIR .. "src/mame/includes/speedbal.h",
37102932   MAME_DIR .. "src/mame/video/speedbal.cpp",
37112933}
37122934
37132935createMAMEProjects(_target, _subtarget, "technos")
37142936files {
37152937   MAME_DIR .. "src/mame/drivers/battlane.cpp",
3716   MAME_DIR .. "src/mame/includes/battlane.h",
37172938   MAME_DIR .. "src/mame/video/battlane.cpp",
37182939   MAME_DIR .. "src/mame/drivers/blockout.cpp",
3719   MAME_DIR .. "src/mame/includes/blockout.h",
37202940   MAME_DIR .. "src/mame/video/blockout.cpp",
37212941   MAME_DIR .. "src/mame/drivers/bogeyman.cpp",
3722   MAME_DIR .. "src/mame/includes/bogeyman.h",
37232942   MAME_DIR .. "src/mame/video/bogeyman.cpp",
37242943   MAME_DIR .. "src/mame/drivers/chinagat.cpp",
37252944   MAME_DIR .. "src/mame/drivers/ddragon.cpp",
3726   MAME_DIR .. "src/mame/includes/ddragon.h",
37272945   MAME_DIR .. "src/mame/video/ddragon.cpp",
37282946   MAME_DIR .. "src/mame/drivers/ddragon3.cpp",
3729   MAME_DIR .. "src/mame/includes/ddragon3.h",
37302947   MAME_DIR .. "src/mame/video/ddragon3.cpp",
37312948   MAME_DIR .. "src/mame/drivers/dogfgt.cpp",
3732   MAME_DIR .. "src/mame/includes/dogfgt.h",
37332949   MAME_DIR .. "src/mame/video/dogfgt.cpp",
37342950   MAME_DIR .. "src/mame/drivers/matmania.cpp",
3735   MAME_DIR .. "src/mame/includes/matmania.h",
37362951   MAME_DIR .. "src/mame/video/matmania.cpp",
37372952   MAME_DIR .. "src/mame/drivers/mystston.cpp",
3738   MAME_DIR .. "src/mame/includes/mystston.h",
37392953   MAME_DIR .. "src/mame/video/mystston.cpp",
37402954   MAME_DIR .. "src/mame/drivers/renegade.cpp",
3741   MAME_DIR .. "src/mame/includes/renegade.h",
37422955   MAME_DIR .. "src/mame/video/renegade.cpp",
37432956   MAME_DIR .. "src/mame/drivers/scregg.cpp",
37442957   MAME_DIR .. "src/mame/drivers/shadfrce.cpp",
3745   MAME_DIR .. "src/mame/includes/shadfrce.h",
37462958   MAME_DIR .. "src/mame/video/shadfrce.cpp",
37472959   MAME_DIR .. "src/mame/drivers/spdodgeb.cpp",
3748   MAME_DIR .. "src/mame/includes/spdodgeb.h",
37492960   MAME_DIR .. "src/mame/video/spdodgeb.cpp",
37502961   MAME_DIR .. "src/mame/drivers/ssozumo.cpp",
3751   MAME_DIR .. "src/mame/includes/ssozumo.h",
37522962   MAME_DIR .. "src/mame/video/ssozumo.cpp",
37532963   MAME_DIR .. "src/mame/drivers/tagteam.cpp",
3754   MAME_DIR .. "src/mame/includes/tagteam.h",
37552964   MAME_DIR .. "src/mame/video/tagteam.cpp",
37562965   MAME_DIR .. "src/mame/drivers/vball.cpp",
3757   MAME_DIR .. "src/mame/includes/vball.h",
37582966   MAME_DIR .. "src/mame/video/vball.cpp",
37592967   MAME_DIR .. "src/mame/drivers/wwfsstar.cpp",
3760   MAME_DIR .. "src/mame/includes/wwfsstar.h",
37612968   MAME_DIR .. "src/mame/video/wwfsstar.cpp",
37622969   MAME_DIR .. "src/mame/drivers/xain.cpp",
3763   MAME_DIR .. "src/mame/includes/xain.h",
37642970   MAME_DIR .. "src/mame/video/xain.cpp",
37652971}
37662972
37672973createMAMEProjects(_target, _subtarget, "tehkan")
37682974files {
37692975   MAME_DIR .. "src/mame/video/tecmo_spr.cpp",
3770   MAME_DIR .. "src/mame/video/tecmo_spr.h",
37712976   MAME_DIR .. "src/mame/video/tecmo_mix.cpp",
3772   MAME_DIR .. "src/mame/video/tecmo_mix.h",
37732977   MAME_DIR .. "src/mame/drivers/bombjack.cpp",
3774   MAME_DIR .. "src/mame/includes/bombjack.h",
37752978   MAME_DIR .. "src/mame/video/bombjack.cpp",
37762979   MAME_DIR .. "src/mame/drivers/gaiden.cpp",
3777   MAME_DIR .. "src/mame/includes/gaiden.h",
37782980   MAME_DIR .. "src/mame/video/gaiden.cpp",
37792981   MAME_DIR .. "src/mame/drivers/lvcards.cpp",
3780   MAME_DIR .. "src/mame/includes/lvcards.h",
37812982   MAME_DIR .. "src/mame/video/lvcards.cpp",
37822983   MAME_DIR .. "src/mame/drivers/pbaction.cpp",
3783   MAME_DIR .. "src/mame/includes/pbaction.h",
37842984   MAME_DIR .. "src/mame/video/pbaction.cpp",
37852985   MAME_DIR .. "src/mame/drivers/senjyo.cpp",
3786   MAME_DIR .. "src/mame/includes/senjyo.h",
37872986   MAME_DIR .. "src/mame/audio/senjyo.cpp",
37882987   MAME_DIR .. "src/mame/video/senjyo.cpp",
37892988   MAME_DIR .. "src/mame/drivers/solomon.cpp",
3790   MAME_DIR .. "src/mame/includes/solomon.h",
37912989   MAME_DIR .. "src/mame/video/solomon.cpp",
37922990   MAME_DIR .. "src/mame/drivers/spbactn.cpp",
3793   MAME_DIR .. "src/mame/includes/spbactn.h",
37942991   MAME_DIR .. "src/mame/video/spbactn.cpp",
37952992   MAME_DIR .. "src/mame/drivers/tbowl.cpp",
3796   MAME_DIR .. "src/mame/includes/tbowl.h",
37972993   MAME_DIR .. "src/mame/video/tbowl.cpp",
37982994   MAME_DIR .. "src/mame/drivers/tecmo.cpp",
3799   MAME_DIR .. "src/mame/includes/tecmo.h",
38002995   MAME_DIR .. "src/mame/video/tecmo.cpp",
38012996   MAME_DIR .. "src/mame/drivers/tecmo16.cpp",
3802   MAME_DIR .. "src/mame/includes/tecmo16.h",
38032997   MAME_DIR .. "src/mame/video/tecmo16.cpp",
38042998   MAME_DIR .. "src/mame/drivers/tecmosys.cpp",
3805   MAME_DIR .. "src/mame/includes/tecmosys.h",
38062999   MAME_DIR .. "src/mame/machine/tecmosys.cpp",
38073000   MAME_DIR .. "src/mame/video/tecmosys.cpp",
38083001   MAME_DIR .. "src/mame/drivers/tehkanwc.cpp",
3809   MAME_DIR .. "src/mame/includes/tehkanwc.h",
38103002   MAME_DIR .. "src/mame/video/tehkanwc.cpp",
38113003   MAME_DIR .. "src/mame/drivers/wc90.cpp",
3812   MAME_DIR .. "src/mame/includes/wc90.h",
38133004   MAME_DIR .. "src/mame/video/wc90.cpp",
38143005   MAME_DIR .. "src/mame/drivers/wc90b.cpp",
3815   MAME_DIR .. "src/mame/includes/wc90b.h",
38163006   MAME_DIR .. "src/mame/video/wc90b.cpp",
38173007}
38183008
38193009createMAMEProjects(_target, _subtarget, "thepit")
38203010files {
38213011   MAME_DIR .. "src/mame/drivers/thepit.cpp",
3822   MAME_DIR .. "src/mame/includes/thepit.h",
38233012   MAME_DIR .. "src/mame/video/thepit.cpp",
38243013   MAME_DIR .. "src/mame/drivers/timelimt.cpp",
3825   MAME_DIR .. "src/mame/includes/timelimt.h",
38263014   MAME_DIR .. "src/mame/video/timelimt.cpp",
38273015}
38283016
r250222r250223
38303018files {
38313019   MAME_DIR .. "src/mame/drivers/mjsister.cpp",
38323020   MAME_DIR .. "src/mame/drivers/slapfght.cpp",
3833   MAME_DIR .. "src/mame/includes/slapfght.h",
38343021   MAME_DIR .. "src/mame/machine/slapfght.cpp",
38353022   MAME_DIR .. "src/mame/video/slapfght.cpp",
38363023   MAME_DIR .. "src/mame/drivers/snowbros.cpp",
3837   MAME_DIR .. "src/mame/includes/snowbros.h",
38383024   MAME_DIR .. "src/mame/video/kan_pand.cpp",
3839   MAME_DIR .. "src/mame/video/kan_pand.h",
38403025   MAME_DIR .. "src/mame/video/kan_panb.cpp",
38413026   MAME_DIR .. "src/mame/drivers/toaplan1.cpp",
3842   MAME_DIR .. "src/mame/includes/toaplan1.h",
38433027   MAME_DIR .. "src/mame/machine/toaplan1.cpp",
38443028   MAME_DIR .. "src/mame/video/toaplan1.cpp",
3845   MAME_DIR .. "src/mame/includes/toaplipt.h",
38463029   MAME_DIR .. "src/mame/drivers/toaplan2.cpp",
3847   MAME_DIR .. "src/mame/includes/toaplan2.h",
38483030   MAME_DIR .. "src/mame/video/toaplan2.cpp",
38493031   MAME_DIR .. "src/mame/video/gp9001.cpp",
3850   MAME_DIR .. "src/mame/video/gp9001.h",
38513032   MAME_DIR .. "src/mame/drivers/twincobr.cpp",
3852   MAME_DIR .. "src/mame/includes/twincobr.h",
38533033   MAME_DIR .. "src/mame/machine/twincobr.cpp",
38543034   MAME_DIR .. "src/mame/video/twincobr.cpp",
38553035   MAME_DIR .. "src/mame/drivers/wardner.cpp",
38563036   MAME_DIR .. "src/mame/video/toaplan_scu.cpp",
3857   MAME_DIR .. "src/mame/video/toaplan_scu.h",
38583037}
38593038
38603039createMAMEProjects(_target, _subtarget, "tong")
38613040files {
38623041   MAME_DIR .. "src/mame/drivers/beezer.cpp",
3863   MAME_DIR .. "src/mame/includes/beezer.h",
38643042   MAME_DIR .. "src/mame/machine/beezer.cpp",
38653043   MAME_DIR .. "src/mame/video/beezer.cpp",
38663044   MAME_DIR .. "src/mame/audio/beezer.cpp",
r250222r250223
38693047createMAMEProjects(_target, _subtarget, "unico")
38703048files {
38713049   MAME_DIR .. "src/mame/drivers/drgnmst.cpp",
3872   MAME_DIR .. "src/mame/includes/drgnmst.h",
38733050   MAME_DIR .. "src/mame/video/drgnmst.cpp",
38743051   MAME_DIR .. "src/mame/drivers/silkroad.cpp",
3875   MAME_DIR .. "src/mame/includes/silkroad.h",
38763052   MAME_DIR .. "src/mame/video/silkroad.cpp",
38773053   MAME_DIR .. "src/mame/drivers/unico.cpp",
3878   MAME_DIR .. "src/mame/includes/unico.h",
38793054   MAME_DIR .. "src/mame/video/unico.cpp",
38803055}
38813056
38823057createMAMEProjects(_target, _subtarget, "univers")
38833058files {
38843059   MAME_DIR .. "src/mame/drivers/cheekyms.cpp",
3885   MAME_DIR .. "src/mame/includes/cheekyms.h",
38863060   MAME_DIR .. "src/mame/video/cheekyms.cpp",
38873061   MAME_DIR .. "src/mame/drivers/cosmic.cpp",
3888   MAME_DIR .. "src/mame/includes/cosmic.h",
38893062   MAME_DIR .. "src/mame/video/cosmic.cpp",
38903063   MAME_DIR .. "src/mame/drivers/docastle.cpp",
3891   MAME_DIR .. "src/mame/includes/docastle.h",
38923064   MAME_DIR .. "src/mame/machine/docastle.cpp",
38933065   MAME_DIR .. "src/mame/video/docastle.cpp",
38943066   MAME_DIR .. "src/mame/drivers/ladybug.cpp",
3895   MAME_DIR .. "src/mame/includes/ladybug.h",
38963067   MAME_DIR .. "src/mame/video/ladybug.cpp",
38973068   MAME_DIR .. "src/mame/drivers/mrdo.cpp",
3898   MAME_DIR .. "src/mame/includes/mrdo.h",
38993069   MAME_DIR .. "src/mame/video/mrdo.cpp",
39003070   MAME_DIR .. "src/mame/drivers/redclash.cpp",
39013071   MAME_DIR .. "src/mame/video/redclash.cpp",
r250222r250223
39053075createMAMEProjects(_target, _subtarget, "upl")
39063076files {
39073077   MAME_DIR .. "src/mame/drivers/mouser.cpp",
3908   MAME_DIR .. "src/mame/includes/mouser.h",
39093078   MAME_DIR .. "src/mame/video/mouser.cpp",
39103079   MAME_DIR .. "src/mame/drivers/ninjakd2.cpp",
3911   MAME_DIR .. "src/mame/includes/ninjakd2.h",
39123080   MAME_DIR .. "src/mame/video/ninjakd2.cpp",
39133081   MAME_DIR .. "src/mame/drivers/nova2001.cpp",
3914   MAME_DIR .. "src/mame/includes/nova2001.h",
39153082   MAME_DIR .. "src/mame/video/nova2001.cpp",
39163083   MAME_DIR .. "src/mame/drivers/xxmissio.cpp",
3917   MAME_DIR .. "src/mame/includes/xxmissio.h",
39183084   MAME_DIR .. "src/mame/video/xxmissio.cpp",
39193085}
39203086
39213087createMAMEProjects(_target, _subtarget, "valadon")
39223088files {
39233089   MAME_DIR .. "src/mame/drivers/bagman.cpp",
3924   MAME_DIR .. "src/mame/includes/bagman.h",
39253090   MAME_DIR .. "src/mame/machine/bagman.cpp",
39263091   MAME_DIR .. "src/mame/video/bagman.cpp",
39273092   MAME_DIR .. "src/mame/drivers/tankbust.cpp",
3928   MAME_DIR .. "src/mame/includes/tankbust.h",
39293093   MAME_DIR .. "src/mame/video/tankbust.cpp",
39303094}
39313095
r250222r250223
39393103files {
39403104   MAME_DIR .. "src/mame/drivers/looping.cpp",
39413105   MAME_DIR .. "src/mame/drivers/spcforce.cpp",
3942   MAME_DIR .. "src/mame/includes/spcforce.h",
39433106   MAME_DIR .. "src/mame/video/spcforce.cpp",
39443107   MAME_DIR .. "src/mame/drivers/suprridr.cpp",
3945   MAME_DIR .. "src/mame/includes/suprridr.h",
39463108   MAME_DIR .. "src/mame/video/suprridr.cpp",
39473109}
39483110
39493111createMAMEProjects(_target, _subtarget, "vsystem")
39503112files {
39513113   MAME_DIR .. "src/mame/video/vsystem_spr.cpp",
3952   MAME_DIR .. "src/mame/video/vsystem_spr.h",
39533114   MAME_DIR .. "src/mame/video/vsystem_spr2.cpp",
3954   MAME_DIR .. "src/mame/video/vsystem_spr2.h",
39553115   MAME_DIR .. "src/mame/drivers/aerofgt.cpp",
3956   MAME_DIR .. "src/mame/includes/aerofgt.h",
39573116   MAME_DIR .. "src/mame/video/aerofgt.cpp",
39583117   MAME_DIR .. "src/mame/drivers/crshrace.cpp",
3959   MAME_DIR .. "src/mame/includes/crshrace.h",
39603118   MAME_DIR .. "src/mame/video/crshrace.cpp",
39613119   MAME_DIR .. "src/mame/drivers/f1gp.cpp",
3962   MAME_DIR .. "src/mame/includes/f1gp.h",
39633120   MAME_DIR .. "src/mame/video/f1gp.cpp",
39643121   MAME_DIR .. "src/mame/drivers/fromance.cpp",
3965   MAME_DIR .. "src/mame/includes/fromance.h",
39663122   MAME_DIR .. "src/mame/video/fromance.cpp",
39673123   MAME_DIR .. "src/mame/drivers/fromanc2.cpp",
3968   MAME_DIR .. "src/mame/includes/fromanc2.h",
39693124   MAME_DIR .. "src/mame/video/fromanc2.cpp",
39703125   MAME_DIR .. "src/mame/drivers/gstriker.cpp",
3971   MAME_DIR .. "src/mame/includes/gstriker.h",
39723126   MAME_DIR .. "src/mame/video/gstriker.cpp",
39733127   MAME_DIR .. "src/mame/video/mb60553.cpp",
3974   MAME_DIR .. "src/mame/video/mb60553.h",
39753128   MAME_DIR .. "src/mame/video/vs920a.cpp",
3976   MAME_DIR .. "src/mame/video/vs920a.h",
39773129   MAME_DIR .. "src/mame/drivers/inufuku.cpp",
3978   MAME_DIR .. "src/mame/includes/inufuku.h",
39793130   MAME_DIR .. "src/mame/video/inufuku.cpp",
39803131   MAME_DIR .. "src/mame/drivers/ojankohs.cpp",
3981   MAME_DIR .. "src/mame/includes/ojankohs.h",
39823132   MAME_DIR .. "src/mame/video/ojankohs.cpp",
39833133   MAME_DIR .. "src/mame/drivers/pipedrm.cpp",
39843134   MAME_DIR .. "src/mame/drivers/rpunch.cpp",
3985   MAME_DIR .. "src/mame/includes/rpunch.h",
39863135   MAME_DIR .. "src/mame/video/rpunch.cpp",
39873136   MAME_DIR .. "src/mame/drivers/suprslam.cpp",
3988   MAME_DIR .. "src/mame/includes/suprslam.h",
39893137   MAME_DIR .. "src/mame/video/suprslam.cpp",
39903138   MAME_DIR .. "src/mame/drivers/tail2nos.cpp",
3991   MAME_DIR .. "src/mame/includes/tail2nos.h",
39923139   MAME_DIR .. "src/mame/video/tail2nos.cpp",
39933140   MAME_DIR .. "src/mame/drivers/taotaido.cpp",
3994   MAME_DIR .. "src/mame/includes/taotaido.h",
39953141   MAME_DIR .. "src/mame/video/taotaido.cpp",
39963142   MAME_DIR .. "src/mame/drivers/welltris.cpp",
3997   MAME_DIR .. "src/mame/includes/welltris.h",
39983143   MAME_DIR .. "src/mame/video/welltris.cpp",
39993144}
40003145
r250222r250223
40023147files {
40033148   MAME_DIR .. "src/mame/drivers/nmg5.cpp",
40043149   MAME_DIR .. "src/mame/drivers/paradise.cpp",
4005   MAME_DIR .. "src/mame/includes/paradise.h",
40063150   MAME_DIR .. "src/mame/video/paradise.cpp",
40073151   MAME_DIR .. "src/mame/drivers/yunsung8.cpp",
4008   MAME_DIR .. "src/mame/includes/yunsung8.h",
40093152   MAME_DIR .. "src/mame/video/yunsung8.cpp",
40103153   MAME_DIR .. "src/mame/drivers/yunsun16.cpp",
4011   MAME_DIR .. "src/mame/includes/yunsun16.h",
40123154   MAME_DIR .. "src/mame/video/yunsun16.cpp",
40133155}
40143156
40153157createMAMEProjects(_target, _subtarget, "zaccaria")
40163158files {
40173159   MAME_DIR .. "src/mame/drivers/laserbat.cpp",
4018   MAME_DIR .. "src/mame/includes/laserbat.h",
40193160   MAME_DIR .. "src/mame/audio/laserbat.cpp",
40203161   MAME_DIR .. "src/mame/drivers/seabattl.cpp",
40213162   MAME_DIR .. "src/mame/drivers/zac2650.cpp",
4022   MAME_DIR .. "src/mame/includes/zac2650.h",
40233163   MAME_DIR .. "src/mame/video/zac2650.cpp",
40243164   MAME_DIR .. "src/mame/drivers/zaccaria.cpp",
4025   MAME_DIR .. "src/mame/includes/zaccaria.h",
40263165   MAME_DIR .. "src/mame/video/zaccaria.cpp",
40273166}
40283167
r250222r250223
40463185   MAME_DIR .. "src/mame/drivers/de_2.cpp",
40473186   MAME_DIR .. "src/mame/drivers/de_3.cpp",
40483187   MAME_DIR .. "src/mame/machine/decopincpu.cpp",
4049   MAME_DIR .. "src/mame/machine/decopincpu.h",
40503188   MAME_DIR .. "src/mame/video/decodmd1.cpp",
4051   MAME_DIR .. "src/mame/video/decodmd1.h",
40523189   MAME_DIR .. "src/mame/video/decodmd2.cpp",
4053   MAME_DIR .. "src/mame/video/decodmd2.h",
40543190   MAME_DIR .. "src/mame/video/decodmd3.cpp",
4055   MAME_DIR .. "src/mame/video/decodmd3.h",
40563191   MAME_DIR .. "src/mame/drivers/de_3b.cpp",
40573192   MAME_DIR .. "src/mame/drivers/flicker.cpp",
40583193   MAME_DIR .. "src/mame/drivers/g627.cpp",
40593194   MAME_DIR .. "src/mame/drivers/gp_1.cpp",
40603195   MAME_DIR .. "src/mame/machine/genpin.cpp",
4061   MAME_DIR .. "src/mame/machine/genpin.h",
40623196   MAME_DIR .. "src/mame/drivers/gp_2.cpp",
40633197   MAME_DIR .. "src/mame/drivers/gts1.cpp",
40643198   MAME_DIR .. "src/mame/drivers/gts3.cpp",
r250222r250223
40853219   MAME_DIR .. "src/mame/drivers/play_5.cpp",
40863220   MAME_DIR .. "src/mame/drivers/rowamet.cpp",
40873221   MAME_DIR .. "src/mame/drivers/s11.cpp",
4088   MAME_DIR .. "src/mame/includes/s11.h",
40893222   MAME_DIR .. "src/mame/drivers/s11a.cpp",
40903223   MAME_DIR .. "src/mame/drivers/s11b.cpp",
40913224   MAME_DIR .. "src/mame/drivers/s11c.cpp",
40923225   MAME_DIR .. "src/mame/audio/s11c_bg.cpp",
4093   MAME_DIR .. "src/mame/audio/s11c_bg.h",
40943226   MAME_DIR .. "src/mame/drivers/s3.cpp",
40953227   MAME_DIR .. "src/mame/drivers/s4.cpp",
40963228   MAME_DIR .. "src/mame/drivers/s6.cpp",
r250222r250223
41193251   MAME_DIR .. "src/mame/drivers/wpc_flip2.cpp",
41203252   MAME_DIR .. "src/mame/drivers/wpc_s.cpp",
41213253   MAME_DIR .. "src/mame/machine/wpc.cpp",
4122   MAME_DIR .. "src/mame/machine/wpc.h",
4123   MAME_DIR .. "src/mame/includes/wpc_pin.h",
41243254   MAME_DIR .. "src/mame/audio/wpcsnd.cpp",
4125   MAME_DIR .. "src/mame/audio/wpcsnd.h",
41263255   MAME_DIR .. "src/mame/video/wpc_dmd.cpp",
4127   MAME_DIR .. "src/mame/video/wpc_dmd.h",
41283256   MAME_DIR .. "src/mame/machine/wpc_pic.cpp",
4129   MAME_DIR .. "src/mame/machine/wpc_pic.h",
41303257   MAME_DIR .. "src/mame/machine/wpc_lamp.cpp",
4131   MAME_DIR .. "src/mame/machine/wpc_lamp.h",
41323258   MAME_DIR .. "src/mame/machine/wpc_out.cpp",
4133   MAME_DIR .. "src/mame/machine/wpc_out.h",
41343259   MAME_DIR .. "src/mame/machine/wpc_shift.cpp",
4135   MAME_DIR .. "src/mame/machine/wpc_shift.h",
41363260   MAME_DIR .. "src/mame/drivers/zac_1.cpp",
41373261   MAME_DIR .. "src/mame/drivers/zac_2.cpp",
41383262   MAME_DIR .. "src/mame/drivers/zac_proto.cpp",
r250222r250223
41463270files {
41473271   MAME_DIR .. "src/mame/drivers/1945kiii.cpp",
41483272   MAME_DIR .. "src/mame/drivers/39in1.cpp",
4149   MAME_DIR .. "src/mame/machine/pxa255.h",
41503273   MAME_DIR .. "src/mame/drivers/3do.cpp",
4151   MAME_DIR .. "src/mame/includes/3do.h",
41523274   MAME_DIR .. "src/mame/machine/3do.cpp",
41533275   MAME_DIR .. "src/mame/drivers/3x3puzzl.cpp",
41543276   MAME_DIR .. "src/mame/drivers/4enraya.cpp",
4155   MAME_DIR .. "src/mame/includes/4enraya.h",
41563277   MAME_DIR .. "src/mame/video/4enraya.cpp",
41573278   MAME_DIR .. "src/mame/drivers/4enlinea.cpp",
41583279   MAME_DIR .. "src/mame/drivers/5clown.cpp",
r250222r250223
41643285   MAME_DIR .. "src/mame/drivers/alinvade.cpp",
41653286   MAME_DIR .. "src/mame/drivers/amaticmg.cpp",
41663287   MAME_DIR .. "src/mame/drivers/ampoker2.cpp",
4167   MAME_DIR .. "src/mame/includes/ampoker2.h",
41683288   MAME_DIR .. "src/mame/video/ampoker2.cpp",
41693289   MAME_DIR .. "src/mame/drivers/amspdwy.cpp",
4170   MAME_DIR .. "src/mame/includes/amspdwy.h",
41713290   MAME_DIR .. "src/mame/video/amspdwy.cpp",
41723291   MAME_DIR .. "src/mame/drivers/amusco.cpp",
41733292   MAME_DIR .. "src/mame/drivers/arachnid.cpp",
41743293   MAME_DIR .. "src/mame/drivers/artmagic.cpp",
4175   MAME_DIR .. "src/mame/includes/artmagic.h",
41763294   MAME_DIR .. "src/mame/video/artmagic.cpp",
41773295   MAME_DIR .. "src/mame/drivers/astrafr.cpp",
41783296   MAME_DIR .. "src/mame/drivers/astrcorp.cpp",
r250222r250223
41813299   MAME_DIR .. "src/mame/drivers/attckufo.cpp",
41823300   MAME_DIR .. "src/mame/drivers/avt.cpp",
41833301   MAME_DIR .. "src/mame/drivers/aztarac.cpp",
4184   MAME_DIR .. "src/mame/includes/aztarac.h",
41853302   MAME_DIR .. "src/mame/audio/aztarac.cpp",
41863303   MAME_DIR .. "src/mame/video/aztarac.cpp",
41873304   MAME_DIR .. "src/mame/drivers/bailey.cpp",
r250222r250223
41943311   MAME_DIR .. "src/mame/drivers/blitz68k.cpp",
41953312   MAME_DIR .. "src/mame/drivers/buster.cpp",
41963313   MAME_DIR .. "src/mame/drivers/calomega.cpp",
4197   MAME_DIR .. "src/mame/includes/calomega.h",
41983314   MAME_DIR .. "src/mame/video/calomega.cpp",
41993315   MAME_DIR .. "src/mame/drivers/carrera.cpp",
42003316   MAME_DIR .. "src/mame/drivers/castle.cpp",
42013317   MAME_DIR .. "src/mame/drivers/cave.cpp",
4202   MAME_DIR .. "src/mame/includes/cave.h",
42033318   MAME_DIR .. "src/mame/video/cave.cpp",
42043319   MAME_DIR .. "src/mame/drivers/cavepc.cpp",
42053320   MAME_DIR .. "src/mame/drivers/cv1k.cpp",
42063321   MAME_DIR .. "src/mame/drivers/cb2001.cpp",
42073322   MAME_DIR .. "src/mame/drivers/cdi.cpp",
4208   MAME_DIR .. "src/mame/includes/cdi.h",
42093323   MAME_DIR .. "src/mame/video/mcd212.cpp",
4210   MAME_DIR .. "src/mame/video/mcd212.h",
42113324   MAME_DIR .. "src/mame/machine/cdi070.cpp",
4212   MAME_DIR .. "src/mame/machine/cdi070.h",
42133325   MAME_DIR .. "src/mame/machine/cdislave.cpp",
4214   MAME_DIR .. "src/mame/machine/cdislave.h",
42153326   MAME_DIR .. "src/mame/machine/cdicdic.cpp",
4216   MAME_DIR .. "src/mame/machine/cdicdic.h",
42173327   MAME_DIR .. "src/mame/drivers/cesclass.cpp",
42183328   MAME_DIR .. "src/mame/drivers/chance32.cpp",
42193329   MAME_DIR .. "src/mame/drivers/chexx.cpp",
42203330   MAME_DIR .. "src/mame/drivers/chicago.cpp",
42213331   MAME_DIR .. "src/mame/drivers/chsuper.cpp",
42223332   MAME_DIR .. "src/mame/drivers/cidelsa.cpp",
4223   MAME_DIR .. "src/mame/includes/cidelsa.h",
42243333   MAME_DIR .. "src/mame/video/cidelsa.cpp",
42253334   MAME_DIR .. "src/mame/drivers/cocoloco.cpp",
42263335   MAME_DIR .. "src/mame/drivers/coinmstr.cpp",
r250222r250223
42293338   MAME_DIR .. "src/mame/drivers/cupidon.cpp",
42303339   MAME_DIR .. "src/mame/drivers/bntyhunt.cpp",
42313340   MAME_DIR .. "src/mame/drivers/coolpool.cpp",
4232   MAME_DIR .. "src/mame/includes/coolpool.h",
42333341   MAME_DIR .. "src/mame/drivers/megaphx.cpp",
42343342   MAME_DIR .. "src/mame/machine/inder_sb.cpp",
4235   MAME_DIR .. "src/mame/machine/inder_sb.h",
42363343   MAME_DIR .. "src/mame/machine/inder_vid.cpp",
4237   MAME_DIR .. "src/mame/machine/inder_vid.h",
42383344   MAME_DIR .. "src/mame/drivers/corona.cpp",
42393345   MAME_DIR .. "src/mame/drivers/crystal.cpp",
42403346   MAME_DIR .. "src/mame/video/vrender0.cpp",
4241   MAME_DIR .. "src/mame/video/vrender0.h",
42423347   MAME_DIR .. "src/mame/drivers/cubeqst.cpp",
42433348   MAME_DIR .. "src/mame/drivers/cybertnk.cpp",
42443349   MAME_DIR .. "src/mame/drivers/dcheese.cpp",
4245   MAME_DIR .. "src/mame/includes/dcheese.h",
42463350   MAME_DIR .. "src/mame/video/dcheese.cpp",
42473351   MAME_DIR .. "src/mame/drivers/dfruit.cpp",
42483352   MAME_DIR .. "src/mame/drivers/dgpix.cpp",
r250222r250223
42513355   MAME_DIR .. "src/mame/drivers/dorachan.cpp",
42523356   MAME_DIR .. "src/mame/drivers/dreamwld.cpp",
42533357   MAME_DIR .. "src/mame/drivers/dribling.cpp",
4254   MAME_DIR .. "src/mame/includes/dribling.h",
42553358   MAME_DIR .. "src/mame/video/dribling.cpp",
42563359   MAME_DIR .. "src/mame/drivers/drw80pkr.cpp",
42573360   MAME_DIR .. "src/mame/drivers/dwarfd.cpp",
r250222r250223
42623365   MAME_DIR .. "src/mame/drivers/ecoinf3.cpp",
42633366   MAME_DIR .. "src/mame/drivers/electra.cpp",
42643367   MAME_DIR .. "src/mame/drivers/epos.cpp",
4265   MAME_DIR .. "src/mame/includes/epos.h",
42663368   MAME_DIR .. "src/mame/video/epos.cpp",
42673369   MAME_DIR .. "src/mame/drivers/esd16.cpp",
4268   MAME_DIR .. "src/mame/includes/esd16.h",
42693370   MAME_DIR .. "src/mame/video/esd16.cpp",
42703371   MAME_DIR .. "src/mame/drivers/esh.cpp",
42713372   MAME_DIR .. "src/mame/drivers/esripsys.cpp",
4272   MAME_DIR .. "src/mame/includes/esripsys.h",
42733373   MAME_DIR .. "src/mame/video/esripsys.cpp",
42743374   MAME_DIR .. "src/mame/drivers/ettrivia.cpp",
42753375   MAME_DIR .. "src/mame/drivers/extrema.cpp",
42763376   MAME_DIR .. "src/mame/drivers/fireball.cpp",
42773377   MAME_DIR .. "src/mame/drivers/flipjack.cpp",
42783378   MAME_DIR .. "src/mame/drivers/flower.cpp",
4279   MAME_DIR .. "src/mame/includes/flower.h",
42803379   MAME_DIR .. "src/mame/audio/flower.cpp",
42813380   MAME_DIR .. "src/mame/video/flower.cpp",
42823381   MAME_DIR .. "src/mame/drivers/fortecar.cpp",
42833382   MAME_DIR .. "src/mame/drivers/fresh.cpp",
42843383   MAME_DIR .. "src/mame/drivers/freekick.cpp",
4285   MAME_DIR .. "src/mame/includes/freekick.h",
42863384   MAME_DIR .. "src/mame/video/freekick.cpp",
42873385   MAME_DIR .. "src/mame/drivers/fungames.cpp",
42883386   MAME_DIR .. "src/mame/drivers/funkball.cpp",
r250222r250223
43003398   MAME_DIR .. "src/mame/drivers/goldnpkr.cpp",
43013399   MAME_DIR .. "src/mame/drivers/good.cpp",
43023400   MAME_DIR .. "src/mame/drivers/gotcha.cpp",
4303   MAME_DIR .. "src/mame/includes/gotcha.h",
43043401   MAME_DIR .. "src/mame/video/gotcha.cpp",
43053402   MAME_DIR .. "src/mame/drivers/gstream.cpp",
43063403   MAME_DIR .. "src/mame/drivers/gumbo.cpp",
4307   MAME_DIR .. "src/mame/includes/gumbo.h",
43083404   MAME_DIR .. "src/mame/video/gumbo.cpp",
43093405   MAME_DIR .. "src/mame/drivers/gunpey.cpp",
43103406   MAME_DIR .. "src/mame/drivers/hideseek.cpp",
r250222r250223
43123408   MAME_DIR .. "src/mame/drivers/headonb.cpp",
43133409   MAME_DIR .. "src/mame/drivers/highvdeo.cpp",
43143410   MAME_DIR .. "src/mame/drivers/himesiki.cpp",
4315   MAME_DIR .. "src/mame/includes/himesiki.h",
43163411   MAME_DIR .. "src/mame/video/himesiki.cpp",
43173412   MAME_DIR .. "src/mame/drivers/hitpoker.cpp",
43183413   MAME_DIR .. "src/mame/drivers/homedata.cpp",
4319   MAME_DIR .. "src/mame/includes/homedata.h",
43203414   MAME_DIR .. "src/mame/video/homedata.cpp",
43213415   MAME_DIR .. "src/mame/drivers/hotblock.cpp",
43223416   MAME_DIR .. "src/mame/drivers/hotstuff.cpp",
r250222r250223
43383432   MAME_DIR .. "src/mame/drivers/koikoi.cpp",
43393433   MAME_DIR .. "src/mame/drivers/kurukuru.cpp",
43403434   MAME_DIR .. "src/mame/drivers/kyugo.cpp",
4341   MAME_DIR .. "src/mame/includes/kyugo.h",
43423435   MAME_DIR .. "src/mame/video/kyugo.cpp",
43433436   MAME_DIR .. "src/mame/drivers/ladyfrog.cpp",
4344   MAME_DIR .. "src/mame/includes/ladyfrog.h",
43453437   MAME_DIR .. "src/mame/video/ladyfrog.cpp",
43463438   MAME_DIR .. "src/mame/drivers/laserbas.cpp",
43473439   MAME_DIR .. "src/mame/drivers/lethalj.cpp",
4348   MAME_DIR .. "src/mame/includes/lethalj.h",
43493440   MAME_DIR .. "src/mame/video/lethalj.cpp",
43503441   MAME_DIR .. "src/mame/drivers/limenko.cpp",
43513442   MAME_DIR .. "src/mame/drivers/ltcasino.cpp",
43523443   MAME_DIR .. "src/mame/drivers/lucky74.cpp",
4353   MAME_DIR .. "src/mame/includes/lucky74.h",
43543444   MAME_DIR .. "src/mame/video/lucky74.cpp",
43553445   MAME_DIR .. "src/mame/drivers/luckgrln.cpp",
43563446   MAME_DIR .. "src/mame/drivers/magic10.cpp",
r250222r250223
43603450   MAME_DIR .. "src/mame/drivers/magtouch.cpp",
43613451   MAME_DIR .. "src/mame/drivers/majorpkr.cpp",
43623452   MAME_DIR .. "src/mame/drivers/malzak.cpp",
4363   MAME_DIR .. "src/mame/includes/malzak.h",
43643453   MAME_DIR .. "src/mame/video/malzak.cpp",
43653454   MAME_DIR .. "src/mame/drivers/manohman.cpp",
43663455   MAME_DIR .. "src/mame/drivers/mcatadv.cpp",
4367   MAME_DIR .. "src/mame/includes/mcatadv.h",
43683456   MAME_DIR .. "src/mame/video/mcatadv.cpp",
43693457   MAME_DIR .. "src/mame/drivers/mgavegas.cpp",
43703458   MAME_DIR .. "src/mame/drivers/meyc8080.cpp",
43713459   MAME_DIR .. "src/mame/drivers/meyc8088.cpp",
43723460   MAME_DIR .. "src/mame/drivers/micro3d.cpp",
4373   MAME_DIR .. "src/mame/includes/micro3d.h",
43743461   MAME_DIR .. "src/mame/machine/micro3d.cpp",
43753462   MAME_DIR .. "src/mame/video/micro3d.cpp",
43763463   MAME_DIR .. "src/mame/audio/micro3d.cpp",
r250222r250223
43793466   MAME_DIR .. "src/mame/drivers/mirax.cpp",
43803467   MAME_DIR .. "src/mame/drivers/mole.cpp",
43813468   MAME_DIR .. "src/mame/drivers/mosaic.cpp",
4382   MAME_DIR .. "src/mame/includes/mosaic.h",
43833469   MAME_DIR .. "src/mame/video/mosaic.cpp",
43843470   MAME_DIR .. "src/mame/drivers/mpu12wbk.cpp",
43853471   MAME_DIR .. "src/mame/drivers/mrjong.cpp",
4386   MAME_DIR .. "src/mame/includes/mrjong.h",
43873472   MAME_DIR .. "src/mame/video/mrjong.cpp",
43883473   MAME_DIR .. "src/mame/drivers/multfish.cpp",
4389   MAME_DIR .. "src/mame/includes/multfish.h",
43903474   MAME_DIR .. "src/mame/drivers/multfish_boot.cpp",
43913475   MAME_DIR .. "src/mame/drivers/multfish_ref.cpp",
43923476   MAME_DIR .. "src/mame/drivers/murogem.cpp",
r250222r250223
43943478   MAME_DIR .. "src/mame/drivers/neoprint.cpp",
43953479   MAME_DIR .. "src/mame/drivers/neptunp2.cpp",
43963480   MAME_DIR .. "src/mame/drivers/news.cpp",
4397   MAME_DIR .. "src/mame/includes/news.h",
43983481   MAME_DIR .. "src/mame/video/news.cpp",
43993482   MAME_DIR .. "src/mame/drivers/nexus3d.cpp",
44003483   MAME_DIR .. "src/mame/drivers/norautp.cpp",
4401   MAME_DIR .. "src/mame/includes/norautp.h",
44023484   MAME_DIR .. "src/mame/audio/norautp.cpp",
44033485   MAME_DIR .. "src/mame/drivers/nsmpoker.cpp",
44043486   MAME_DIR .. "src/mame/drivers/oneshot.cpp",
4405   MAME_DIR .. "src/mame/includes/oneshot.h",
44063487   MAME_DIR .. "src/mame/video/oneshot.cpp",
44073488   MAME_DIR .. "src/mame/drivers/onetwo.cpp",
44083489   MAME_DIR .. "src/mame/drivers/othello.cpp",
44093490   MAME_DIR .. "src/mame/drivers/pachifev.cpp",
44103491   MAME_DIR .. "src/mame/drivers/pasha2.cpp",
44113492   MAME_DIR .. "src/mame/drivers/pass.cpp",
4412   MAME_DIR .. "src/mame/includes/pass.h",
44133493   MAME_DIR .. "src/mame/video/pass.cpp",
44143494   MAME_DIR .. "src/mame/drivers/peplus.cpp",
44153495   MAME_DIR .. "src/mame/drivers/photon.cpp",
r250222r250223
44223502   MAME_DIR .. "src/mame/drivers/pkscram.cpp",
44233503   MAME_DIR .. "src/mame/drivers/pntnpuzl.cpp",
44243504   MAME_DIR .. "src/mame/drivers/policetr.cpp",
4425   MAME_DIR .. "src/mame/includes/policetr.h",
44263505   MAME_DIR .. "src/mame/video/policetr.cpp",
44273506   MAME_DIR .. "src/mame/drivers/polyplay.cpp",
4428   MAME_DIR .. "src/mame/includes/polyplay.h",
44293507   MAME_DIR .. "src/mame/audio/polyplay.cpp",
44303508   MAME_DIR .. "src/mame/video/polyplay.cpp",
44313509   MAME_DIR .. "src/mame/drivers/poker72.cpp",
r250222r250223
44453523   MAME_DIR .. "src/mame/drivers/sealy.cpp",
44463524   MAME_DIR .. "src/mame/drivers/sfbonus.cpp",
44473525   MAME_DIR .. "src/mame/drivers/shangkid.cpp",
4448   MAME_DIR .. "src/mame/includes/shangkid.h",
44493526   MAME_DIR .. "src/mame/video/shangkid.cpp",
44503527   MAME_DIR .. "src/mame/drivers/skeetsht.cpp",
44513528   MAME_DIR .. "src/mame/drivers/skimaxx.cpp",
r250222r250223
44583535   MAME_DIR .. "src/mame/drivers/splus.cpp",
44593536   MAME_DIR .. "src/mame/drivers/spool99.cpp",
44603537   MAME_DIR .. "src/mame/drivers/sprcros2.cpp",
4461   MAME_DIR .. "src/mame/includes/sprcros2.h",
44623538   MAME_DIR .. "src/mame/video/sprcros2.cpp",
44633539   MAME_DIR .. "src/mame/drivers/sshot.cpp",
44643540   MAME_DIR .. "src/mame/drivers/ssingles.cpp",
r250222r250223
44763552   MAME_DIR .. "src/mame/drivers/tapatune.cpp",
44773553   MAME_DIR .. "src/mame/drivers/tattack.cpp",
44783554   MAME_DIR .. "src/mame/drivers/taxidriv.cpp",
4479   MAME_DIR .. "src/mame/includes/taxidriv.h",
44803555   MAME_DIR .. "src/mame/video/taxidriv.cpp",
44813556   MAME_DIR .. "src/mame/drivers/tcl.cpp",
44823557   MAME_DIR .. "src/mame/drivers/thayers.cpp",
44833558   MAME_DIR .. "src/mame/drivers/thedeep.cpp",
4484   MAME_DIR .. "src/mame/includes/thedeep.h",
44853559   MAME_DIR .. "src/mame/video/thedeep.cpp",
44863560   MAME_DIR .. "src/mame/drivers/tiamc1.cpp",
4487   MAME_DIR .. "src/mame/includes/tiamc1.h",
44883561   MAME_DIR .. "src/mame/video/tiamc1.cpp",
44893562   MAME_DIR .. "src/mame/audio/tiamc1.cpp",
44903563   MAME_DIR .. "src/mame/drivers/tickee.cpp",
44913564   MAME_DIR .. "src/mame/drivers/tmspoker.cpp",
44923565   MAME_DIR .. "src/mame/drivers/truco.cpp",
4493   MAME_DIR .. "src/mame/includes/truco.h",
44943566   MAME_DIR .. "src/mame/video/truco.cpp",
44953567   MAME_DIR .. "src/mame/drivers/trucocl.cpp",
4496   MAME_DIR .. "src/mame/includes/trucocl.h",
44973568   MAME_DIR .. "src/mame/video/trucocl.cpp",
44983569   MAME_DIR .. "src/mame/drivers/trvmadns.cpp",
44993570   MAME_DIR .. "src/mame/drivers/trvquest.cpp",
r250222r250223
45033574   MAME_DIR .. "src/mame/drivers/unkfr.cpp",
45043575   MAME_DIR .. "src/mame/drivers/unkhorse.cpp",
45053576   MAME_DIR .. "src/mame/drivers/usgames.cpp",
4506   MAME_DIR .. "src/mame/includes/usgames.h",
45073577   MAME_DIR .. "src/mame/video/usgames.cpp",
45083578   MAME_DIR .. "src/mame/drivers/vamphalf.cpp",
45093579   MAME_DIR .. "src/mame/drivers/vcombat.cpp",
45103580   MAME_DIR .. "src/mame/drivers/vectrex.cpp",
4511   MAME_DIR .. "src/mame/includes/vectrex.h",
45123581   MAME_DIR .. "src/mame/video/vectrex.cpp",
45133582   MAME_DIR .. "src/mame/machine/vectrex.cpp",
45143583   MAME_DIR .. "src/mame/drivers/videopkr.cpp",
r250222r250223
45223591   MAME_DIR .. "src/mame/drivers/wacky_gator.cpp",
45233592   MAME_DIR .. "src/mame/drivers/xtom3d.cpp",
45243593   MAME_DIR .. "src/mame/drivers/xyonix.cpp",
4525   MAME_DIR .. "src/mame/includes/xyonix.h",
45263594   MAME_DIR .. "src/mame/video/xyonix.cpp",
45273595}
45283596end
trunk/scripts/target/mame/dummy.lua
r250222r250223
2929      GEN_DIR  .. "mess/layout",
3030   }
3131
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}
32   files{
33      MAME_DIR .. "src/mame/drivers/coleco.cpp",
34      MAME_DIR .. "src/mame/machine/coleco.cpp",
35   }
3836end
3937
4038function linkProjects_mame_dummy(_target, _subtarget)
trunk/scripts/target/mame/mame.lua
r250222r250223
2020function linkProjects_mame_mame(_target, _subtarget)
2121   linkProjects_mame_arcade(_target, _subtarget)
2222   linkProjects_mame_mess(_target, _subtarget)
23end
23end
No newline at end of file
trunk/scripts/target/mame/mess.lua
r250222r250223
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",
931930   MAME_DIR .. "src/mame/machine/atari.cpp",
932931   MAME_DIR .. "src/mame/video/atari.cpp",
933   MAME_DIR .. "src/mame/includes/atari.h",
934932   MAME_DIR .. "src/mame/video/antic.cpp",
935   MAME_DIR .. "src/mame/video/antic.h",
936933   MAME_DIR .. "src/mame/video/gtia.cpp",
937   MAME_DIR .. "src/mame/video/gtia.h",
938934   MAME_DIR .. "src/mame/drivers/jaguar.cpp",
939   MAME_DIR .. "src/mame/includes/jaguar.h",
940935   MAME_DIR .. "src/mame/audio/jaguar.cpp",
941936   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",   
945937   MAME_DIR .. "src/mame/audio/gorf.cpp",
946938   MAME_DIR .. "src/mame/audio/wow.cpp",
947939   MAME_DIR .. "src/mame/drivers/astrocde.cpp",
948   MAME_DIR .. "src/mame/includes/astrocde.h",
949940   MAME_DIR .. "src/mame/video/astrocde.cpp",
950941   MAME_DIR .. "src/mame/machine/kabuki.cpp",
951   MAME_DIR .. "src/mame/machine/kabuki.h",
952942   MAME_DIR .. "src/mame/video/pk8000.cpp",
953943   MAME_DIR .. "src/mame/video/ppu2c0x.cpp",
954   MAME_DIR .. "src/mame/video/ppu2c0x.h",
955944   MAME_DIR .. "src/mame/machine/snes.cpp",
956945   MAME_DIR .. "src/mame/audio/snes_snd.cpp",
957   MAME_DIR .. "src/mame/audio/snes_snd.h",
958946   MAME_DIR .. "src/mame/machine/n64.cpp",
959947   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",
963948   MAME_DIR .. "src/mame/video/rdpblend.cpp",
964   MAME_DIR .. "src/mame/video/rdpblend.h",
965949   MAME_DIR .. "src/mame/video/rdptpipe.cpp",
966   MAME_DIR .. "src/mame/video/rdptpipe.h",
967950   MAME_DIR .. "src/mame/machine/megadriv.cpp",
968951   MAME_DIR .. "src/mame/drivers/naomi.cpp",
969   MAME_DIR .. "src/mame/includes/naomi.h",
970   MAME_DIR .. "src/mame/includes/dc.h",
971952   MAME_DIR .. "src/mame/machine/awboard.cpp",
972   MAME_DIR .. "src/mame/machine/awboard.h",
973953   MAME_DIR .. "src/mame/machine/dc.cpp",
974954   MAME_DIR .. "src/mame/machine/dc-ctrl.cpp",
975   MAME_DIR .. "src/mame/machine/dc-ctrl.h",
976955   MAME_DIR .. "src/mame/machine/gdrom.cpp",
977   MAME_DIR .. "src/mame/machine/gdrom.h",
978956   MAME_DIR .. "src/mame/machine/jvs13551.cpp",
979   MAME_DIR .. "src/mame/machine/jvs13551.h",
980957   MAME_DIR .. "src/mame/machine/maple-dc.cpp",
981   MAME_DIR .. "src/mame/machine/maple-dc.h",
982958   MAME_DIR .. "src/mame/machine/mapledev.cpp",
983   MAME_DIR .. "src/mame/machine/mapledev.h",
984959   MAME_DIR .. "src/mame/machine/mie.cpp",
985   MAME_DIR .. "src/mame/machine/mie.h",
986960   MAME_DIR .. "src/mame/machine/naomi.cpp",
987961   MAME_DIR .. "src/mame/machine/naomibd.cpp",
988   MAME_DIR .. "src/mame/machine/naomibd.h",
989962   MAME_DIR .. "src/mame/machine/naomig1.cpp",
990   MAME_DIR .. "src/mame/machine/naomig1.h",
991963   MAME_DIR .. "src/mame/machine/naomigd.cpp",
992   MAME_DIR .. "src/mame/machine/naomigd.h",
993964   MAME_DIR .. "src/mame/machine/naomim1.cpp",
994   MAME_DIR .. "src/mame/machine/naomim1.h",
995965   MAME_DIR .. "src/mame/machine/naomim2.cpp",
996   MAME_DIR .. "src/mame/machine/naomim2.h",
997966   MAME_DIR .. "src/mame/machine/naomim4.cpp",
998   MAME_DIR .. "src/mame/machine/naomim4.h",
999967   MAME_DIR .. "src/mame/machine/naomirom.cpp",
1000   MAME_DIR .. "src/mame/machine/naomirom.h",
1001968   MAME_DIR .. "src/mame/machine/315-5881_crypt.cpp",
1002   MAME_DIR .. "src/mame/machine/315-5881_crypt.h",
1003969   MAME_DIR .. "src/mame/video/powervr2.cpp",
1004   MAME_DIR .. "src/mame/video/powervr2.h",
1005970   MAME_DIR .. "src/mame/drivers/neogeo.cpp",
1006   MAME_DIR .. "src/mame/includes/neogeo.h",
1007971   MAME_DIR .. "src/mame/machine/neocrypt.cpp",
1008972   MAME_DIR .. "src/mame/machine/ng_memcard.cpp",
1009   MAME_DIR .. "src/mame/machine/ng_memcard.h",
1010973   MAME_DIR .. "src/mame/video/neogeo.cpp",
1011974   MAME_DIR .. "src/mame/video/neogeo_spr.cpp",
1012   MAME_DIR .. "src/mame/video/neogeo_spr.h",
1013975   MAME_DIR .. "src/mame/drivers/cdi.cpp",
1014   MAME_DIR .. "src/mame/includes/cdi.h",
1015976   MAME_DIR .. "src/mame/machine/cdi070.cpp",
1016   MAME_DIR .. "src/mame/machine/cdi070.h",
1017977   MAME_DIR .. "src/mame/machine/cdicdic.cpp",
1018   MAME_DIR .. "src/mame/machine/cdicdic.h",
1019978   MAME_DIR .. "src/mame/machine/cdislave.cpp",
1020   MAME_DIR .. "src/mame/machine/cdislave.h",
1021979   MAME_DIR .. "src/mame/video/mcd212.cpp",
1022   MAME_DIR .. "src/mame/video/mcd212.h",
1023980   MAME_DIR .. "src/mame/drivers/3do.cpp",
1024   MAME_DIR .. "src/mame/includes/3do.h",
1025981   MAME_DIR .. "src/mame/machine/3do.cpp",
1026982   MAME_DIR .. "src/mame/drivers/konamim2.cpp",
1027983   MAME_DIR .. "src/mame/drivers/vectrex.cpp",
1028   MAME_DIR .. "src/mame/includes/vectrex.h",
1029984   MAME_DIR .. "src/mame/machine/vectrex.cpp",
1030985   MAME_DIR .. "src/mame/video/vectrex.cpp",
1031986   MAME_DIR .. "src/mame/drivers/cps1.cpp",
1032   MAME_DIR .. "src/mame/includes/cps1.h",
1033987   MAME_DIR .. "src/mame/video/cps1.cpp",
1034988   MAME_DIR .. "src/mame/video/chihiro.cpp",
1035989   MAME_DIR .. "src/mame/machine/xbox.cpp",
r250222r250223
1042996createMESSProjects(_target, _subtarget, "messshared")
1043997files {
1044998   MAME_DIR .. "src/mame/audio/mea8000.cpp",
1045   MAME_DIR .. "src/mame/audio/mea8000.h",
1046999   MAME_DIR .. "src/mame/machine/appldriv.cpp",
1047   MAME_DIR .. "src/mame/machine/appldriv.h",
10481000   MAME_DIR .. "src/mame/machine/applefdc.cpp",
1049   MAME_DIR .. "src/mame/machine/applefdc.h",
10501001   MAME_DIR .. "src/mame/machine/microdrv.cpp",
1051   MAME_DIR .. "src/mame/machine/microdrv.h",
10521002   MAME_DIR .. "src/mame/machine/smartmed.cpp",
1053   MAME_DIR .. "src/mame/machine/smartmed.h",
10541003   MAME_DIR .. "src/mame/machine/sonydriv.cpp",
1055   MAME_DIR .. "src/mame/machine/sonydriv.h",
10561004   MAME_DIR .. "src/mame/machine/teleprinter.cpp",
1057   MAME_DIR .. "src/mame/machine/teleprinter.h",
10581005   MAME_DIR .. "src/mame/machine/z80bin.cpp",
1059   MAME_DIR .. "src/mame/machine/z80bin.h",
10601006}
10611007--------------------------------------------------
10621008-- manufacturer-specific groupings for drivers
r250222r250223
10681014   MAME_DIR .. "src/mame/drivers/a6809.cpp",
10691015   MAME_DIR .. "src/mame/drivers/acrnsys1.cpp",
10701016   MAME_DIR .. "src/mame/drivers/atom.cpp",
1071   MAME_DIR .. "src/mame/includes/atom.h",
10721017   MAME_DIR .. "src/mame/drivers/bbc.cpp",
1073   MAME_DIR .. "src/mame/includes/bbc.h",
10741018   MAME_DIR .. "src/mame/machine/bbc.cpp",
10751019   MAME_DIR .. "src/mame/video/bbc.cpp",
10761020   MAME_DIR .. "src/mame/drivers/bbcbc.cpp",
10771021   MAME_DIR .. "src/mame/drivers/electron.cpp",
1078   MAME_DIR .. "src/mame/includes/electron.h",
10791022   MAME_DIR .. "src/mame/machine/electron.cpp",
10801023   MAME_DIR .. "src/mame/video/electron.cpp",
10811024   MAME_DIR .. "src/mame/drivers/riscpc.cpp",
10821025   MAME_DIR .. "src/mame/drivers/z88.cpp",
1083   MAME_DIR .. "src/mame/includes/z88.h",
10841026   MAME_DIR .. "src/mame/machine/upd65031.cpp",
1085   MAME_DIR .. "src/mame/machine/upd65031.h",
10861027   MAME_DIR .. "src/mame/video/z88.cpp",
10871028}
10881029
r250222r250223
10921033   MAME_DIR .. "src/mame/drivers/apricotf.cpp",
10931034   MAME_DIR .. "src/mame/drivers/apricotp.cpp",
10941035   MAME_DIR .. "src/mame/machine/apricotkb.cpp",
1095   MAME_DIR .. "src/mame/machine/apricotkb.h",
10961036   MAME_DIR .. "src/mame/machine/apricotkb_hle.cpp",
1097   MAME_DIR .. "src/mame/machine/apricotkb_hle.h",
10981037   MAME_DIR .. "src/mame/drivers/victor9k.cpp",
1099   MAME_DIR .. "src/mame/includes/victor9k.h",
11001038   MAME_DIR .. "src/mame/machine/victor9kb.cpp",
1101   MAME_DIR .. "src/mame/machine/victor9kb.h",
11021039   MAME_DIR .. "src/mame/machine/victor9k_fdc.cpp",
1103   MAME_DIR .. "src/mame/machine/victor9k_fdc.h",
11041040}
11051041
11061042createMESSProjects(_target, _subtarget, "adc")
11071043files {
11081044   MAME_DIR .. "src/mame/drivers/super6.cpp",
1109   MAME_DIR .. "src/mame/includes/super6.h",
11101045   MAME_DIR .. "src/mame/drivers/superslave.cpp",
1111   MAME_DIR .. "src/mame/includes/superslave.h",
11121046}
11131047
11141048createMESSProjects(_target, _subtarget, "alesis")
11151049files {
11161050   MAME_DIR .. "src/mame/drivers/alesis.cpp",
1117   MAME_DIR .. "src/mame/includes/alesis.h",
11181051   MAME_DIR .. "src/mame/audio/alesis.cpp",
11191052   MAME_DIR .. "src/mame/video/alesis.cpp",
11201053}
r250222r250223
11271060createMESSProjects(_target, _subtarget, "amiga")
11281061files {
11291062   MAME_DIR .. "src/mame/drivers/amiga.cpp",
1130   MAME_DIR .. "src/mame/includes/amiga.h",
11311063   MAME_DIR .. "src/mame/machine/amigakbd.cpp",
1132   MAME_DIR .. "src/mame/machine/amigakbd.h",
11331064}
11341065
11351066createMESSProjects(_target, _subtarget, "amstrad")
11361067files {
11371068   MAME_DIR .. "src/mame/drivers/amstrad.cpp",
1138   MAME_DIR .. "src/mame/includes/amstrad.h",
11391069   MAME_DIR .. "src/mame/machine/amstrad.cpp",
11401070   MAME_DIR .. "src/mame/drivers/amstr_pc.cpp",
11411071   MAME_DIR .. "src/mame/drivers/nc.cpp",
1142   MAME_DIR .. "src/mame/includes/nc.h",
11431072   MAME_DIR .. "src/mame/machine/nc.cpp",
11441073   MAME_DIR .. "src/mame/video/nc.cpp",
11451074   MAME_DIR .. "src/mame/drivers/pc1512.cpp",
1146   MAME_DIR .. "src/mame/includes/pc1512.h",
11471075   MAME_DIR .. "src/mame/machine/pc1512kb.cpp",
1148   MAME_DIR .. "src/mame/machine/pc1512kb.h",
11491076   MAME_DIR .. "src/mame/video/pc1512.cpp",
11501077   MAME_DIR .. "src/mame/drivers/pcw.cpp",
1151   MAME_DIR .. "src/mame/includes/pcw.h",
11521078   MAME_DIR .. "src/mame/video/pcw.cpp",
11531079   MAME_DIR .. "src/mame/drivers/pcw16.cpp",
1154   MAME_DIR .. "src/mame/includes/pcw16.h",
11551080   MAME_DIR .. "src/mame/video/pcw16.cpp",
11561081   MAME_DIR .. "src/mame/drivers/pda600.cpp",
11571082}
r250222r250223
11641089createMESSProjects(_target, _subtarget, "apollo")
11651090files {
11661091   MAME_DIR .. "src/mame/drivers/apollo.cpp",
1167   MAME_DIR .. "src/mame/includes/apollo.h",
11681092   MAME_DIR .. "src/mame/machine/apollo.cpp",
11691093   MAME_DIR .. "src/mame/machine/apollo_dbg.cpp",
11701094   MAME_DIR .. "src/mame/machine/apollo_kbd.cpp",
1171   MAME_DIR .. "src/mame/machine/apollo_kbd.h",
11721095   MAME_DIR .. "src/mame/video/apollo.cpp",
11731096}
11741097
11751098createMESSProjects(_target, _subtarget, "apple")
11761099files {
11771100   MAME_DIR .. "src/mame/drivers/apple1.cpp",
1178   MAME_DIR .. "src/mame/includes/apple1.h",
11791101   MAME_DIR .. "src/mame/machine/apple1.cpp",
11801102   MAME_DIR .. "src/mame/video/apple1.cpp",
11811103   MAME_DIR .. "src/mame/drivers/apple2.cpp",
1182   MAME_DIR .. "src/mame/includes/apple2.h",
11831104   MAME_DIR .. "src/mame/drivers/apple2e.cpp",
11841105   MAME_DIR .. "src/mame/machine/apple2.cpp",
11851106   MAME_DIR .. "src/mame/video/apple2.cpp",
1186   MAME_DIR .. "src/mame/video/apple2.h",
11871107   MAME_DIR .. "src/mame/drivers/tk2000.cpp",
11881108   MAME_DIR .. "src/mame/drivers/apple2gs.cpp",
1189   MAME_DIR .. "src/mame/includes/apple2gs.h",
11901109   MAME_DIR .. "src/mame/machine/apple2gs.cpp",
11911110   MAME_DIR .. "src/mame/video/apple2gs.cpp",
11921111   MAME_DIR .. "src/mame/drivers/apple3.cpp",
1193   MAME_DIR .. "src/mame/includes/apple3.h",
11941112   MAME_DIR .. "src/mame/machine/apple3.cpp",
11951113   MAME_DIR .. "src/mame/video/apple3.cpp",
11961114   MAME_DIR .. "src/mame/drivers/lisa.cpp",
1197   MAME_DIR .. "src/mame/includes/lisa.h",
11981115   MAME_DIR .. "src/mame/machine/lisa.cpp",
11991116   MAME_DIR .. "src/mame/drivers/mac.cpp",
1200   MAME_DIR .. "src/mame/includes/mac.h",
12011117   MAME_DIR .. "src/mame/audio/mac.cpp",
12021118   MAME_DIR .. "src/mame/machine/egret.cpp",
1203   MAME_DIR .. "src/mame/machine/egret.h",
12041119   MAME_DIR .. "src/mame/machine/mac.cpp",
12051120   MAME_DIR .. "src/mame/machine/macadb.cpp",
12061121   MAME_DIR .. "src/mame/machine/macrtc.cpp",
1207   MAME_DIR .. "src/mame/machine/macrtc.h",
12081122   MAME_DIR .. "src/mame/machine/mackbd.cpp",
1209   MAME_DIR .. "src/mame/machine/mackbd.h",
12101123   MAME_DIR .. "src/mame/machine/swim.cpp",
1211   MAME_DIR .. "src/mame/machine/swim.h",
12121124   MAME_DIR .. "src/mame/video/mac.cpp",
12131125   MAME_DIR .. "src/mame/drivers/macpci.cpp",
1214   MAME_DIR .. "src/mame/includes/macpci.h",
12151126   MAME_DIR .. "src/mame/machine/macpci.cpp",
12161127   MAME_DIR .. "src/mame/machine/cuda.cpp",
1217   MAME_DIR .. "src/mame/machine/cuda.h",
12181128}
12191129
12201130createMESSProjects(_target, _subtarget, "applied")
12211131files {
12221132   MAME_DIR .. "src/mame/drivers/mbee.cpp",
1223   MAME_DIR .. "src/mame/includes/mbee.h",
12241133   MAME_DIR .. "src/mame/machine/mbee.cpp",
12251134   MAME_DIR .. "src/mame/video/mbee.cpp",
12261135}
r250222r250223
12281137createMESSProjects(_target, _subtarget, "arcadia")
12291138files {
12301139   MAME_DIR .. "src/mame/drivers/arcadia.cpp",
1231   MAME_DIR .. "src/mame/includes/arcadia.h",
12321140   MAME_DIR .. "src/mame/audio/arcadia.cpp",
1233   MAME_DIR .. "src/mame/audio/arcadia.h",
12341141   MAME_DIR .. "src/mame/video/arcadia.cpp",
12351142}
12361143
12371144createMESSProjects(_target, _subtarget, "ascii")
12381145files {
12391146   MAME_DIR .. "src/mame/drivers/msx.cpp",
1240   MAME_DIR .. "src/mame/includes/msx.h",
12411147   MAME_DIR .. "src/mame/machine/msx.cpp",
12421148   MAME_DIR .. "src/mame/machine/msx_matsushita.cpp",
1243   MAME_DIR .. "src/mame/machine/msx_matsushita.h",
12441149   MAME_DIR .. "src/mame/machine/msx_s1985.cpp",
1245   MAME_DIR .. "src/mame/machine/msx_s1985.h",
12461150   MAME_DIR .. "src/mame/machine/msx_switched.cpp",
1247   MAME_DIR .. "src/mame/machine/msx_switched.h",
12481151   MAME_DIR .. "src/mame/machine/msx_systemflags.cpp",
1249   MAME_DIR .. "src/mame/machine/msx_systemflags.h",
12501152}
12511153
12521154createMESSProjects(_target, _subtarget, "at")
12531155files {
12541156   MAME_DIR .. "src/mame/drivers/at.cpp",
1255   MAME_DIR .. "src/mame/includes/at.h",
12561157   MAME_DIR .. "src/mame/machine/at.cpp",
12571158   MAME_DIR .. "src/mame/drivers/ct486.cpp",
12581159}
r250222r250223
12621163   MAME_DIR .. "src/mame/drivers/a2600.cpp",
12631164   MAME_DIR .. "src/mame/drivers/a7800.cpp",
12641165   MAME_DIR .. "src/mame/video/maria.cpp",
1265   MAME_DIR .. "src/mame/video/maria.h",
12661166   MAME_DIR .. "src/mame/drivers/atari400.cpp",
12671167   MAME_DIR .. "src/mame/machine/atarifdc.cpp",
1268   MAME_DIR .. "src/mame/machine/atarifdc.h",
12691168   MAME_DIR .. "src/mame/drivers/atarist.cpp",
1270   MAME_DIR .. "src/mame/includes/atarist.h",
12711169   MAME_DIR .. "src/mame/video/atarist.cpp",
1272   MAME_DIR .. "src/mame/video/atarist.h",
12731170   MAME_DIR .. "src/mame/drivers/lynx.cpp",
1274   MAME_DIR .. "src/mame/includes/lynx.h",
12751171   MAME_DIR .. "src/mame/audio/lynx.cpp",
1276   MAME_DIR .. "src/mame/audio/lynx.h",
12771172   MAME_DIR .. "src/mame/machine/lynx.cpp",
12781173   MAME_DIR .. "src/mame/drivers/portfoli.cpp",
1279   MAME_DIR .. "src/mame/includes/portfoli.h",
12801174}
12811175
12821176createMESSProjects(_target, _subtarget, "att")
r250222r250223
12921186createMESSProjects(_target, _subtarget, "banctec")
12931187files {
12941188   MAME_DIR .. "src/mame/drivers/banctec.cpp",
1295   MAME_DIR .. "src/mame/includes/banctec.h",
12961189}
12971190
12981191createMESSProjects(_target, _subtarget, "bandai")
r250222r250223
13011194   MAME_DIR .. "src/mame/drivers/rx78.cpp",
13021195   MAME_DIR .. "src/mame/drivers/tamag1.cpp",
13031196   MAME_DIR .. "src/mame/drivers/wswan.cpp",
1304   MAME_DIR .. "src/mame/includes/wswan.h",
13051197   MAME_DIR .. "src/mame/audio/wswan_snd.cpp",
1306   MAME_DIR .. "src/mame/audio/wswan_snd.h",
13071198   MAME_DIR .. "src/mame/machine/wswan.cpp",
13081199   MAME_DIR .. "src/mame/video/wswan_video.cpp",
1309   MAME_DIR .. "src/mame/video/wswan_video.h",
13101200}
13111201
13121202createMESSProjects(_target, _subtarget, "be")
13131203files {
13141204   MAME_DIR .. "src/mame/drivers/bebox.cpp",
1315   MAME_DIR .. "src/mame/includes/bebox.h",
13161205   MAME_DIR .. "src/mame/machine/bebox.cpp",
13171206}
13181207
13191208createMESSProjects(_target, _subtarget, "bnpo")
13201209files {
13211210   MAME_DIR .. "src/mame/drivers/b2m.cpp",
1322   MAME_DIR .. "src/mame/includes/b2m.h",
13231211   MAME_DIR .. "src/mame/machine/b2m.cpp",
13241212   MAME_DIR .. "src/mame/video/b2m.cpp",
13251213}
r250222r250223
13271215createMESSProjects(_target, _subtarget, "bondwell")
13281216files {
13291217   MAME_DIR .. "src/mame/drivers/bw12.cpp",
1330   MAME_DIR .. "src/mame/includes/bw12.h",
13311218   MAME_DIR .. "src/mame/drivers/bw2.cpp",
1332   MAME_DIR .. "src/mame/includes/bw2.h",
13331219}
13341220
13351221createMESSProjects(_target, _subtarget, "booth")
r250222r250223
13401226createMESSProjects(_target, _subtarget, "camputers")
13411227files {
13421228   MAME_DIR .. "src/mame/drivers/camplynx.cpp",
1229   MAME_DIR .. "src/lib/formats/camplynx_dsk.cpp",
13431230}
13441231
13451232createMESSProjects(_target, _subtarget, "canon")
13461233files {
13471234   MAME_DIR .. "src/mame/drivers/cat.cpp",
13481235   MAME_DIR .. "src/mame/drivers/x07.cpp",
1349   MAME_DIR .. "src/mame/includes/x07.h",
13501236   MAME_DIR .. "src/mame/drivers/canon_s80.cpp",
13511237}
13521238
r250222r250223
13701256createMESSProjects(_target, _subtarget, "cbm")
13711257files {
13721258   MAME_DIR .. "src/mame/drivers/c128.cpp",
1373   MAME_DIR .. "src/mame/includes/c128.h",
13741259   MAME_DIR .. "src/mame/drivers/c64.cpp",
1375   MAME_DIR .. "src/mame/includes/c64.h",
13761260   MAME_DIR .. "src/mame/drivers/c64dtv.cpp",
13771261   MAME_DIR .. "src/mame/drivers/c65.cpp",
1378   MAME_DIR .. "src/mame/includes/c65.h",
13791262   MAME_DIR .. "src/mame/drivers/c900.cpp",
13801263   MAME_DIR .. "src/mame/drivers/cbm2.cpp",
1381   MAME_DIR .. "src/mame/includes/cbm2.h",
13821264   MAME_DIR .. "src/mame/drivers/clcd.cpp",
13831265   MAME_DIR .. "src/mame/drivers/pet.cpp",
1384   MAME_DIR .. "src/mame/includes/pet.h",
13851266   MAME_DIR .. "src/mame/drivers/plus4.cpp",
1386   MAME_DIR .. "src/mame/includes/plus4.h",
13871267   MAME_DIR .. "src/mame/drivers/vic10.cpp",
1388   MAME_DIR .. "src/mame/includes/vic10.h",
13891268   MAME_DIR .. "src/mame/drivers/vic20.cpp",
1390   MAME_DIR .. "src/mame/includes/vic20.h",
13911269   MAME_DIR .. "src/mame/machine/cbm_snqk.cpp",
1392   MAME_DIR .. "src/mame/machine/cbm_snqk.h",
13931270   MAME_DIR .. "src/mame/drivers/mps1230.cpp",
13941271}
13951272
r250222r250223
13981275   MAME_DIR .. "src/mame/drivers/argo.cpp",
13991276   MAME_DIR .. "src/mame/drivers/cm1800.cpp",
14001277   MAME_DIR .. "src/mame/drivers/lviv.cpp",
1401   MAME_DIR .. "src/mame/includes/lviv.h",
14021278   MAME_DIR .. "src/mame/machine/lviv.cpp",
14031279   MAME_DIR .. "src/mame/video/lviv.cpp",
14041280   MAME_DIR .. "src/mame/drivers/mikro80.cpp",
1405   MAME_DIR .. "src/mame/includes/mikro80.h",
14061281   MAME_DIR .. "src/mame/machine/mikro80.cpp",
14071282   MAME_DIR .. "src/mame/video/mikro80.cpp",
14081283   MAME_DIR .. "src/mame/drivers/pk8000.cpp",
1409   MAME_DIR .. "src/mame/includes/pk8000.h",
14101284   MAME_DIR .. "src/mame/drivers/pk8020.cpp",
1411   MAME_DIR .. "src/mame/includes/pk8020.h",
14121285   MAME_DIR .. "src/mame/machine/pk8020.cpp",
14131286   MAME_DIR .. "src/mame/video/pk8020.cpp",
14141287   MAME_DIR .. "src/mame/drivers/pyl601.cpp",
r250222r250223
14161289   MAME_DIR .. "src/mame/drivers/uknc.cpp",
14171290   MAME_DIR .. "src/mame/drivers/unior.cpp",
14181291   MAME_DIR .. "src/mame/drivers/ut88.cpp",
1419   MAME_DIR .. "src/mame/includes/ut88.h",
14201292   MAME_DIR .. "src/mame/machine/ut88.cpp",
14211293   MAME_DIR .. "src/mame/video/ut88.cpp",
14221294   MAME_DIR .. "src/mame/drivers/vector06.cpp",
1423   MAME_DIR .. "src/mame/includes/vector06.h",
14241295   MAME_DIR .. "src/mame/machine/vector06.cpp",
14251296   MAME_DIR .. "src/mame/video/vector06.cpp",
14261297   MAME_DIR .. "src/mame/drivers/vta2000.cpp",
r250222r250223
14291300createMESSProjects(_target, _subtarget, "cce")
14301301files {
14311302   MAME_DIR .. "src/mame/drivers/mc1000.cpp",
1432   MAME_DIR .. "src/mame/includes/mc1000.h",
14331303}
14341304
14351305createMESSProjects(_target, _subtarget, "ccs")
r250222r250223
14411311createMESSProjects(_target, _subtarget, "chromatics")
14421312files {
14431313   MAME_DIR .. "src/mame/drivers/cgc7900.cpp",
1444   MAME_DIR .. "src/mame/includes/cgc7900.h",
14451314   MAME_DIR .. "src/mame/video/cgc7900.cpp",
14461315}
14471316
14481317createMESSProjects(_target, _subtarget, "coleco")
14491318files {
14501319   MAME_DIR .. "src/mame/drivers/adam.cpp",
1451   MAME_DIR .. "src/mame/includes/adam.h",
14521320   MAME_DIR .. "src/mame/drivers/coleco.cpp",
1453   MAME_DIR .. "src/mame/includes/coleco.h",
14541321   MAME_DIR .. "src/mame/machine/coleco.cpp",
1455   MAME_DIR .. "src/mame/machine/coleco.h",
14561322}
14571323
14581324createMESSProjects(_target, _subtarget, "cromemco")
r250222r250223
14641330createMESSProjects(_target, _subtarget, "comx")
14651331files {
14661332   MAME_DIR .. "src/mame/drivers/comx35.cpp",
1467   MAME_DIR .. "src/mame/includes/comx35.h",
14681333   MAME_DIR .. "src/mame/video/comx35.cpp",
14691334}
14701335
14711336createMESSProjects(_target, _subtarget, "concept")
14721337files {
14731338   MAME_DIR .. "src/mame/drivers/concept.cpp",
1474   MAME_DIR .. "src/mame/includes/concept.h",
14751339   MAME_DIR .. "src/mame/machine/concept.cpp",
14761340}
14771341
14781342createMESSProjects(_target, _subtarget, "conitec")
14791343files {
14801344   MAME_DIR .. "src/mame/drivers/prof180x.cpp",
1481   MAME_DIR .. "src/mame/includes/prof180x.h",
14821345   MAME_DIR .. "src/mame/drivers/prof80.cpp",
1483   MAME_DIR .. "src/mame/includes/prof80.h",
14841346   MAME_DIR .. "src/mame/machine/prof80mmu.cpp",
1485   MAME_DIR .. "src/mame/machine/prof80mmu.h",
14861347}
14871348
14881349createMESSProjects(_target, _subtarget, "cybiko")
14891350files {
14901351   MAME_DIR .. "src/mame/drivers/cybiko.cpp",
1491   MAME_DIR .. "src/mame/includes/cybiko.h",
14921352   MAME_DIR .. "src/mame/machine/cybiko.cpp",
14931353}
14941354
14951355createMESSProjects(_target, _subtarget, "dai")
14961356files {
14971357   MAME_DIR .. "src/mame/drivers/dai.cpp",
1498   MAME_DIR .. "src/mame/includes/dai.h",
14991358   MAME_DIR .. "src/mame/audio/dai_snd.cpp",
1500   MAME_DIR .. "src/mame/audio/dai_snd.h",
15011359   MAME_DIR .. "src/mame/machine/dai.cpp",
15021360   MAME_DIR .. "src/mame/video/dai.cpp",
15031361}
r250222r250223
15051363createMESSProjects(_target, _subtarget, "ddr")
15061364files {
15071365   MAME_DIR .. "src/mame/drivers/ac1.cpp",
1508   MAME_DIR .. "src/mame/includes/ac1.h",
15091366   MAME_DIR .. "src/mame/machine/ac1.cpp",
15101367   MAME_DIR .. "src/mame/video/ac1.cpp",
15111368   MAME_DIR .. "src/mame/drivers/bcs3.cpp",
15121369   MAME_DIR .. "src/mame/drivers/c80.cpp",
1513   MAME_DIR .. "src/mame/includes/c80.h",
15141370   MAME_DIR .. "src/mame/drivers/huebler.cpp",
1515   MAME_DIR .. "src/mame/includes/huebler.h",
15161371   MAME_DIR .. "src/mame/drivers/jtc.cpp",
15171372   MAME_DIR .. "src/mame/drivers/kramermc.cpp",
1518   MAME_DIR .. "src/mame/includes/kramermc.h",
15191373   MAME_DIR .. "src/mame/machine/kramermc.cpp",
15201374   MAME_DIR .. "src/mame/video/kramermc.cpp",
15211375   MAME_DIR .. "src/mame/drivers/llc.cpp",
1522   MAME_DIR .. "src/mame/includes/llc.h",
15231376   MAME_DIR .. "src/mame/machine/llc.cpp",
15241377   MAME_DIR .. "src/mame/video/llc.cpp",
15251378   MAME_DIR .. "src/mame/drivers/nanos.cpp",
15261379   MAME_DIR .. "src/mame/drivers/pcm.cpp",
15271380   MAME_DIR .. "src/mame/drivers/vcs80.cpp",
1528   MAME_DIR .. "src/mame/includes/vcs80.h",
15291381   MAME_DIR .. "src/mame/machine/k7659kb.cpp",
1530   MAME_DIR .. "src/mame/machine/k7659kb.h",
15311382}
15321383
15331384createMESSProjects(_target, _subtarget, "dec")
r250222r250223
15451396   MAME_DIR .. "src/mame/drivers/vt320.cpp",
15461397   MAME_DIR .. "src/mame/drivers/vt520.cpp",
15471398   MAME_DIR .. "src/mame/machine/dec_lk201.cpp",
1548   MAME_DIR .. "src/mame/machine/dec_lk201.h",
15491399   MAME_DIR .. "src/mame/machine/rx01.cpp",
1550   MAME_DIR .. "src/mame/machine/rx01.h",
15511400   MAME_DIR .. "src/mame/video/vtvideo.cpp",
1552   MAME_DIR .. "src/mame/video/vtvideo.h",
15531401}
15541402
15551403createMESSProjects(_target, _subtarget, "dicksmth")
15561404files {
15571405   MAME_DIR .. "src/mame/drivers/super80.cpp",
1558   MAME_DIR .. "src/mame/includes/super80.h",
15591406   MAME_DIR .. "src/mame/machine/super80.cpp",
15601407   MAME_DIR .. "src/mame/video/super80.cpp",
15611408}
r250222r250223
15701417createMESSProjects(_target, _subtarget, "dragon")
15711418files {
15721419   MAME_DIR .. "src/mame/drivers/dgn_beta.cpp",
1573   MAME_DIR .. "src/mame/includes/dgn_beta.h",
15741420   MAME_DIR .. "src/mame/machine/dgn_beta.cpp",
15751421   MAME_DIR .. "src/mame/video/dgn_beta.cpp",
15761422}
r250222r250223
15881434createMESSProjects(_target, _subtarget, "einis")
15891435files {
15901436   MAME_DIR .. "src/mame/drivers/pecom.cpp",
1591   MAME_DIR .. "src/mame/includes/pecom.h",
15921437   MAME_DIR .. "src/mame/machine/pecom.cpp",
15931438   MAME_DIR .. "src/mame/video/pecom.cpp",
15941439}
r250222r250223
15961441createMESSProjects(_target, _subtarget, "elektrka")
15971442files {
15981443   MAME_DIR .. "src/mame/drivers/bk.cpp",
1599   MAME_DIR .. "src/mame/includes/bk.h",
16001444   MAME_DIR .. "src/mame/machine/bk.cpp",
16011445   MAME_DIR .. "src/mame/video/bk.cpp",
16021446   MAME_DIR .. "src/mame/drivers/dvk_kcgd.cpp",
16031447   MAME_DIR .. "src/mame/drivers/dvk_ksm.cpp",
16041448   MAME_DIR .. "src/mame/machine/ms7004.cpp",
1605   MAME_DIR .. "src/mame/machine/ms7004.h",
16061449   MAME_DIR .. "src/mame/drivers/mk85.cpp",
16071450   MAME_DIR .. "src/mame/drivers/mk90.cpp",
16081451}
r250222r250223
16231466   MAME_DIR .. "src/mame/drivers/esqmr.cpp",
16241467   MAME_DIR .. "src/mame/drivers/enmirage.cpp",
16251468   MAME_DIR .. "src/mame/machine/esqpanel.cpp",
1626   MAME_DIR .. "src/mame/machine/esqpanel.h",
16271469   MAME_DIR .. "src/mame/machine/esqvfd.cpp",
1628   MAME_DIR .. "src/mame/machine/esqvfd.h",
16291470}
16301471
16311472createMESSProjects(_target, _subtarget, "enterprise")
16321473files {
16331474   MAME_DIR .. "src/mame/drivers/ep64.cpp",
1634   MAME_DIR .. "src/mame/includes/ep64.h",
16351475   MAME_DIR .. "src/mame/audio/dave.cpp",
1636   MAME_DIR .. "src/mame/audio/dave.h",
16371476   MAME_DIR .. "src/mame/video/nick.cpp",
1638   MAME_DIR .. "src/mame/video/nick.h",
16391477}
16401478
16411479createMESSProjects(_target, _subtarget, "entex")
16421480files {
16431481   MAME_DIR .. "src/mame/drivers/advision.cpp",
1644   MAME_DIR .. "src/mame/includes/advision.h",
16451482   MAME_DIR .. "src/mame/machine/advision.cpp",
16461483   MAME_DIR .. "src/mame/video/advision.cpp",
16471484}
r250222r250223
16491486createMESSProjects(_target, _subtarget, "epoch")
16501487files {
16511488   MAME_DIR .. "src/mame/drivers/gamepock.cpp",
1652   MAME_DIR .. "src/mame/includes/gamepock.h",
16531489   MAME_DIR .. "src/mame/machine/gamepock.cpp",
16541490   MAME_DIR .. "src/mame/drivers/scv.cpp",
16551491   MAME_DIR .. "src/mame/audio/upd1771.cpp",
1656   MAME_DIR .. "src/mame/audio/upd1771.h",
16571492}
16581493
16591494createMESSProjects(_target, _subtarget, "epson")
16601495files {
16611496   MAME_DIR .. "src/mame/drivers/hx20.cpp",
1662   MAME_DIR .. "src/mame/includes/hx20.h",
16631497   MAME_DIR .. "src/mame/drivers/px4.cpp",
16641498   MAME_DIR .. "src/mame/drivers/px8.cpp",
1665   MAME_DIR .. "src/mame/includes/px8.h",
16661499   MAME_DIR .. "src/mame/drivers/qx10.cpp",
16671500   MAME_DIR .. "src/mame/machine/qx10kbd.cpp",
1668   MAME_DIR .. "src/mame/machine/qx10kbd.h",
16691501}
16701502
16711503createMESSProjects(_target, _subtarget, "exidy")
16721504files {
16731505   MAME_DIR .. "src/mame/machine/sorcerer.cpp",
16741506   MAME_DIR .. "src/mame/drivers/sorcerer.cpp",
1675   MAME_DIR .. "src/mame/includes/sorcerer.h",
16761507   MAME_DIR .. "src/mame/machine/micropolis.cpp",
1677   MAME_DIR .. "src/mame/machine/micropolis.h",
16781508}
16791509
16801510createMESSProjects(_target, _subtarget, "fairch")
16811511files {
16821512   MAME_DIR .. "src/mame/drivers/channelf.cpp",
1683   MAME_DIR .. "src/mame/includes/channelf.h",
16841513   MAME_DIR .. "src/mame/audio/channelf.cpp",
1685   MAME_DIR .. "src/mame/audio/channelf.h",
16861514   MAME_DIR .. "src/mame/video/channelf.cpp",
16871515}
16881516
r250222r250223
16901518files {
16911519   MAME_DIR .. "src/mame/drivers/csc.cpp",
16921520   MAME_DIR .. "src/mame/drivers/fidelz80.cpp",
1693   MAME_DIR .. "src/mame/includes/fidelz80.h",
16941521}
16951522
16961523createMESSProjects(_target, _subtarget, "force")
r250222r250223
17011528createMESSProjects(_target, _subtarget, "fujitsu")
17021529files {
17031530   MAME_DIR .. "src/mame/drivers/fmtowns.cpp",
1704   MAME_DIR .. "src/mame/includes/fmtowns.h",
17051531   MAME_DIR .. "src/mame/video/fmtowns.cpp",
17061532   MAME_DIR .. "src/mame/machine/fm_scsi.cpp",
1707   MAME_DIR .. "src/mame/machine/fm_scsi.h",
17081533   MAME_DIR .. "src/mame/drivers/fm7.cpp",
1709   MAME_DIR .. "src/mame/includes/fm7.h",
17101534   MAME_DIR .. "src/mame/video/fm7.cpp",
17111535}
17121536
r250222r250223
17181542createMESSProjects(_target, _subtarget, "galaxy")
17191543files {
17201544   MAME_DIR .. "src/mame/drivers/galaxy.cpp",
1721   MAME_DIR .. "src/mame/includes/galaxy.h",
17221545   MAME_DIR .. "src/mame/machine/galaxy.cpp",
17231546   MAME_DIR .. "src/mame/video/galaxy.cpp",
17241547}
r250222r250223
17271550files {
17281551   MAME_DIR .. "src/mame/drivers/gp2x.cpp",
17291552   MAME_DIR .. "src/mame/drivers/gp32.cpp",
1730   MAME_DIR .. "src/mame/includes/gp32.h",
17311553}
17321554
17331555createMESSProjects(_target, _subtarget, "gi")
r250222r250223
17381560createMESSProjects(_target, _subtarget, "grundy")
17391561files {
17401562   MAME_DIR .. "src/mame/drivers/newbrain.cpp",
1741   MAME_DIR .. "src/mame/includes/newbrain.h",
17421563   MAME_DIR .. "src/mame/video/newbrain.cpp",
17431564}
17441565
r250222r250223
17621583   MAME_DIR .. "src/mame/drivers/mmodular.cpp",
17631584   MAME_DIR .. "src/mame/drivers/stratos.cpp",
17641585   MAME_DIR .. "src/mame/machine/mboard.cpp",
1765   MAME_DIR .. "src/mame/includes/mboard.h",
17661586}
17671587
17681588createMESSProjects(_target, _subtarget, "hitachi")
r250222r250223
17991619files {
18001620   MAME_DIR .. "src/mame/drivers/hp16500.cpp",
18011621   MAME_DIR .. "src/mame/drivers/hp48.cpp",
1802   MAME_DIR .. "src/mame/includes/hp48.h",
18031622   MAME_DIR .. "src/mame/machine/hp48.cpp",
18041623   MAME_DIR .. "src/mame/video/hp48.cpp",
18051624   MAME_DIR .. "src/mame/drivers/hp49gp.cpp",
r250222r250223
18131632createMESSProjects(_target, _subtarget, "hec2hrp")
18141633files {
18151634   MAME_DIR .. "src/mame/drivers/hec2hrp.cpp",
1816   MAME_DIR .. "src/mame/includes/hec2hrp.h",
18171635   MAME_DIR .. "src/mame/machine/hec2hrp.cpp",
18181636   MAME_DIR .. "src/mame/machine/hecdisk2.cpp",
18191637   MAME_DIR .. "src/mame/video/hec2video.cpp",
r250222r250223
18331651   MAME_DIR .. "src/mame/drivers/ipds.cpp",
18341652   MAME_DIR .. "src/mame/drivers/isbc.cpp",
18351653   MAME_DIR .. "src/mame/machine/isbc_215g.cpp",
1836   MAME_DIR .. "src/mame/machine/isbc_215g.h",
18371654   MAME_DIR .. "src/mame/drivers/rex6000.cpp",
18381655   MAME_DIR .. "src/mame/drivers/sdk80.cpp",
18391656   MAME_DIR .. "src/mame/drivers/sdk85.cpp",
18401657   MAME_DIR .. "src/mame/drivers/sdk86.cpp",
18411658   MAME_DIR .. "src/mame/drivers/imds2.cpp",
1842   MAME_DIR .. "src/mame/includes/imds2.h",
18431659}
18441660
18451661createMESSProjects(_target, _subtarget, "imp")
r250222r250223
18511667createMESSProjects(_target, _subtarget, "interton")
18521668files {
18531669   MAME_DIR .. "src/mame/drivers/vc4000.cpp",
1854   MAME_DIR .. "src/mame/includes/vc4000.h",
18551670   MAME_DIR .. "src/mame/audio/vc4000snd.cpp",
1856   MAME_DIR .. "src/mame/audio/vc4000snd.h",
18571671   MAME_DIR .. "src/mame/video/vc4000.cpp",
18581672}
18591673
18601674createMESSProjects(_target, _subtarget, "intv")
18611675files {
18621676   MAME_DIR .. "src/mame/drivers/intv.cpp",
1863   MAME_DIR .. "src/mame/includes/intv.h",
18641677   MAME_DIR .. "src/mame/machine/intv.cpp",
18651678   MAME_DIR .. "src/mame/video/intv.cpp",
18661679   MAME_DIR .. "src/mame/video/stic.cpp",
1867   MAME_DIR .. "src/mame/video/stic.h",
18681680}
18691681
18701682createMESSProjects(_target, _subtarget, "isc")
r250222r250223
18751687createMESSProjects(_target, _subtarget, "kaypro")
18761688files {
18771689   MAME_DIR .. "src/mame/drivers/kaypro.cpp",
1878   MAME_DIR .. "src/mame/includes/kaypro.h",
18791690   MAME_DIR .. "src/mame/machine/kaypro.cpp",
18801691   MAME_DIR .. "src/mame/machine/kay_kbd.cpp",
18811692   MAME_DIR .. "src/mame/video/kaypro.cpp",
r250222r250223
18891700createMESSProjects(_target, _subtarget, "kyocera")
18901701files {
18911702   MAME_DIR .. "src/mame/drivers/kyocera.cpp",
1892   MAME_DIR .. "src/mame/includes/kyocera.h",
18931703   MAME_DIR .. "src/mame/video/kyocera.cpp",
18941704}
18951705
18961706createMESSProjects(_target, _subtarget, "luxor")
18971707files {
18981708   MAME_DIR .. "src/mame/drivers/abc80.cpp",
1899   MAME_DIR .. "src/mame/includes/abc80.h",
19001709   MAME_DIR .. "src/mame/machine/abc80kb.cpp",
1901   MAME_DIR .. "src/mame/machine/abc80kb.h",
19021710   MAME_DIR .. "src/mame/video/abc80.cpp",
19031711   MAME_DIR .. "src/mame/drivers/abc80x.cpp",
1904   MAME_DIR .. "src/mame/includes/abc80x.h",
19051712   MAME_DIR .. "src/mame/video/abc800.cpp",
19061713   MAME_DIR .. "src/mame/video/abc802.cpp",
19071714   MAME_DIR .. "src/mame/video/abc806.cpp",
19081715   MAME_DIR .. "src/mame/drivers/abc1600.cpp",
1909   MAME_DIR .. "src/mame/includes/abc1600.h",
19101716   MAME_DIR .. "src/mame/machine/abc1600mac.cpp",
1911   MAME_DIR .. "src/mame/machine/abc1600mac.h",
19121717   MAME_DIR .. "src/mame/video/abc1600.cpp",
1913   MAME_DIR .. "src/mame/video/abc1600.h",
19141718}
19151719
19161720createMESSProjects(_target, _subtarget, "magnavox")
r250222r250223
19311735createMESSProjects(_target, _subtarget, "mattel")
19321736files {
19331737   MAME_DIR .. "src/mame/drivers/aquarius.cpp",
1934   MAME_DIR .. "src/mame/includes/aquarius.h",
19351738   MAME_DIR .. "src/mame/video/aquarius.cpp",
19361739   MAME_DIR .. "src/mame/drivers/juicebox.cpp",
19371740   MAME_DIR .. "src/mame/drivers/hyperscan.cpp",
r250222r250223
19581761createMESSProjects(_target, _subtarget, "memotech")
19591762files {
19601763   MAME_DIR .. "src/mame/drivers/mtx.cpp",
1961   MAME_DIR .. "src/mame/includes/mtx.h",
19621764   MAME_DIR .. "src/mame/machine/mtx.cpp",
19631765}
19641766
r250222r250223
19701772createMESSProjects(_target, _subtarget, "microkey")
19711773files {
19721774   MAME_DIR .. "src/mame/drivers/primo.cpp",
1973   MAME_DIR .. "src/mame/includes/primo.h",
19741775   MAME_DIR .. "src/mame/machine/primo.cpp",
19751776   MAME_DIR .. "src/mame/video/primo.cpp",
19761777}
r250222r250223
19781779createMESSProjects(_target, _subtarget, "microsoft")
19791780files {
19801781   MAME_DIR .. "src/mame/drivers/xbox.cpp",
1981   MAME_DIR .. "src/mame/includes/xbox.h",
19821782}
19831783
19841784createMESSProjects(_target, _subtarget, "mit")
19851785files {
19861786   MAME_DIR .. "src/mame/drivers/tx0.cpp",
1987   MAME_DIR .. "src/mame/includes/tx0.h",
19881787   MAME_DIR .. "src/mame/video/crt.cpp",
1989   MAME_DIR .. "src/mame/video/crt.h",
19901788   MAME_DIR .. "src/mame/video/tx0.cpp",
19911789}
19921790
r250222r250223
20121810files {
20131811   MAME_DIR .. "src/mame/drivers/microdec.cpp",
20141812   MAME_DIR .. "src/mame/drivers/mpz80.cpp",
2015   MAME_DIR .. "src/mame/includes/mpz80.h",
20161813   MAME_DIR .. "src/mame/drivers/tricep.cpp",
20171814}
20181815
r250222r250223
20311828files {
20321829   MAME_DIR .. "src/mame/drivers/mkit09.cpp",
20331830   MAME_DIR .. "src/mame/drivers/mpf1.cpp",
2034   MAME_DIR .. "src/mame/includes/mpf1.h",
20351831}
20361832
20371833createMESSProjects(_target, _subtarget, "nakajima")
r250222r250223
20471843createMESSProjects(_target, _subtarget, "ne")
20481844files {
20491845   MAME_DIR .. "src/mame/drivers/z80ne.cpp",
2050   MAME_DIR .. "src/mame/includes/z80ne.h",
20511846   MAME_DIR .. "src/mame/machine/z80ne.cpp",
20521847}
20531848
r250222r250223
20551850files {
20561851   MAME_DIR .. "src/mame/drivers/apc.cpp",
20571852   MAME_DIR .. "src/mame/drivers/pce.cpp",
2058   MAME_DIR .. "src/mame/includes/pce.h",
20591853   MAME_DIR .. "src/mame/machine/pce.cpp",
20601854   MAME_DIR .. "src/mame/machine/pce_cd.cpp",
2061   MAME_DIR .. "src/mame/machine/pce_cd.h",
20621855   MAME_DIR .. "src/mame/drivers/pcfx.cpp",
20631856   MAME_DIR .. "src/mame/drivers/pc6001.cpp",
20641857   MAME_DIR .. "src/mame/drivers/pc8401a.cpp",
2065   MAME_DIR .. "src/mame/includes/pc8401a.h",
20661858   MAME_DIR .. "src/mame/video/pc8401a.cpp",
20671859   MAME_DIR .. "src/mame/drivers/pc8001.cpp",
2068   MAME_DIR .. "src/mame/includes/pc8001.h",
20691860   MAME_DIR .. "src/mame/drivers/pc8801.cpp",
20701861   MAME_DIR .. "src/mame/drivers/pc88va.cpp",
20711862   MAME_DIR .. "src/mame/drivers/pc100.cpp",
20721863   MAME_DIR .. "src/mame/drivers/pc9801.cpp",
20731864   MAME_DIR .. "src/mame/machine/pc9801_26.cpp",
2074   MAME_DIR .. "src/mame/machine/pc9801_26.h",
20751865   MAME_DIR .. "src/mame/machine/pc9801_86.cpp",
2076   MAME_DIR .. "src/mame/machine/pc9801_86.h",
20771866   MAME_DIR .. "src/mame/machine/pc9801_118.cpp",
2078   MAME_DIR .. "src/mame/machine/pc9801_118.h",
20791867   MAME_DIR .. "src/mame/machine/pc9801_cbus.cpp",
2080   MAME_DIR .. "src/mame/machine/pc9801_cbus.h",
20811868   MAME_DIR .. "src/mame/machine/pc9801_kbd.cpp",
2082   MAME_DIR .. "src/mame/machine/pc9801_kbd.h",
20831869   MAME_DIR .. "src/mame/drivers/tk80bs.cpp",
20841870   MAME_DIR .. "src/mame/drivers/hh_ucom4.cpp",
2085   MAME_DIR .. "src/mame/includes/hh_ucom4.h",
20861871}
20871872
20881873createMESSProjects(_target, _subtarget, "netronic")
20891874files {
20901875   MAME_DIR .. "src/mame/drivers/elf.cpp",
2091   MAME_DIR .. "src/mame/includes/elf.h",
20921876   MAME_DIR .. "src/mame/drivers/exp85.cpp",
2093   MAME_DIR .. "src/mame/includes/exp85.h",
20941877}
20951878
20961879createMESSProjects(_target, _subtarget, "next")
20971880files {
20981881   MAME_DIR .. "src/mame/drivers/next.cpp",
2099   MAME_DIR .. "src/mame/includes/next.h",
21001882   MAME_DIR .. "src/mame/machine/nextkbd.cpp",
2101   MAME_DIR .. "src/mame/machine/nextkbd.h",
21021883   MAME_DIR .. "src/mame/machine/nextmo.cpp",
2103   MAME_DIR .. "src/mame/machine/nextmo.h",
21041884}
21051885
21061886createMESSProjects(_target, _subtarget, "nintendo")
21071887files {
21081888   MAME_DIR .. "src/mame/drivers/gb.cpp",
2109   MAME_DIR .. "src/mame/includes/gb.h",
21101889   MAME_DIR .. "src/mame/audio/gb.cpp",
2111   MAME_DIR .. "src/mame/audio/gb.h",
21121890   MAME_DIR .. "src/mame/machine/gb.cpp",
21131891   MAME_DIR .. "src/mame/video/gb_lcd.cpp",
2114   MAME_DIR .. "src/mame/video/gb_lcd.h",
21151892   MAME_DIR .. "src/mame/drivers/gba.cpp",
2116   MAME_DIR .. "src/mame/includes/gba.h",
21171893   MAME_DIR .. "src/mame/video/gba.cpp",
21181894   MAME_DIR .. "src/mame/drivers/n64.cpp",
2119   MAME_DIR .. "src/mame/includes/n64.h",
21201895   MAME_DIR .. "src/mame/drivers/nes.cpp",
2121   MAME_DIR .. "src/mame/includes/nes.h",
21221896   MAME_DIR .. "src/mame/machine/nes.cpp",
21231897   MAME_DIR .. "src/mame/video/nes.cpp",
21241898   MAME_DIR .. "src/mame/drivers/pokemini.cpp",
21251899   MAME_DIR .. "src/mame/drivers/snes.cpp",
2126   MAME_DIR .. "src/mame/includes/snes.h",
21271900   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",
21331901   MAME_DIR .. "src/mame/drivers/vboy.cpp",
21341902   MAME_DIR .. "src/mame/audio/vboy.cpp",
2135   MAME_DIR .. "src/mame/audio/vboy.h",
21361903}
21371904
21381905createMESSProjects(_target, _subtarget, "nokia")
21391906files {
21401907   MAME_DIR .. "src/mame/drivers/mikromik.cpp",
2141   MAME_DIR .. "src/mame/includes/mikromik.h",
21421908   MAME_DIR .. "src/mame/machine/mm1kb.cpp",
2143   MAME_DIR .. "src/mame/machine/mm1kb.h",
21441909   MAME_DIR .. "src/mame/video/mikromik.cpp",
21451910}
21461911
r250222r250223
21541919   MAME_DIR .. "src/mame/drivers/mk1.cpp",
21551920   MAME_DIR .. "src/mame/drivers/mk2.cpp",
21561921   MAME_DIR .. "src/mame/drivers/ssystem3.cpp",
2157   MAME_DIR .. "src/mame/includes/ssystem3.h",
21581922   MAME_DIR .. "src/mame/video/ssystem3.cpp",
21591923   MAME_DIR .. "src/mame/drivers/supercon.cpp",
21601924}
r250222r250223
21631927files {
21641928   MAME_DIR .. "src/mame/drivers/m20.cpp",
21651929   MAME_DIR .. "src/mame/machine/m20_kbd.cpp",
2166   MAME_DIR .. "src/mame/machine/m20_kbd.h",
21671930   MAME_DIR .. "src/mame/machine/m20_8086.cpp",
2168   MAME_DIR .. "src/mame/machine/m20_8086.h",
21691931   MAME_DIR .. "src/mame/drivers/m24.cpp",
21701932   MAME_DIR .. "src/mame/machine/m24_kbd.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",
1933   MAME_DIR .. "src/mame/machine/m24_z8000.cpp"
21741934}
21751935
21761936createMESSProjects(_target, _subtarget, "olympia")
r250222r250223
21861946createMESSProjects(_target, _subtarget, "omnibyte")
21871947files {
21881948   MAME_DIR .. "src/mame/drivers/msbc1.cpp",
2189   MAME_DIR .. "src/mame/includes/msbc1.h",
21901949   MAME_DIR .. "src/mame/drivers/ob68k1a.cpp",
2191   MAME_DIR .. "src/mame/includes/ob68k1a.h",
21921950}
21931951
21941952createMESSProjects(_target, _subtarget, "orion")
21951953files {
21961954   MAME_DIR .. "src/mame/drivers/orion.cpp",
2197   MAME_DIR .. "src/mame/includes/orion.h",
21981955   MAME_DIR .. "src/mame/machine/orion.cpp",
21991956   MAME_DIR .. "src/mame/video/orion.cpp",
22001957}
r250222r250223
22021959createMESSProjects(_target, _subtarget, "osborne")
22031960files {
22041961   MAME_DIR .. "src/mame/drivers/osborne1.cpp",
2205   MAME_DIR .. "src/mame/includes/osborne1.h",
22061962   MAME_DIR .. "src/mame/machine/osborne1.cpp",
22071963   MAME_DIR .. "src/mame/drivers/osbexec.cpp",
22081964   MAME_DIR .. "src/mame/drivers/vixen.cpp",
2209   MAME_DIR .. "src/mame/includes/vixen.h",
22101965}
22111966
22121967createMESSProjects(_target, _subtarget, "osi")
22131968files {
22141969   MAME_DIR .. "src/mame/drivers/osi.cpp",
2215   MAME_DIR .. "src/mame/includes/osi.h",
22161970   MAME_DIR .. "src/mame/video/osi.cpp",
22171971}
22181972
22191973createMESSProjects(_target, _subtarget, "palm")
22201974files {
22211975   MAME_DIR .. "src/mame/drivers/palm.cpp",
2222   MAME_DIR .. "src/mame/drivers/palm_dbg.inc",
22231976   MAME_DIR .. "src/mame/drivers/palmz22.cpp",
22241977}
22251978
r250222r250223
22381991   MAME_DIR .. "src/mame/drivers/asst128.cpp",
22391992   MAME_DIR .. "src/mame/drivers/europc.cpp",
22401993   MAME_DIR .. "src/mame/drivers/genpc.cpp",
2241   MAME_DIR .. "src/mame/includes/genpc.h",
22421994   MAME_DIR .. "src/mame/machine/genpc.cpp",
22431995   MAME_DIR .. "src/mame/drivers/ibmpc.cpp",
22441996   MAME_DIR .. "src/mame/drivers/ibmpcjr.cpp",
22451997   MAME_DIR .. "src/mame/drivers/pc.cpp",
22461998   MAME_DIR .. "src/mame/drivers/tandy1t.cpp",
22471999   MAME_DIR .. "src/mame/video/pc_t1t.cpp",
2248   MAME_DIR .. "src/mame/video/pc_t1t.h",
22492000}
22502001
22512002createMESSProjects(_target, _subtarget, "pdp1")
22522003files {
22532004   MAME_DIR .. "src/mame/drivers/pdp1.cpp",
2254   MAME_DIR .. "src/mame/includes/pdp1.h",
22552005   MAME_DIR .. "src/mame/video/pdp1.cpp",
22562006}
22572007
22582008createMESSProjects(_target, _subtarget, "pel")
22592009files {
22602010   MAME_DIR .. "src/mame/drivers/galeb.cpp",
2261   MAME_DIR .. "src/mame/includes/galeb.h",
22622011   MAME_DIR .. "src/mame/video/galeb.cpp",
22632012      MAME_DIR .. "src/mame/drivers/orao.cpp",
2264   MAME_DIR .. "src/mame/includes/orao.h",
22652013   MAME_DIR .. "src/mame/machine/orao.cpp",
22662014   MAME_DIR .. "src/mame/video/orao.cpp",
22672015}
r250222r250223
22692017createMESSProjects(_target, _subtarget, "philips")
22702018files {
22712019   MAME_DIR .. "src/mame/drivers/p2000t.cpp",
2272   MAME_DIR .. "src/mame/includes/p2000t.h",
22732020   MAME_DIR .. "src/mame/machine/p2000t.cpp",
22742021   MAME_DIR .. "src/mame/video/p2000m.cpp",
22752022   MAME_DIR .. "src/mame/drivers/vg5k.cpp",
r250222r250223
22782025createMESSProjects(_target, _subtarget, "poly88")
22792026files {
22802027   MAME_DIR .. "src/mame/drivers/poly88.cpp",
2281   MAME_DIR .. "src/mame/includes/poly88.h",
22822028   MAME_DIR .. "src/mame/machine/poly88.cpp",
22832029   MAME_DIR .. "src/mame/video/poly88.cpp",
22842030}
r250222r250223
22862032createMESSProjects(_target, _subtarget, "psion")
22872033files {
22882034   MAME_DIR .. "src/mame/drivers/psion.cpp",
2289   MAME_DIR .. "src/mame/includes/psion.h",
22902035   MAME_DIR .. "src/mame/machine/psion_pack.cpp",
2291   MAME_DIR .. "src/mame/machine/psion_pack.h",
22922036}
22932037
22942038createMESSProjects(_target, _subtarget, "radio")
r250222r250223
22962040   MAME_DIR .. "src/mame/drivers/apogee.cpp",
22972041   MAME_DIR .. "src/mame/drivers/mikrosha.cpp",
22982042   MAME_DIR .. "src/mame/drivers/partner.cpp",
2299   MAME_DIR .. "src/mame/includes/partner.h",
23002043   MAME_DIR .. "src/mame/machine/partner.cpp",
23012044   MAME_DIR .. "src/mame/drivers/radio86.cpp",
2302   MAME_DIR .. "src/mame/includes/radio86.h",
23032045   MAME_DIR .. "src/mame/machine/radio86.cpp",
23042046}
23052047
r250222r250223
23082050   MAME_DIR .. "src/mame/drivers/microkit.cpp",
23092051   MAME_DIR .. "src/mame/drivers/studio2.cpp",
23102052   MAME_DIR .. "src/mame/drivers/vip.cpp",
2311   MAME_DIR .. "src/mame/includes/vip.h",
23122053}
23132054
23142055createMESSProjects(_target, _subtarget, "regnecentralen")
r250222r250223
23242065createMESSProjects(_target, _subtarget, "rm")
23252066files {
23262067   MAME_DIR .. "src/mame/drivers/rm380z.cpp",
2327   MAME_DIR .. "src/mame/includes/rm380z.h",
23282068   MAME_DIR .. "src/mame/machine/rm380z.cpp",
23292069   MAME_DIR .. "src/mame/video/rm380z.cpp",
23302070   MAME_DIR .. "src/mame/drivers/rmnimbus.cpp",
2331   MAME_DIR .. "src/mame/includes/rmnimbus.h",
23322071   MAME_DIR .. "src/mame/machine/rmnimbus.cpp",
23332072   MAME_DIR .. "src/mame/video/rmnimbus.cpp",
23342073   MAME_DIR .. "src/mame/machine/rmnkbd.cpp",
2335   MAME_DIR .. "src/mame/machine/rmnkbd.h",
23362074}
23372075
23382076createMESSProjects(_target, _subtarget, "robotron")
r250222r250223
23582096createMESSProjects(_target, _subtarget, "rockwell")
23592097files {
23602098   MAME_DIR .. "src/mame/drivers/aim65.cpp",
2361   MAME_DIR .. "src/mame/includes/aim65.h",
23622099   MAME_DIR .. "src/mame/machine/aim65.cpp",
23632100   MAME_DIR .. "src/mame/drivers/aim65_40.cpp",
23642101}
r250222r250223
23662103createMESSProjects(_target, _subtarget, "sage")
23672104files {
23682105   MAME_DIR .. "src/mame/drivers/sage2.cpp",
2369   MAME_DIR .. "src/mame/includes/sage2.h",
23702106}
23712107
23722108createMESSProjects(_target, _subtarget, "samcoupe")
23732109files {
23742110   MAME_DIR .. "src/mame/drivers/samcoupe.cpp",
2375   MAME_DIR .. "src/mame/includes/samcoupe.h",
23762111   MAME_DIR .. "src/mame/machine/samcoupe.cpp",
23772112   MAME_DIR .. "src/mame/video/samcoupe.cpp",
23782113}
r250222r250223
23862121files {
23872122   MAME_DIR .. "src/mame/drivers/mbc200.cpp",
23882123   MAME_DIR .. "src/mame/drivers/mbc55x.cpp",
2389   MAME_DIR .. "src/mame/includes/mbc55x.h",
23902124   MAME_DIR .. "src/mame/machine/mbc55x.cpp",
23912125   MAME_DIR .. "src/mame/video/mbc55x.cpp",
23922126   MAME_DIR .. "src/mame/drivers/phc25.cpp",
2393   MAME_DIR .. "src/mame/includes/phc25.h",
23942127}
23952128
23962129createMESSProjects(_target, _subtarget, "sega")
23972130files {
23982131   MAME_DIR .. "src/mame/drivers/dccons.cpp",
2399   MAME_DIR .. "src/mame/includes/dccons.h",
24002132   MAME_DIR .. "src/mame/machine/dccons.cpp",
24012133   MAME_DIR .. "src/mame/drivers/megadriv.cpp",
2402   MAME_DIR .. "src/mame/includes/megadriv.h",
2403   MAME_DIR .. "src/mame/includes/md_cons.h",
24042134   MAME_DIR .. "src/mame/drivers/saturn.cpp",
24052135   MAME_DIR .. "src/mame/drivers/segapico.cpp",
24062136   MAME_DIR .. "src/mame/drivers/sega_sawatte.cpp",
24072137   MAME_DIR .. "src/mame/drivers/segapm.cpp",
24082138   MAME_DIR .. "src/mame/drivers/sg1000.cpp",
2409   MAME_DIR .. "src/mame/includes/sg1000.h",
24102139   MAME_DIR .. "src/mame/drivers/sms.cpp",
2411   MAME_DIR .. "src/mame/includes/sms.h",
24122140   MAME_DIR .. "src/mame/machine/sms.cpp",
24132141   MAME_DIR .. "src/mame/drivers/svmu.cpp",
24142142   MAME_DIR .. "src/mame/machine/mega32x.cpp",
2415   MAME_DIR .. "src/mame/machine/mega32x.h",
24162143   MAME_DIR .. "src/mame/machine/megacd.cpp",
2417   MAME_DIR .. "src/mame/machine/megacd.h",
24182144   MAME_DIR .. "src/mame/machine/megacdcd.cpp",
2419   MAME_DIR .. "src/mame/machine/megacdcd.h",
24202145}
24212146
24222147createMESSProjects(_target, _subtarget, "sgi")
24232148files {
24242149   MAME_DIR .. "src/mame/machine/sgi.cpp",
2425   MAME_DIR .. "src/mame/machine/sgi.h",
24262150   MAME_DIR .. "src/mame/drivers/sgi_ip2.cpp",
24272151   MAME_DIR .. "src/mame/drivers/sgi_ip6.cpp",
24282152   MAME_DIR .. "src/mame/drivers/ip20.cpp",
24292153   MAME_DIR .. "src/mame/drivers/ip22.cpp",
24302154   MAME_DIR .. "src/mame/video/newport.cpp",
2431   MAME_DIR .. "src/mame/video/newport.h",
24322155}
24332156
24342157createMESSProjects(_target, _subtarget, "sharp")
r250222r250223
24362159   MAME_DIR .. "src/mame/drivers/hh_sm510.cpp",
24372160   MAME_DIR .. "src/mame/video/mz700.cpp",
24382161   MAME_DIR .. "src/mame/drivers/mz700.cpp",
2439   MAME_DIR .. "src/mame/includes/mz700.h",
24402162   MAME_DIR .. "src/mame/drivers/pc1500.cpp",
24412163   MAME_DIR .. "src/mame/drivers/pocketc.cpp",
2442   MAME_DIR .. "src/mame/includes/pocketc.h",
24432164   MAME_DIR .. "src/mame/video/pc1401.cpp",
24442165   MAME_DIR .. "src/mame/machine/pc1401.cpp",
2445   MAME_DIR .. "src/mame/includes/pc1401.h",
24462166   MAME_DIR .. "src/mame/video/pc1403.cpp",
24472167   MAME_DIR .. "src/mame/machine/pc1403.cpp",
2448   MAME_DIR .. "src/mame/includes/pc1403.h",
24492168   MAME_DIR .. "src/mame/video/pc1350.cpp",
24502169   MAME_DIR .. "src/mame/machine/pc1350.cpp",
2451   MAME_DIR .. "src/mame/includes/pc1350.h",
24522170   MAME_DIR .. "src/mame/video/pc1251.cpp",
24532171   MAME_DIR .. "src/mame/machine/pc1251.cpp",
2454   MAME_DIR .. "src/mame/includes/pc1251.h",
24552172   MAME_DIR .. "src/mame/video/pocketc.cpp",
24562173   MAME_DIR .. "src/mame/machine/mz700.cpp",
24572174   MAME_DIR .. "src/mame/drivers/x68k.cpp",
2458   MAME_DIR .. "src/mame/includes/x68k.h",
24592175   MAME_DIR .. "src/mame/video/x68k.cpp",
24602176   MAME_DIR .. "src/mame/machine/x68k_hdc.cpp",
2461   MAME_DIR .. "src/mame/machine/x68k_hdc.h",
24622177   MAME_DIR .. "src/mame/machine/x68k_kbd.cpp",
2463   MAME_DIR .. "src/mame/machine/x68k_kbd.h",
24642178   MAME_DIR .. "src/mame/drivers/mz80.cpp",
2465   MAME_DIR .. "src/mame/includes/mz80.h",
24662179   MAME_DIR .. "src/mame/video/mz80.cpp",
24672180   MAME_DIR .. "src/mame/machine/mz80.cpp",
24682181   MAME_DIR .. "src/mame/drivers/mz2000.cpp",
24692182   MAME_DIR .. "src/mame/drivers/x1.cpp",
2470   MAME_DIR .. "src/mame/includes/x1.h",
24712183   MAME_DIR .. "src/mame/machine/x1.cpp",
24722184   MAME_DIR .. "src/mame/drivers/x1twin.cpp",
24732185   MAME_DIR .. "src/mame/drivers/mz2500.cpp",
24742186   MAME_DIR .. "src/mame/drivers/mz3500.cpp",
24752187   MAME_DIR .. "src/mame/drivers/pce220.cpp",
24762188   MAME_DIR .. "src/mame/machine/pce220_ser.cpp",
2477   MAME_DIR .. "src/mame/machine/pce220_ser.h",
24782189   MAME_DIR .. "src/mame/drivers/mz6500.cpp",
24792190   MAME_DIR .. "src/mame/drivers/zaurus.cpp",
2480   MAME_DIR .. "src/mame/machine/pxa255.h",
24812191}
24822192
24832193createMESSProjects(_target, _subtarget, "sinclair")
r250222r250223
24862196   MAME_DIR .. "src/mame/video/timex.cpp",
24872197   MAME_DIR .. "src/mame/video/zx.cpp",
24882198   MAME_DIR .. "src/mame/drivers/zx.cpp",
2489   MAME_DIR .. "src/mame/includes/zx.h",
24902199   MAME_DIR .. "src/mame/machine/zx.cpp",
24912200   MAME_DIR .. "src/mame/drivers/spectrum.cpp",
2492   MAME_DIR .. "src/mame/includes/spectrum.h",
24932201   MAME_DIR .. "src/mame/drivers/spec128.cpp",
24942202   MAME_DIR .. "src/mame/drivers/timex.cpp",
24952203   MAME_DIR .. "src/mame/drivers/specpls3.cpp",
r250222r250223
24972205   MAME_DIR .. "src/mame/drivers/atm.cpp",
24982206   MAME_DIR .. "src/mame/drivers/pentagon.cpp",
24992207   MAME_DIR .. "src/mame/machine/beta.cpp",
2500   MAME_DIR .. "src/mame/machine/beta.h",
25012208   MAME_DIR .. "src/mame/machine/spec_snqk.cpp",
2502   MAME_DIR .. "src/mame/machine/spec_snqk.h",
25032209   MAME_DIR .. "src/mame/drivers/ql.cpp",
2504   MAME_DIR .. "src/mame/includes/ql.h",
25052210   MAME_DIR .. "src/mame/machine/qimi.cpp",
2506   MAME_DIR .. "src/mame/machine/qimi.h",
25072211   MAME_DIR .. "src/mame/video/zx8301.cpp",
2508   MAME_DIR .. "src/mame/video/zx8301.h",
25092212   MAME_DIR .. "src/mame/machine/zx8302.cpp",
2510   MAME_DIR .. "src/mame/machine/zx8302.h",
25112213}
25122214
25132215createMESSProjects(_target, _subtarget, "siemens")
25142216files {
25152217   MAME_DIR .. "src/mame/drivers/pcd.cpp",
25162218   MAME_DIR .. "src/mame/machine/pcd_kbd.cpp",
2517   MAME_DIR .. "src/mame/machine/pcd_kbd.h",
25182219   MAME_DIR .. "src/mame/video/pcd.cpp",
2519   MAME_DIR .. "src/mame/video/pcd.h",
25202220}
25212221
25222222createMESSProjects(_target, _subtarget, "slicer")
r250222r250223
25292229   MAME_DIR .. "src/mame/drivers/ng_aes.cpp",
25302230   MAME_DIR .. "src/mame/drivers/ngp.cpp",
25312231   MAME_DIR .. "src/mame/video/k1ge.cpp",
2532   MAME_DIR .. "src/mame/video/k1ge.h",
25332232}
25342233
25352234createMESSProjects(_target, _subtarget, "sony")
r250222r250223
25372236   MAME_DIR .. "src/mame/drivers/pockstat.cpp",
25382237   MAME_DIR .. "src/mame/drivers/psx.cpp",
25392238   MAME_DIR .. "src/mame/machine/psxcd.cpp",
2540   MAME_DIR .. "src/mame/machine/psxcd.h",
25412239   MAME_DIR .. "src/mame/drivers/pve500.cpp",
25422240   MAME_DIR .. "src/mame/drivers/smc777.cpp",
25432241}
r250222r250223
25452243createMESSProjects(_target, _subtarget, "sord")
25462244files {
25472245   MAME_DIR .. "src/mame/drivers/m5.cpp",
2548   MAME_DIR .. "src/mame/includes/m5.h",
25492246}
25502247
25512248createMESSProjects(_target, _subtarget, "special")
25522249files {
25532250   MAME_DIR .. "src/mame/drivers/special.cpp",
2554   MAME_DIR .. "src/mame/includes/special.h",
25552251   MAME_DIR .. "src/mame/audio/specimx_snd.cpp",
2556   MAME_DIR .. "src/mame/audio/specimx_snd.h",
25572252   MAME_DIR .. "src/mame/machine/special.cpp",
25582253   MAME_DIR .. "src/mame/video/special.cpp",
25592254}
r250222r250223
25692264createMESSProjects(_target, _subtarget, "svi")
25702265files {
25712266   MAME_DIR .. "src/mame/drivers/svi318.cpp",
2572   MAME_DIR .. "src/mame/includes/svi318.h",
25732267   MAME_DIR .. "src/mame/machine/svi318.cpp",
25742268}
25752269
25762270createMESSProjects(_target, _subtarget, "svision")
25772271files {
25782272   MAME_DIR .. "src/mame/drivers/svision.cpp",
2579   MAME_DIR .. "src/mame/includes/svision.h",
25802273   MAME_DIR .. "src/mame/audio/svis_snd.cpp",
2581   MAME_DIR .. "src/mame/audio/svis_snd.h",
25822274}
25832275
25842276createMESSProjects(_target, _subtarget, "swtpc09")
25852277files {
25862278   MAME_DIR .. "src/mame/drivers/swtpc09.cpp",
2587   MAME_DIR .. "src/mame/includes/swtpc09.h",
25882279   MAME_DIR .. "src/mame/machine/swtpc09.cpp",
25892280}
25902281
r250222r250223
26012292createMESSProjects(_target, _subtarget, "tandberg")
26022293files {
26032294   MAME_DIR .. "src/mame/drivers/tdv2324.cpp",
2604   MAME_DIR .. "src/mame/includes/tdv2324.h",
26052295}
26062296
26072297createMESSProjects(_target, _subtarget, "tangerin")
26082298files {
26092299   MAME_DIR .. "src/mame/drivers/microtan.cpp",
2610   MAME_DIR .. "src/mame/includes/microtan.h",
26112300   MAME_DIR .. "src/mame/machine/microtan.cpp",
26122301   MAME_DIR .. "src/mame/video/microtan.cpp",
26132302   MAME_DIR .. "src/mame/drivers/oric.cpp",
r250222r250223
26162305createMESSProjects(_target, _subtarget, "tatung")
26172306files {
26182307   MAME_DIR .. "src/mame/drivers/einstein.cpp",
2619   MAME_DIR .. "src/mame/includes/einstein.h",
26202308   MAME_DIR .. "src/mame/machine/einstein.cpp",
26212309}
26222310
26232311createMESSProjects(_target, _subtarget, "teamconc")
26242312files {
26252313   MAME_DIR .. "src/mame/drivers/comquest.cpp",
2626   MAME_DIR .. "src/mame/includes/comquest.h",
26272314   MAME_DIR .. "src/mame/video/comquest.cpp",
26282315}
26292316
26302317createMESSProjects(_target, _subtarget, "tektroni")
26312318files {
26322319   MAME_DIR .. "src/mame/drivers/tek405x.cpp",
2633   MAME_DIR .. "src/mame/includes/tek405x.h",
26342320   MAME_DIR .. "src/mame/drivers/tek410x.cpp",
26352321}
26362322
26372323createMESSProjects(_target, _subtarget, "telenova")
26382324files {
26392325   MAME_DIR .. "src/mame/drivers/compis.cpp",
2640   MAME_DIR .. "src/mame/includes/compis.h",
26412326   MAME_DIR .. "src/mame/machine/compiskb.cpp",
2642   MAME_DIR .. "src/mame/machine/compiskb.h",
26432327}
26442328
26452329createMESSProjects(_target, _subtarget, "telercas")
26462330files {
26472331   MAME_DIR .. "src/mame/drivers/tmc1800.cpp",
2648   MAME_DIR .. "src/mame/includes/tmc1800.h",
26492332   MAME_DIR .. "src/mame/video/tmc1800.cpp",
26502333   MAME_DIR .. "src/mame/drivers/tmc600.cpp",
2651   MAME_DIR .. "src/mame/includes/tmc600.h",
26522334   MAME_DIR .. "src/mame/video/tmc600.cpp",
26532335   MAME_DIR .. "src/mame/drivers/tmc2000e.cpp",
2654   MAME_DIR .. "src/mame/includes/tmc2000e.h",
26552336}
26562337
26572338createMESSProjects(_target, _subtarget, "televideo")
r250222r250223
26702351createMESSProjects(_target, _subtarget, "tesla")
26712352files {
26722353   MAME_DIR .. "src/mame/drivers/ondra.cpp",
2673   MAME_DIR .. "src/mame/includes/ondra.h",
26742354   MAME_DIR .. "src/mame/machine/ondra.cpp",
26752355   MAME_DIR .. "src/mame/video/ondra.cpp",
26762356   MAME_DIR .. "src/mame/drivers/pmd85.cpp",
2677   MAME_DIR .. "src/mame/includes/pmd85.h",
26782357   MAME_DIR .. "src/mame/machine/pmd85.cpp",
26792358   MAME_DIR .. "src/mame/drivers/pmi80.cpp",
26802359   MAME_DIR .. "src/mame/drivers/sapi1.cpp",
r250222r250223
26892368createMESSProjects(_target, _subtarget, "thomson")
26902369files {
26912370   MAME_DIR .. "src/mame/drivers/thomson.cpp",
2692   MAME_DIR .. "src/mame/includes/thomson.h",
26932371   MAME_DIR .. "src/mame/machine/thomson.cpp",
26942372   MAME_DIR .. "src/mame/machine/thomflop.cpp",
2695   MAME_DIR .. "src/mame/machine/thomflop.h",
26962373   MAME_DIR .. "src/mame/video/thomson.cpp",
26972374}
26982375
26992376createMESSProjects(_target, _subtarget, "ti")
27002377files {
27012378   MAME_DIR .. "src/mame/drivers/avigo.cpp",
2702   MAME_DIR .. "src/mame/includes/avigo.h",
27032379   MAME_DIR .. "src/mame/video/avigo.cpp",
27042380   MAME_DIR .. "src/mame/drivers/cc40.cpp",
27052381   MAME_DIR .. "src/mame/drivers/evmbug.cpp",
r250222r250223
27092385   MAME_DIR .. "src/mame/drivers/tispeak.cpp",
27102386   MAME_DIR .. "src/mame/drivers/ti74.cpp",
27112387   MAME_DIR .. "src/mame/drivers/ti85.cpp",
2712   MAME_DIR .. "src/mame/includes/ti85.h",
27132388   MAME_DIR .. "src/mame/machine/ti85.cpp",
27142389   MAME_DIR .. "src/mame/video/ti85.cpp",
27152390   MAME_DIR .. "src/mame/drivers/ti89.cpp",
2716   MAME_DIR .. "src/mame/includes/ti89.h",
27172391   MAME_DIR .. "src/mame/drivers/ti99_2.cpp",
27182392   MAME_DIR .. "src/mame/drivers/ti99_4x.cpp",
27192393   MAME_DIR .. "src/mame/drivers/ti99_4p.cpp",
r250222r250223
27222396   MAME_DIR .. "src/mame/drivers/ti990_10.cpp",
27232397   MAME_DIR .. "src/mame/drivers/tm990189.cpp",
27242398   MAME_DIR .. "src/mame/video/733_asr.cpp",
2725   MAME_DIR .. "src/mame/video/733_asr.h",
27262399   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",
27302400   MAME_DIR .. "src/mame/drivers/hh_tms1k.cpp",
2731   MAME_DIR .. "src/mame/includes/hh_tms1k.h",
27322401}
27332402
27342403createMESSProjects(_target, _subtarget, "tiger")
27352404files {
27362405   MAME_DIR .. "src/mame/drivers/gamecom.cpp",
2737   MAME_DIR .. "src/mame/includes/gamecom.h",
27382406   MAME_DIR .. "src/mame/machine/gamecom.cpp",
27392407   MAME_DIR .. "src/mame/video/gamecom.cpp",
27402408}
r250222r250223
27432411files {
27442412   MAME_DIR .. "src/mame/drivers/gizmondo.cpp",
27452413   MAME_DIR .. "src/mame/machine/docg3.cpp",
2746   MAME_DIR .. "src/mame/machine/docg3.h",
27472414}
27482415
27492416createMESSProjects(_target, _subtarget, "tiki")
27502417files {
27512418   MAME_DIR .. "src/mame/drivers/tiki100.cpp",
2752   MAME_DIR .. "src/mame/includes/tiki100.h",
27532419}
27542420
27552421createMESSProjects(_target, _subtarget, "tomy")
r250222r250223
27602426createMESSProjects(_target, _subtarget, "toshiba")
27612427files {
27622428   MAME_DIR .. "src/mame/drivers/pasopia.cpp",
2763   MAME_DIR .. "src/mame/includes/pasopia.h",
27642429   MAME_DIR .. "src/mame/drivers/pasopia7.cpp",
27652430   MAME_DIR .. "src/mame/drivers/paso1600.cpp",
27662431}
r250222r250223
27842449createMESSProjects(_target, _subtarget, "trs")
27852450files {
27862451   MAME_DIR .. "src/mame/drivers/coco12.cpp",
2787   MAME_DIR .. "src/mame/includes/coco12.h",
27882452   MAME_DIR .. "src/mame/drivers/coco3.cpp",
2789   MAME_DIR .. "src/mame/includes/coco3.h",
27902453   MAME_DIR .. "src/mame/drivers/dragon.cpp",
2791   MAME_DIR .. "src/mame/includes/dragon.h",
27922454   MAME_DIR .. "src/mame/drivers/mc10.cpp",
27932455   MAME_DIR .. "src/mame/machine/6883sam.cpp",
2794   MAME_DIR .. "src/mame/machine/6883sam.h",
27952456   MAME_DIR .. "src/mame/machine/coco.cpp",
2796   MAME_DIR .. "src/mame/includes/coco.h",
27972457   MAME_DIR .. "src/mame/machine/coco12.cpp",
27982458   MAME_DIR .. "src/mame/machine/coco3.cpp",
27992459   MAME_DIR .. "src/mame/machine/coco_vhd.cpp",
2800   MAME_DIR .. "src/mame/machine/coco_vhd.h",
28012460   MAME_DIR .. "src/mame/machine/dragon.cpp",
28022461   MAME_DIR .. "src/mame/machine/dgnalpha.cpp",
2803   MAME_DIR .. "src/mame/includes/dgnalpha.h",
28042462   MAME_DIR .. "src/mame/video/gime.cpp",
2805   MAME_DIR .. "src/mame/video/gime.h",
28062463   MAME_DIR .. "src/mame/drivers/trs80.cpp",
2807   MAME_DIR .. "src/mame/includes/trs80.h",
28082464   MAME_DIR .. "src/mame/machine/trs80.cpp",
28092465   MAME_DIR .. "src/mame/video/trs80.cpp",
28102466   MAME_DIR .. "src/mame/drivers/trs80m2.cpp",
2811   MAME_DIR .. "src/mame/includes/trs80m2.h",
28122467   MAME_DIR .. "src/mame/machine/trs80m2kb.cpp",
2813   MAME_DIR .. "src/mame/machine/trs80m2kb.h",
28142468   MAME_DIR .. "src/mame/drivers/tandy2k.cpp",
2815   MAME_DIR .. "src/mame/includes/tandy2k.h",
28162469   MAME_DIR .. "src/mame/machine/tandy2kb.cpp",
2817   MAME_DIR .. "src/mame/machine/tandy2kb.h",
28182470}
28192471
28202472createMESSProjects(_target, _subtarget, "ultimachine")
r250222r250223
28312483files {
28322484   MAME_DIR .. "src/mame/drivers/unichamp.cpp",
28332485   MAME_DIR .. "src/mame/video/gic.cpp",
2834   MAME_DIR .. "src/mame/video/gic.h",
28352486   MAME_DIR .. "src/mame/video/gic.cpp",
2836   MAME_DIR .. "src/mame/video/gic.h",
28372487}
28382488
28392489
r250222r250223
28462496files {
28472497   MAME_DIR .. "src/mame/drivers/chessmst.cpp",
28482498   MAME_DIR .. "src/mame/drivers/kc.cpp",
2849   MAME_DIR .. "src/mame/includes/kc.h",
28502499   MAME_DIR .. "src/mame/machine/kc.cpp",
28512500   MAME_DIR .. "src/mame/machine/kc_keyb.cpp",
2852   MAME_DIR .. "src/mame/machine/kc_keyb.h",
28532501   MAME_DIR .. "src/mame/video/kc.cpp",
28542502   MAME_DIR .. "src/mame/drivers/lc80.cpp",
2855   MAME_DIR .. "src/mame/includes/lc80.h",
28562503   MAME_DIR .. "src/mame/drivers/mc80.cpp",
2857   MAME_DIR .. "src/mame/includes/mc80.h",
28582504   MAME_DIR .. "src/mame/machine/mc80.cpp",
28592505   MAME_DIR .. "src/mame/video/mc80.cpp",
28602506   MAME_DIR .. "src/mame/drivers/poly880.cpp",
2861   MAME_DIR .. "src/mame/includes/poly880.h",
28622507   MAME_DIR .. "src/mame/drivers/sc1.cpp",
28632508   MAME_DIR .. "src/mame/drivers/sc2.cpp",
28642509}
r250222r250223
28662511createMESSProjects(_target, _subtarget, "vidbrain")
28672512files {
28682513   MAME_DIR .. "src/mame/drivers/vidbrain.cpp",
2869   MAME_DIR .. "src/mame/includes/vidbrain.h",
28702514   MAME_DIR .. "src/mame/video/uv201.cpp",
2871   MAME_DIR .. "src/mame/video/uv201.h",
28722515}
28732516
28742517createMESSProjects(_target, _subtarget, "videoton")
28752518files {
28762519   MAME_DIR .. "src/mame/drivers/tvc.cpp",
28772520   MAME_DIR .. "src/mame/audio/tvc_snd.cpp",
2878   MAME_DIR .. "src/mame/audio/tvc_snd.h",
28792521}
28802522
28812523createMESSProjects(_target, _subtarget, "visual")
28822524files {
28832525   MAME_DIR .. "src/mame/drivers/v1050.cpp",
2884   MAME_DIR .. "src/mame/includes/v1050.h",
28852526   MAME_DIR .. "src/mame/machine/v1050kb.cpp",
2886   MAME_DIR .. "src/mame/machine/v1050kb.h",
28872527   MAME_DIR .. "src/mame/video/v1050.cpp",
28882528}
28892529
r250222r250223
28962536createMESSProjects(_target, _subtarget, "vtech")
28972537files {
28982538   MAME_DIR .. "src/mame/drivers/crvision.cpp",
2899   MAME_DIR .. "src/mame/includes/crvision.h",
29002539   MAME_DIR .. "src/mame/drivers/geniusiq.cpp",
29012540   MAME_DIR .. "src/mame/drivers/laser3k.cpp",
29022541   MAME_DIR .. "src/mame/drivers/lcmate2.cpp",
29032542   MAME_DIR .. "src/mame/drivers/pc4.cpp",
2904   MAME_DIR .. "src/mame/includes/pc4.h",
29052543   MAME_DIR .. "src/mame/video/pc4.cpp",
29062544   MAME_DIR .. "src/mame/drivers/pc2000.cpp",
29072545   MAME_DIR .. "src/mame/drivers/pitagjr.cpp",
29082546   MAME_DIR .. "src/mame/drivers/prestige.cpp",
29092547   MAME_DIR .. "src/mame/drivers/vtech1.cpp",
29102548   MAME_DIR .. "src/mame/drivers/vtech2.cpp",
2911   MAME_DIR .. "src/mame/includes/vtech2.h",
29122549   MAME_DIR .. "src/mame/machine/vtech2.cpp",
29132550   MAME_DIR .. "src/mame/video/vtech2.cpp",
29142551   MAME_DIR .. "src/mame/drivers/socrates.cpp",
29152552   MAME_DIR .. "src/mame/audio/socrates.cpp",
2916   MAME_DIR .. "src/mame/audio/socrates.h",
29172553}
29182554
29192555createMESSProjects(_target, _subtarget, "wang")
29202556files {
29212557   MAME_DIR .. "src/mame/drivers/wangpc.cpp",
2922   MAME_DIR .. "src/mame/includes/wangpc.h",
29232558   MAME_DIR .. "src/mame/machine/wangpckb.cpp",
2924   MAME_DIR .. "src/mame/machine/wangpckb.h",
29252559}
29262560
29272561createMESSProjects(_target, _subtarget, "wavemate")
29282562files {
29292563   MAME_DIR .. "src/mame/drivers/bullet.cpp",
2930   MAME_DIR .. "src/mame/includes/bullet.h",
29312564   MAME_DIR .. "src/mame/drivers/jupiter.cpp",
2932   MAME_DIR .. "src/mame/includes/jupiter.h",
29332565}
29342566
29352567createMESSProjects(_target, _subtarget, "xerox")
29362568files {
29372569   MAME_DIR .. "src/mame/drivers/xerox820.cpp",
2938   MAME_DIR .. "src/mame/includes/xerox820.h",
29392570   MAME_DIR .. "src/mame/machine/x820kb.cpp",
2940   MAME_DIR .. "src/mame/machine/x820kb.h",
29412571   MAME_DIR .. "src/mame/drivers/bigbord2.cpp",
29422572   MAME_DIR .. "src/mame/drivers/alto2.cpp",
29432573}
r250222r250223
29452575createMESSProjects(_target, _subtarget, "xussrpc")
29462576files {
29472577   MAME_DIR .. "src/mame/drivers/ec184x.cpp",
2948   MAME_DIR .. "src/mame/includes/ec184x.h",
29492578   MAME_DIR .. "src/mame/drivers/iskr103x.cpp",
29502579   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",
29532580   MAME_DIR .. "src/mame/drivers/poisk1.cpp",
2954   MAME_DIR .. "src/mame/machine/kb_poisk1.h",
2955   MAME_DIR .. "src/mame/includes/poisk1.h",
29562581   MAME_DIR .. "src/mame/video/poisk1.cpp",
2957   MAME_DIR .. "src/mame/video/poisk1.h",
29582582}
29592583
29602584createMESSProjects(_target, _subtarget, "yamaha")
r250222r250223
29822606createMESSProjects(_target, _subtarget, "zvt")
29832607files {
29842608   MAME_DIR .. "src/mame/drivers/pp01.cpp",
2985   MAME_DIR .. "src/mame/includes/pp01.h",
29862609   MAME_DIR .. "src/mame/machine/pp01.cpp",
29872610   MAME_DIR .. "src/mame/video/pp01.cpp",
29882611}
r250222r250223
29952618   MAME_DIR .. "src/mame/drivers/applix.cpp",
29962619   MAME_DIR .. "src/mame/drivers/attache.cpp",
29972620   MAME_DIR .. "src/mame/drivers/aussiebyte.cpp",
2998   MAME_DIR .. "src/mame/includes/aussiebyte.h",
29992621   MAME_DIR .. "src/mame/video/aussiebyte.cpp",
30002622   MAME_DIR .. "src/mame/drivers/ax20.cpp",
30012623   MAME_DIR .. "src/mame/drivers/beehive.cpp",
r250222r250223
30042626   MAME_DIR .. "src/mame/drivers/bitgraph.cpp",
30052627   MAME_DIR .. "src/mame/drivers/br8641.cpp",
30062628   MAME_DIR .. "src/mame/drivers/busicom.cpp",
3007   MAME_DIR .. "src/mame/includes/busicom.h",
30082629   MAME_DIR .. "src/mame/video/busicom.cpp",
30092630   MAME_DIR .. "src/mame/drivers/chaos.cpp",
30102631   MAME_DIR .. "src/mame/drivers/chesstrv.cpp",
r250222r250223
30132634   MAME_DIR .. "src/mame/drivers/codata.cpp",
30142635   MAME_DIR .. "src/mame/drivers/cortex.cpp",
30152636   MAME_DIR .. "src/mame/drivers/cosmicos.cpp",
3016   MAME_DIR .. "src/mame/includes/cosmicos.h",
30172637   MAME_DIR .. "src/mame/drivers/cp1.cpp",
30182638   MAME_DIR .. "src/mame/drivers/cxhumax.cpp",
3019   MAME_DIR .. "src/mame/includes/cxhumax.h",
30202639   MAME_DIR .. "src/mame/drivers/czk80.cpp",
30212640   MAME_DIR .. "src/mame/drivers/d6800.cpp",
30222641   MAME_DIR .. "src/mame/drivers/d6809.cpp",
r250222r250223
30242643   MAME_DIR .. "src/mame/drivers/digel804.cpp",
30252644   MAME_DIR .. "src/mame/drivers/dim68k.cpp",
30262645   MAME_DIR .. "src/mame/drivers/dm7000.cpp",
3027   MAME_DIR .. "src/mame/includes/dm7000.h",
30282646   MAME_DIR .. "src/mame/drivers/dmv.cpp",
30292647   MAME_DIR .. "src/mame/machine/dmv_keyb.cpp",
3030   MAME_DIR .. "src/mame/machine/dmv_keyb.h",
30312648   MAME_DIR .. "src/mame/drivers/dps1.cpp",
30322649   MAME_DIR .. "src/mame/drivers/dsb46.cpp",
30332650   MAME_DIR .. "src/mame/drivers/dual68.cpp",
30342651   MAME_DIR .. "src/mame/drivers/eacc.cpp",
30352652   MAME_DIR .. "src/mame/drivers/elwro800.cpp",
30362653   MAME_DIR .. "src/mame/drivers/eti660.cpp",
3037   MAME_DIR .. "src/mame/includes/eti660.h",
30382654   MAME_DIR .. "src/mame/drivers/excali64.cpp",
30392655   MAME_DIR .. "src/mame/drivers/fanucs15.cpp",
30402656   MAME_DIR .. "src/mame/drivers/fanucspmg.cpp",
r250222r250223
30422658   MAME_DIR .. "src/mame/drivers/fk1.cpp",
30432659   MAME_DIR .. "src/mame/drivers/ft68m.cpp",
30442660   MAME_DIR .. "src/mame/drivers/gamate.cpp",
3045   MAME_DIR .. "src/mame/includes/gamate.h",
30462661   MAME_DIR .. "src/mame/audio/gamate.cpp",
30472662   MAME_DIR .. "src/mame/drivers/gameking.cpp",
30482663   MAME_DIR .. "src/mame/drivers/gimix.cpp",
r250222r250223
30572672   MAME_DIR .. "src/mame/drivers/icatel.cpp",
30582673   MAME_DIR .. "src/mame/drivers/ie15.cpp",
30592674   MAME_DIR .. "src/mame/machine/ie15_kbd.cpp",
3060   MAME_DIR .. "src/mame/machine/ie15_kbd.h",
30612675   MAME_DIR .. "src/mame/drivers/if800.cpp",
30622676   MAME_DIR .. "src/mame/drivers/imsai.cpp",
30632677   MAME_DIR .. "src/mame/drivers/indiana.cpp",
r250222r250223
30752689   MAME_DIR .. "src/mame/drivers/mice.cpp",
30762690   MAME_DIR .. "src/mame/drivers/micral.cpp",
30772691   MAME_DIR .. "src/mame/drivers/micronic.cpp",
3078   MAME_DIR .. "src/mame/includes/micronic.h",
30792692   MAME_DIR .. "src/mame/drivers/mini2440.cpp",
30802693   MAME_DIR .. "src/mame/drivers/mmd1.cpp",
30812694   MAME_DIR .. "src/mame/drivers/mod8.cpp",
r250222r250223
30902703   MAME_DIR .. "src/mame/drivers/myvision.cpp",
30912704   MAME_DIR .. "src/mame/drivers/ngen.cpp",
30922705   MAME_DIR .. "src/mame/machine/ngen_kb.cpp",
3093   MAME_DIR .. "src/mame/machine/ngen_kb.h",
30942706   MAME_DIR .. "src/mame/drivers/octopus.cpp",
30952707   MAME_DIR .. "src/mame/drivers/onyx.cpp",
30962708   MAME_DIR .. "src/mame/drivers/okean240.cpp",
r250222r250223
30982710   MAME_DIR .. "src/mame/drivers/pegasus.cpp",
30992711   MAME_DIR .. "src/mame/drivers/pencil2.cpp",
31002712   MAME_DIR .. "src/mame/drivers/pes.cpp",
3101   MAME_DIR .. "src/mame/includes/pes.h",
31022713   MAME_DIR .. "src/mame/drivers/pipbug.cpp",
31032714   MAME_DIR .. "src/mame/drivers/plan80.cpp",
31042715   MAME_DIR .. "src/mame/drivers/pm68k.cpp",
r250222r250223
31162727   MAME_DIR .. "src/mame/drivers/seattlecmp.cpp",
31172728   MAME_DIR .. "src/mame/drivers/sh4robot.cpp",
31182729   MAME_DIR .. "src/mame/drivers/softbox.cpp",
3119   MAME_DIR .. "src/mame/includes/softbox.h",
31202730   MAME_DIR .. "src/mame/drivers/squale.cpp",
31212731   MAME_DIR .. "src/mame/drivers/swtpc.cpp",
31222732   MAME_DIR .. "src/mame/drivers/swyft.cpp",
r250222r250223
31272737   MAME_DIR .. "src/mame/drivers/terak.cpp",
31282738   MAME_DIR .. "src/mame/drivers/ti630.cpp",
31292739   MAME_DIR .. "src/mame/drivers/tsispch.cpp",
3130   MAME_DIR .. "src/mame/includes/tsispch.h",
31312740   MAME_DIR .. "src/mame/drivers/tvgame.cpp",
31322741   MAME_DIR .. "src/mame/drivers/unistar.cpp",
31332742   MAME_DIR .. "src/mame/drivers/v6809.cpp",
r250222r250223
31352744   MAME_DIR .. "src/mame/drivers/vii.cpp",
31362745   MAME_DIR .. "src/mame/drivers/wicat.cpp",
31372746   MAME_DIR .. "src/mame/drivers/xor100.cpp",
3138   MAME_DIR .. "src/mame/includes/xor100.h",
31392747   MAME_DIR .. "src/mame/drivers/xavix.cpp",
31402748   MAME_DIR .. "src/mame/drivers/zorba.cpp",
31412749}
trunk/scripts/target/mame/nl.lua
r250222r250223
9797      GEN_DIR  .. "mame/layout",
9898   }
9999
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",
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",
105105
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",
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",
112110
113}
111   }
114112end
115113
116114function linkProjects_mame_nl(_target, _subtarget)
trunk/scripts/target/mame/tiny.lua
r250222r250223
9292      GEN_DIR  .. "mame/layout",
9393   }
9494
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}
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   }
150135end
151136
152137function linkProjects_mame_tiny(_target, _subtarget)
trunk/src/devices/bus/abcbus/lux4105.cpp
r250222r250223
3131{
3232   m_sasi_bsy = state;
3333
34   if (m_sasi_bsy)
34   if (state)
3535   {
3636      m_sasibus->write_sel(0);
3737   }
r250222r250223
141141
142142inline void luxor_4105_device::update_trrq_int()
143143{
144   bool cd = !m_sasi_cd;
145   bool req = !m_sasi_req;
146   int trrq = (cd & !req) ? 0 : 1;
144   int cd = !m_sasi_cd;
145   int req = !m_sasi_req;
146   int trrq = !(cd & !req);
147147
148148   if (BIT(m_dma, 5))
149149   {
r250222r250223
185185   m_cs(false),
186186   m_data(0),
187187   m_dma(0),
188   m_sasi_bsy(false),
189   m_sasi_req(false),
190   m_sasi_cd(false),
191   m_sasi_io(false)
188   m_sasi_bsy(0),
189   m_sasi_req(0),
190   m_sasi_cd(0),
191   m_sasi_io(0)
192192{
193193}
194194
r250222r250223
268268
269269      */
270270
271      data = m_sasi_bsy ? 0 : (1 << 0);
272      data |= m_sasi_req ? 0 : (1 << 2);
273      data |= m_sasi_cd ? 0 : (1 << 3);
274      data |= m_sasi_io ? 0 : (1 << 6);
271      data = !m_sasi_bsy;
272      data |= !m_sasi_req << 2;
273      data |= !m_sasi_cd << 3;
274      data |= !m_sasi_io << 6;
275275   }
276276
277277   return data;
trunk/src/devices/bus/abcbus/lux4105.h
r250222r250223
7878   UINT8 m_dma;
7979
8080   int m_sasi_bsy;
81   bool m_sasi_req;
82   bool m_sasi_cd;
83   bool m_sasi_io;
81   int m_sasi_req;
82   int m_sasi_cd;
83   int m_sasi_io;
8484};
8585
8686
trunk/src/devices/bus/c64/easyflash.cpp
r250222r250223
224224
225225int c64_easyflash_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw)
226226{
227   return (BIT(m_mode, 0) || !(BIT(m_mode, 2) || m_jp1->read())) ? 0 : 1;
227   return !(BIT(m_mode, 0) | !(BIT(m_mode, 2) | m_jp1->read()));
228228}
trunk/src/devices/bus/c64/kingsoft.cpp
r250222r250223
9494
9595int c64_kingsoft_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw)
9696{
97   return m_exrom & ((ba & rw & ((offset >= 0x8000 && offset < 0xc000) || (offset >= 0xe000))) ? 0 : 1);
97   return m_exrom & !(ba & rw & ((offset >= 0x8000 && offset < 0xc000) || (offset >= 0xe000)));
9898}
trunk/src/devices/bus/cpc/doubler.cpp
r250222r250223
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
trunk/src/devices/bus/cpc/transtape.cpp
r250222r250223
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),
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
r250222r250223
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/nes/nanjing.cpp
r250222r250223
124124      UINT8 temp = m_count;
125125      m_count = data;
126126
127      if ((temp & ~data) & 1)
128        {
129            m_latch2 ^= 0xff;
130        }
127      if (temp & !data)
128         m_latch2 ^= 0xff;
131129   }
132130
133131   switch (offset & 0x300)
trunk/src/devices/bus/wangpc/mvc.cpp
r250222r250223
111111      for (int bit = 0; bit < 10; bit++)
112112      {
113113         int x = (column * 10) + bit;
114         int color = ((BIT(data, 9) & ~ATTR_BLANK) ^ ATTR_REVERSE);
114         int color = ((BIT(data, 9) & !ATTR_BLANK) ^ ATTR_REVERSE);
115115
116116         if ((color | bitmap.pix32(vbp + y, hbp + x)) & ATTR_BOLD) color = 2;
117117         if (color) bitmap.pix32(vbp + y, hbp + x) = de ? PALETTE_MVC[color] : rgb_t::black;
trunk/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
r250222r250223
10441044      dsrclatch =
10451045            (~(0x10 << dsrc) & 0xf0)
10461046            | (rsrc ? 0x04 : 0x02)
1047            | (spf == SPF_SWRT ? 0 : 1);
1047            | !(spf == SPF_SWRT);
10481048
10491049      /* R-latch is written on rising edge of dsrclatch bit 2 */
10501050      if (!_BIT(m_dsrclatch, 2) && _BIT(dsrclatch, 2))
r250222r250223
14921492         }
14931493
14941494         m_fglatch =
1495               (latch == LLATCH_FADLATCH ? 0 : (1 << 5))
1495               (!(latch == LLATCH_FADLATCH) << 5)
14961496               | (dowrt << 4)
14971497               | (start_stop << 3)
14981498               | (_pbcs << 2)
1499               | (spf == LSPF_BRES ? 0 : (1 << 1))
1500               | (m_gt0reg && (spf == LSPF_BRES) ? 0 : 1);
1499               | (!(spf == LSPF_BRES) << 1)
1500               | !(m_gt0reg && (spf == LSPF_BRES));
15011501      }
15021502      else
15031503      {
trunk/src/devices/cpu/dsp32/dsp32.cpp
r250222r250223
344344   {
345345      case STATE_GENFLAGS:
346346         // no actual flags register, so just make something up
347         m_iotemp =  (zFLAG ? 0x01 : 0) |
348                  (nFLAG ? 0x02 : 0) |
349                  (cFLAG ? 0x04 : 0) |
350                  (vFLAG ? 0x08 : 0) |
351                  (ZFLAG ? 0x10 : 0) |
352                  (NFLAG ? 0x20 : 0) |
353                  (UFLAG ? 0x40 : 0) |
354                  (VFLAG ? 0x80 : 0);
347         m_iotemp =  ((zFLAG != 0) << 0) |
348                  ((nFLAG != 0) << 1) |
349                  ((cFLAG != 0) << 2) |
350                  ((vFLAG != 0) << 3) |
351                  ((ZFLAG != 0) << 4) |
352                  ((NFLAG != 0) << 5) |
353                  ((UFLAG != 0) << 6) |
354                  ((VFLAG != 0) << 7);
355355         break;
356356
357357      case DSP32_PCR:
trunk/src/devices/cpu/hcd62121/hcd62121_ops.h
r250222r250223
185185         {                                                                           \
186186            UINT16 res = ( m_temp1[i] & 0x0f ) + ( m_temp2[i] & 0x0f ) + carry; \
187187                                                                  \
188            carry = 0;                                                              \
188189            if ( res > 9 )                                                          \
189190            {                                                                       \
190191               res += 6;                                                           \
trunk/src/devices/cpu/i8085/i8085.cpp
r250222r250223
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 & ~IM_SID) | (sid ? IM_SID : 0);
273   result = (result & 0x7f) | (sid ? 0x80 : 0);
274274
275275   return result;
276276}
r250222r250223
916916   m_trap_pending = 0;
917917   m_trap_im_copy = 0;
918918   m_sod_state = 0;
919   m_ietemp = false;
919   m_ietemp = 0;
920920
921921   init_tables();
922922
r250222r250223
10051005   {
10061006      case I8085_SID:
10071007         if (m_ietemp)
1008            {
1009                m_IM |= IM_SID;
1010            }
1008            m_IM |= IM_SID;
10111009         else
1012            {
10131010            m_IM &= ~IM_SID;
1014            }
10151011         break;
10161012
10171013      case I8085_INTE:
10181014         if (m_ietemp)
1019            {
10201015            m_IM |= IM_IE;
1021            }
10221016         else
1023            {
10241017            m_IM &= ~IM_IE;
1025            }
10261018         break;
10271019
10281020      default:
r250222r250223
10361028   switch (entry.index())
10371029   {
10381030      case I8085_SID:
1039         m_ietemp = ((m_IM & IM_SID) != 0) && m_in_sid_func() != 0;
1031         {
1032         int sid = m_in_sid_func();
1033
1034         m_ietemp = ((m_IM & IM_SID) != 0);
1035         m_ietemp = (sid != 0);
1036         }
10401037         break;
10411038
10421039      case I8085_INTE:
trunk/src/devices/cpu/i8085/i8085.h
r250222r250223
116116   UINT8               m_trap_im_copy;   /* copy of IM register when TRAP was taken */
117117   UINT8               m_sod_state;      /* state of the SOD line */
118118
119   bool                m_ietemp;         /* import/export temp space */
119   UINT8               m_ietemp;         /* import/export temp space */
120120
121121   address_space *m_program;
122122   direct_read_data *m_direct;
trunk/src/devices/cpu/m6502/deco16.cpp
r250222r250223
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__),
20   io(NULL),
19   m6502_device(mconfig, DECO16, "DECO16", tag, owner, clock, "deco16", __FILE__),
2120   io_config("io", ENDIANNESS_LITTLE, 8, 16)
2221{
2322}
trunk/src/devices/cpu/m6502/m3745x.cpp
r250222r250223
5555   read_ad_4(*this),
5656   read_ad_5(*this),
5757   read_ad_6(*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)
58   read_ad_7(*this)
6559{
6660}
6761
r250222r250223
201195
202196void m3745x_device::recalc_irqs()
203197{
204   UINT16 all_ints;
198   UINT16 all_ints = 0;
205199   int static const irq_lines[16] =
206200   {
207201      -1, -1, -1, M740_INT11_LINE, M740_INT12_LINE, M740_INT13_LINE, -1, -1,
trunk/src/devices/cpu/m6502/m4510.cpp
r250222r250223
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__),
18   map_enable(0),
19   nomap(false)
17   m65ce02_device(mconfig, M4510, "M4510", tag, owner, clock, "m4510", __FILE__)
2018{
2119   program_config.m_addrbus_width = 20;
2220   program_config.m_logaddr_width = 16;
trunk/src/devices/cpu/m6502/m5074x.cpp
r250222r250223
4949   write_p0(*this),
5050   write_p1(*this),
5151   write_p2(*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)
52   write_p3(*this)
6453{
6554}
6655
trunk/src/devices/cpu/m6809/6309dasm.cpp
r250222r250223
613613   unsigned int ea, flags;
614614   int numoperands, offset, indirect;
615615
616   int i, p = 0, page = 0, opcode_found;
616   int i, p = 0, page = 0, opcode_found = FALSE;
617617
618618   do
619619   {
trunk/src/devices/cpu/m6809/6809dasm.cpp
r250222r250223
372372   const UINT8 *operandarray;
373373   unsigned int ea, flags;
374374   int numoperands, offset, indirect;
375   int i, p = 0, page = 0, opcode_found;
375   int i, p = 0, page = 0, opcode_found = FALSE;
376376
377377   do
378378   {
trunk/src/devices/cpu/m6809/hd6309.cpp
r250222r250223
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__),
132   m_md(0),
133   m_temp_im(0)
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__)
134132{
135133}
136134
r250222r250223
452450
453451inline m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg)
454452{
455   UINT16 value;
453   UINT16 value = 0;
456454
457455   switch(reg & 0x0F)
458456   {
trunk/src/devices/cpu/nec/necinstr.inc
r250222r250223
571571      case 0x6f:  CLK(2); if (c) do { i_outsw(); c--; } while (c>0); Wreg(CW)=c; break;
572572      case 0xa4:  CLK(2); if (c) do { i_movsb(); c--; } while (c>0); Wreg(CW)=c; break;
573573      case 0xa5:  CLK(2); if (c) do { i_movsw(); c--; } while (c>0); Wreg(CW)=c; break;
574      case 0xa6:  CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && !ZF);    Wreg(CW)=c; break;
575      case 0xa7:  CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && !ZF);    Wreg(CW)=c; break;
574      case 0xa6:  CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && ZF==0);    Wreg(CW)=c; break;
575      case 0xa7:  CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && ZF==0);    Wreg(CW)=c; break;
576576      case 0xaa:  CLK(2); if (c) do { i_stosb(); c--; } while (c>0); Wreg(CW)=c; break;
577577      case 0xab:  CLK(2); if (c) do { i_stosw(); c--; } while (c>0); Wreg(CW)=c; break;
578578      case 0xac:  CLK(2); if (c) do { i_lodsb(); c--; } while (c>0); Wreg(CW)=c; break;
579579      case 0xad:  CLK(2); if (c) do { i_lodsw(); c--; } while (c>0); Wreg(CW)=c; break;
580      case 0xae:  CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && !ZF);    Wreg(CW)=c; break;
581      case 0xaf:  CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && !ZF);    Wreg(CW)=c; break;
580      case 0xae:  CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && ZF==0);    Wreg(CW)=c; break;
581      case 0xaf:  CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && ZF==0);    Wreg(CW)=c; break;
582582      default:    logerror("%06x: REPNE invalid\n",PC());    (this->*s_nec_instruction[next])();
583583   }
584584   m_seg_prefix=FALSE;
r250222r250223
598598      case 0x6f:  CLK(2); if (c) do { i_outsw(); c--; } while (c>0); Wreg(CW)=c; break;
599599      case 0xa4:  CLK(2); if (c) do { i_movsb(); c--; } while (c>0); Wreg(CW)=c; break;
600600      case 0xa5:  CLK(2); if (c) do { i_movsw(); c--; } while (c>0); Wreg(CW)=c; break;
601      case 0xa6:  CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && ZF);    Wreg(CW)=c; break;
602      case 0xa7:  CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && ZF);    Wreg(CW)=c; break;
601      case 0xa6:  CLK(2); if (c) do { i_cmpsb(); c--; } while (c>0 && ZF==1);    Wreg(CW)=c; break;
602      case 0xa7:  CLK(2); if (c) do { i_cmpsw(); c--; } while (c>0 && ZF==1);    Wreg(CW)=c; break;
603603      case 0xaa:  CLK(2); if (c) do { i_stosb(); c--; } while (c>0); Wreg(CW)=c; break;
604604      case 0xab:  CLK(2); if (c) do { i_stosw(); c--; } while (c>0); Wreg(CW)=c; break;
605605      case 0xac:  CLK(2); if (c) do { i_lodsb(); c--; } while (c>0); Wreg(CW)=c; break;
606606      case 0xad:  CLK(2); if (c) do { i_lodsw(); c--; } while (c>0); Wreg(CW)=c; break;
607      case 0xae:  CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && ZF);    Wreg(CW)=c; break;
608      case 0xaf:  CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && ZF);    Wreg(CW)=c; break;
607      case 0xae:  CLK(2); if (c) do { i_scasb(); c--; } while (c>0 && ZF==1);    Wreg(CW)=c; break;
608      case 0xaf:  CLK(2); if (c) do { i_scasw(); c--; } while (c>0 && ZF==1);    Wreg(CW)=c; break;
609609      default:    logerror("%06x: REPE invalid\n",PC()); (this->*s_nec_instruction[next])();
610610   }
611611   m_seg_prefix=FALSE;
trunk/src/devices/cpu/sh2/sh2comn.cpp
r250222r250223
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
1624#define VERBOSE 0
1725
1826#define LOG(x)  do { if (VERBOSE) logerror x; } while (0)
r250222r250223
10141022{
10151023   COMBINE_DATA(&m_sh7021_regs[offset]);
10161024}
1025#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1026#pragma GCC diagnostic pop
1027#endif
trunk/src/devices/cpu/sh4/sh4dmac.cpp
r250222r250223
178178      }
179179      break;
180180   }
181   *sar    = (*sar & ~AM) | src;
182   *dar    = (*dar & ~AM) | dst;
181   *sar    = (*sar & !AM) | src;
182   *dar    = (*dar & !AM) | dst;
183183   *dmatcr = count;
184184   return 1;
185185}
trunk/src/devices/cpu/tms32031/32031ops.cpp
r0r250223
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
r250222r250223
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
r250222r250223
846846//  CORE OPCODES
847847//**************************************************************************
848848
849#include "32031ops.inc"
849#include "32031ops.cpp"
trunk/src/devices/cpu/tms32051/32051ops.cpp
r0r250223
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
r250222r250223
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
r250222r250223
105105   m_data->write_word(address << 1, data);
106106}
107107
108#include "32051ops.inc"
108#include "32051ops.cpp"
109109#include "32051ops.h"
110110
111111void tms32051_device::op_group_be()
trunk/src/devices/cpu/tms34010/34010fld.cpp
r0r250223
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
r250222r250223
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
r0r250223
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
r250222r250223
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
r0r250223
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
r250222r250223
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
r0r250223
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
r250222r250223
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
r250222r250223
458458    OPCODE TABLE & IMPLEMENTATIONS
459459***************************************************************************/
460460
461#include "34010fld.inc"
461#include "34010fld.cpp"
462462
463463/* includes the static function prototypes and the master opcode table */
464#include "34010tbl.inc"
464#include "34010tbl.cpp"
465465
466466/* includes the actual opcode implementations */
467#include "34010ops.inc"
468#include "34010gfx.inc"
467#include "34010ops.cpp"
468#include "34010gfx.cpp"
469469
470470
471471
trunk/src/devices/cpu/tms9900/tms9995.h
r250222r250223
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
r250222r250223
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/upd7810/upd7810.cpp
r250222r250223
17351735   m_tm.d = 0;
17361736   m_ecnt.d = 0;
17371737   m_etm.d = 0;
1738   MA = 0xff;
1739   MB = 0xff;
1738   m_ma = 0;
1739   m_mb = 0;
17401740   m_mcc = 0;
1741   MC = 0xff;
1741   m_mc = 0;
17421742   m_mm = 0;
1743   MF = 0xff;
1744   TMM = 0xff;
1745   ETMM = 0xff;
1743   m_mf = 0;
1744   m_tmm = 0;
1745   m_etmm = 0;
17461746   m_eom = 0;
17471747   m_sml = 0;
17481748   m_smh = 0;
17491749   m_anm = 0;
1750   MKL = 0xFF;
1751   MKH = 0xFF; // ??
1750   m_mkl = 0;
1751   m_mkh = 0;
17521752   m_zcm = 0;
17531753   m_pa_in = 0;
17541754   m_pb_in = 0;
r250222r250223
18021802   m_adrange = 0;
18031803
18041804   PANM = 0xff;
1805   ETMM = 0xff;
1806   TMM = 0xff;
1807   MA = 0xff;
1808   MB = 0xff;
1809   MC = 0xff;
1810   MF = 0xff;
1811   MKL = 0xff;
1812   MKH = 0xff; //?
18051813}
18061814
18071815void upd7801_device::device_reset()
trunk/src/devices/cpu/v810/v810.cpp
r250222r250223
12471247
12481248void v810_device::device_start()
12491249{
1250   m_irq_state = CLEAR_LINE;
1251   m_irq_line = 0;
1252   m_nmi_line = CLEAR_LINE;
12501253   m_program = &space(AS_PROGRAM);
12511254   m_direct = &m_program->direct();
12521255   m_io = &space(AS_IO);
12531256
12541257   m_irq_line = 0;
1255   m_irq_state = CLEAR_LINE;
1256   m_nmi_line = CLEAR_LINE;
1258   m_irq_state = 0;
1259   m_nmi_line = 0;
12571260   memset(m_reg, 0x00, sizeof(m_reg));
12581261
12591262   save_item(NAME(m_reg));
trunk/src/devices/cpu/z80/z80dasm.cpp
r250222r250223
420420   char *dst;
421421   INT8 offset = 0;
422422   UINT8 op, op1 = 0;
423   UINT16 ea;
423   UINT16 ea = 0;
424424   int pos = 0;
425425
426426   ixy = "oops!!";
trunk/src/devices/imagedev/cassette.cpp
r250222r250223
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_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),
33   device_image_interface(mconfig, *this),
34   m_state(CASSETTE_STOPPED),
4235   m_formats(cassette_default_formats),
4336   m_create_opts(NULL),
4437   m_default_state(CASSETTE_PLAY),
r250222r250223
430423         if (position > length)
431424         {
432425            m_state = (cassette_state)(( m_state & ~CASSETTE_MASK_UISTATE ) | CASSETTE_STOPPED);
426            position = length;
433427         }
434428      }
435429   }
trunk/src/devices/imagedev/chd_cd.cpp
r250222r250223
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),
32       m_cdrom_handle(NULL),
33       m_extension_list(NULL),
31      device_image_interface(mconfig, *this),
3432      m_interface(NULL)
3533{
3634}
3735
3836cdrom_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)
3937   : device_t(mconfig, type, name,  tag, owner, clock, shortname, source),
40      device_image_interface(mconfig, *this),
41      m_cdrom_handle(NULL),
42      m_extension_list(NULL),
38      device_image_interface(mconfig, *this),
4339      m_interface(NULL)
4440{
4541}
trunk/src/devices/imagedev/flopdrv.cpp
r250222r250223
709709      m_rdy(0),
710710      m_dskchg(0),
711711      m_drive_id(0),
712      m_active(0),
713      m_config(NULL),
712      m_active(0),
714713      m_flags(0),
715714      m_max_track(0),
716715      m_num_sides(0),
717      m_current_track(0),
718      m_index_timer(NULL),
716      m_current_track(0),
719717      m_index_pulse_callback(NULL),
720718      m_rpm(0.0f),
721719      m_id_index(0),
r250222r250223
743741      m_rdy(0),
744742      m_dskchg(0),
745743      m_drive_id(0),
746      m_active(0),
747       m_config(NULL),
744      m_active(0),
748745      m_flags(0),
749746      m_max_track(0),
750747      m_num_sides(0),
751      m_current_track(0),
752      m_index_timer(NULL),
748      m_current_track(0),
753749      m_index_pulse_callback(NULL),
754750      m_rpm(0.0f),
755751      m_id_index(0),
trunk/src/devices/imagedev/flopdrv.h
r250222r250223
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);
164165   int internal_floppy_device_load(int create_format, option_resolution *create_args);
165166   TIMER_CALLBACK_MEMBER( set_wpt );
166167
trunk/src/devices/imagedev/floppy.cpp
r250222r250223
77*********************************************************************/
88
99#include "emu.h"
10#include "emuopts.h"
1011#include "ui/menu.h"
1112#include "ui/filesel.h"
1213#include "zippath.h"
r250222r250223
126127
127128floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
128129   device_t(mconfig, FLOPPY_CONNECTOR, "Floppy drive connector abstraction", tag, owner, clock, "floppy_connector", __FILE__),
129   device_slot_interface(mconfig, *this),
130   formats(NULL),
130   device_slot_interface(mconfig, *this),
131131   m_enable_sound(false)
132132{
133133}
r250222r250223
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),
171      input_format(NULL),
172      output_format(NULL),
170      device_slot_card_interface(mconfig, *this),
173171      image(NULL),
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)
172      fif_list(NULL),
173      m_make_sound(false)
191174{
192175   extension_list[0] = '\0';
193176   m_err = IMAGE_ERROR_INVALIDIMAGE;
r250222r250223
685668{
686669   int spos = (buf.size() >> 1)-1;
687670   int step;
688   for(step=1; step<buf.size()+1; step<<=1) { }
671   for(step=1; step<buf.size()+1; step<<=1);
689672   step >>= 1;
690673
691674   for(;;) {
r250222r250223
1000983
1001984   bool can_in_place = input_format->supports_save();
1002985   if(can_in_place) {
1003      file_error filerr;
986      file_error filerr = FILERR_NOT_FOUND;
1004987      std::string tmp_path;
1005988      core_file *tmp_file;
1006989      /* attempt to open the file for writing but *without* create */
r250222r250223
10211004   switch (state) {
10221005   case DO_CREATE: {
10231006      floppy_image_format_t *fif_list = fd->get_formats();
1024         int ext_match;
1025         int total_usable = 0;
1026         for(floppy_image_format_t *i = fif_list; i; i = i->next) {
1007      int ext_match = 0, total_usable = 0;
1008      for(floppy_image_format_t *i = fif_list; i; i = i->next) {
10271009         if(!i->supports_save())
10281010            continue;
10291011         if (i->extension_matches(current_file.c_str()))
r250222r250223
11031085//===================================================================
11041086
11051087floppy_sound_device::floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
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)
1088   : samples_device(mconfig, FLOPPYSOUND, "Floppy sound", tag, owner, clock, "flopsnd", __FILE__)
11221089{
11231090   m_loaded = false;
11241091}
r250222r250223
12261193   // Also, there is no need for interpolation, as we only expect
12271194   // one sample rate of 44100 for all samples
12281195
1229   INT16 out;
1196   INT16 out = 0;
12301197   stream_sample_t *samplebuffer = outputs[0];
12311198
12321199   while (samples-- > 0)
trunk/src/devices/imagedev/mfmhd.cpp
r250222r250223
270270**************************************************************************/
271271
272272#include "emu.h"
273#include "formats/imageutl.h"
273274#include "harddisk.h"
274275#include "mfmhd.h"
275276
r250222r250223
309310
310311mfm_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)
311312   : harddisk_image_device(mconfig, type, name, tag, owner, clock, shortname, source),
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)
313      device_slot_card_interface(mconfig, *this)
331314{
332315   m_spinupms = 10000;
333316   m_cachelines = 5;
r250222r250223
969952//   This is a write-back LRU cache.
970953// ===========================================================
971954
972mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine):
973   m_mfmhd(NULL),
955mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine):
974956   m_tracks(NULL),
975957   m_machine(machine)
976958{
r250222r250223
10441026{
10451027   if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache init; cache size is %d tracks\n", mfmhd->tag(), trackslots);
10461028
1047   chd_error state;
1029   chd_error state = CHDERR_NONE;
10481030
1049   mfmhd_trackimage* previous;
1031   mfmhd_trackimage* previous = NULL;
10501032   mfmhd_trackimage* current = NULL;
10511033
10521034   m_mfmhd = mfmhd;
r250222r250223
11591141
11601142mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock):
11611143   device_t(mconfig, MFM_HD_CONNECTOR, "MFM hard disk connector", tag, owner, clock, "mfm_hd_connector", __FILE__),
1162   device_slot_interface(mconfig, *this),
1163   m_encoding(),
1164   m_spinupms(0),
1165   m_cachesize(0),
1166   m_format(NULL)
1144   device_slot_interface(mconfig, *this)
11671145{
11681146}
11691147
trunk/src/devices/imagedev/mfmhd.h
r250222r250223
154154   mfmhd_trackimage_cache* m_cache;
155155   mfmhd_image_format_t*   m_format;
156156
157   void        prepare_track(int cylinder, int head);
157158   void        head_move();
158159   void        recalibrate();
159160
trunk/src/devices/imagedev/midiin.cpp
r250222r250223
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_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)
27      device_image_interface(mconfig, *this),
28         device_serial_interface(mconfig, *this),
29         m_input_cb(*this)
3530{
3631}
3732
trunk/src/devices/imagedev/midiout.cpp
r250222r250223
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),
29     m_midi(NULL)
27   device_image_interface(mconfig, *this),
28      device_serial_interface(mconfig, *this)
3029{
3130}
3231
trunk/src/devices/imagedev/snapquik.cpp
r250222r250223
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_file_extensions(NULL),
25     m_interface(NULL),
26     m_delay_seconds(0),
27     m_delay_attoseconds(0),
28     m_timer(NULL)
23      device_image_interface(mconfig, *this),
24      m_interface(NULL),
25      m_delay_attoseconds(0)
2926{
3027}
3128
3229snapshot_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) :
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)
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)
4034{
4135}
4236//-------------------------------------------------
trunk/src/devices/machine/6532riot.cpp
r250222r250223
238238
239239UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access)
240240{
241   UINT8 val;
241   UINT8 val = 0;
242242
243243   /* if A2 == 1 and A0 == 1, we are reading interrupt flags */
244244   if ((offset & 0x05) == 0x05)
r250222r250223
392392      m_out_pa_cb(*this),
393393      m_in_pb_cb(*this),
394394      m_out_pb_cb(*this),
395      m_irq_cb(*this),
396      m_irqstate(0),
397      m_irqenable(0),
395      m_irq_cb(*this),
398396      m_irq(CLEAR_LINE),
399397      m_pa7dir(0),
400      m_pa7prev(0),
401      m_timershift(0),
402      m_timerstate(0),
403      m_timer(NULL)
398      m_pa7prev(0)
404399{
405400   memset(m_port, 0x00, sizeof(m_port));
406401}
trunk/src/devices/machine/6821pia.cpp
r250222r250223
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), 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)
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)
7571{
7672}
7773
trunk/src/devices/machine/74181.cpp
r250222r250223
7676   int mp = !m_m;
7777
7878   // intermediate calculations
79   int ap0 = !(a0 | (b0 & s0) | (s1 & ~b0));
79   int ap0 = !(a0 | (b0 & s0) | (s1 & !b0));
8080   int bp0 = !(((!b0) & s2 & a0) | (a0 & b0 & s3));
81   int ap1 = !(a1 | (b1 & s0) | (s1 & ~b1));
81   int ap1 = !(a1 | (b1 & s0) | (s1 & !b1));
8282   int bp1 = !(((!b1) & s2 & a1) | (a1 & b1 & s3));
83   int ap2 = !(a2 | (b2 & s0) | (s1 & ~b2));
83   int ap2 = !(a2 | (b2 & s0) | (s1 & !b2));
8484   int bp2 = !(((!b2) & s2 & a2) | (a2 & b2 & s3));
85   int ap3 = !(a3 | (b3 & s0) | (s1 & ~b3));
85   int ap3 = !(a3 | (b3 & s0) | (s1 & !b3));
8686   int bp3 = !(((!b3) & s2 & a3) | (a3 & b3 & s3));
8787
8888   int fp0 = !(m_c & mp) ^ ((!ap0) & bp0);
trunk/src/devices/machine/am9517a.cpp
r250222r250223
151151
152152inline bool am9517a_device::is_request_active(int channel)
153153{
154   return (BIT(m_status, channel + 4) & ~BIT(m_mask, channel)) ? true : false;
154   return (BIT(m_status, channel + 4) & !BIT(m_mask, channel)) ? true : false;
155155}
156156
157157
trunk/src/devices/machine/bankdev.cpp
r250222r250223
1111      m_endianness(ENDIANNESS_NATIVE),
1212      m_databus_width(0),
1313      m_addrbus_width(32),
14      m_stride(1),
15      m_program(NULL),
14      m_stride(1),
1615      m_offset(0)
1716{
1817}
trunk/src/devices/machine/e05a03.cpp
r250222r250223
118118      break;
119119
120120   /* printhead */
121    case 0x04: m_printhead = (m_printhead & 0x100) | (data == 0 ? 0xff : 0); break;
122    case 0x05: m_printhead = (m_printhead & 0x0ff) | (BIT(data, 7) ? (1 << 8) : 0); break;
121   case 0x04: m_printhead = (m_printhead & 0x100) | !data; break;
122   case 0x05: m_printhead = (m_printhead & 0x0ff) | (!(BIT(data, 7) << 8)); break;
123123
124124   /* paper feed and carriage motor phase data*/
125125   case 0x06: m_pf_motor = (data & 0xf0) >> 4; break;
trunk/src/devices/machine/i8279.cpp
r250222r250223
134134   for (i = 0; i < 8; i++) m_s_ram[i] = 0;
135135   for (i = 0; i < 16; i++) m_d_ram[i] = 0;
136136   m_status = 0;
137   m_autoinc = true;
137   m_autoinc = 1;
138138   m_d_ram_ptr = 0;
139139   m_s_ram_ptr = 0;
140140   m_read_flag = 0;
r250222r250223
374374   // read the display ram
375375      data = m_d_ram[m_d_ram_ptr];
376376      if (m_autoinc)
377        {
378377         m_d_ram_ptr++;
379        }
380378   }
381379   else
382380   if (sensor_mode)
r250222r250223
385383      assert(m_s_ram_ptr < ARRAY_LENGTH(m_s_ram));
386384      data = m_s_ram[m_s_ram_ptr];
387385      if (m_autoinc)
388        {
389386         m_s_ram_ptr++;
390        }
391387      else
392        {
393388         set_irq(0);
394        }
395389   }
396390   else
397391   {
r250222r250223
477471
478472WRITE8_MEMBER( i8279_device::data_w )
479473{//printf("Data: %X ",data);
480   if (BIT(m_cmd[0], 4) && m_autoinc)
474   if (BIT(m_cmd[0], 4) & m_autoinc)
481475   {
482476   // right-entry autoincrement not implemented yet
483477   }
trunk/src/devices/machine/keyboard.cpp
r250222r250223
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"),
47   m_timer(NULL),
48   m_last_code(0),
49   m_scan_line(0),
46   m_io_kbdc(*this, "TERM_LINEC"),
5047   m_keyboard_cb(*this)
5148{
5249}
r250222r250223
6461   m_io_kbd8(*this, "TERM_LINE8"),
6562   m_io_kbd9(*this, "TERM_LINE9"),
6663   m_io_kbdc(*this, "TERM_LINEC"),
67   m_timer(NULL),
68   m_last_code(0),
69   m_scan_line(0),
7064   m_keyboard_cb(*this)
7165{
7266}
trunk/src/devices/machine/legscsi.cpp
r250222r250223
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),
7   m_selected(0),
6   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
87   m_scsi_port(*this)
98{
109}
trunk/src/devices/machine/nvram.cpp
r250222r250223
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
1422//**************************************************************************
1523//  LIVE DEVICE
1624//**************************************************************************
r250222r250223
167175   if (m_region != NULL && m_region->bytes() != m_length)
168176      throw emu_fatalerror("NVRAM device '%s' has a default region, but it should be 0x%" SIZETFMT "X bytes", tag(), m_length);
169177}
178
179#if (defined(__MINGW32__) && (__GNUC__ >= 5))
180#pragma GCC diagnostic pop
181#endif
trunk/src/devices/machine/pci.cpp
r250222r250223
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
512const device_type PCI_ROOT   = &device_creator<pci_root_device>;
613const device_type PCI_BRIDGE = &device_creator<pci_bridge_device>;
714
r250222r250223
895902void pci_root_device::device_reset()
896903{
897904}
905
906#if (defined(__MINGW32__) && (__GNUC__ >= 5))
907#pragma GCC diagnostic pop
908#endif
trunk/src/devices/machine/pit8253.cpp
r250222r250223
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
2633/* device types */
2734enum
2835{
r250222r250223
11221129{
11231130   set_clock_signal(2, state);
11241131}
1132
1133#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1134#pragma GCC diagnostic pop
1135#endif
trunk/src/devices/machine/ram.cpp
r250222r250223
7878{
7979   const char *ramsize_string = NULL;
8080   int is_valid = FALSE;
81   UINT32 specified_ram;
82   const char *gamename_option;
81   UINT32 specified_ram = 0;
82   const char *gamename_option = NULL;
8383
8484   /* verify default ram value */
8585   if (default_size() == 0)
r250222r250223
183183   UINT32 ram;
184184   char suffix = '\0';
185185
186   sscanf(s, "%u%c", &ram, &suffix);
186   s += sscanf(s, "%u%c", &ram, &suffix);
187187
188188   switch(tolower(suffix))
189189   {
trunk/src/devices/machine/tc009xlvc.cpp
r250222r250223
264264   if(!m_gfxdecode->started())
265265      throw device_missing_dependencies();
266266
267   memset(m_palette_ram, 0, ARRAY_LENGTH(m_palette_ram));
268   memset(m_vregs, 0, ARRAY_LENGTH(m_vregs));
269   memset(m_bitmap_ram, 0, ARRAY_LENGTH(m_bitmap_ram));
270   memset(m_pcg_ram, 0, ARRAY_LENGTH(m_pcg_ram));
271   memset(m_sprram_buffer, 0, ARRAY_LENGTH(m_sprram_buffer));
267   memset(m_palette_ram, 0, sizeof(m_palette_ram));
268   memset(m_vregs, 0, sizeof(m_palette_ram));
269   memset(m_bitmap_ram, 0, sizeof(m_palette_ram));
270   memset(m_pcg_ram, 0, sizeof(m_pcg_ram));
271   memset(m_sprram_buffer, 0, sizeof(m_sprram_buffer));
272272
273273   // note, the way tiles are addressed suggests that 0x0000-0x3fff of this might be usable,
274274   //       but we don't map it anywhere, so the first tiles are always blank at the moment.
trunk/src/devices/machine/terminal.cpp
r250222r250223
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"),
147      m_x_pos(0),
148      m_framecnt(0),
149      m_y_pos(0),
146      m_io_term_conf(*this, "TERM_CONF"),
150147      m_keyboard_cb(*this)
151148{
152149}
153150
154151generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
155152   : device_t(mconfig, GENERIC_TERMINAL, "Generic Terminal", tag, owner, clock, "generic_terminal", __FILE__),
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)
153      m_palette(*this, "palette"),
154      m_io_term_conf(*this, "TERM_CONF"),
155      m_keyboard_cb(*this)
162156{
163157}
164158
trunk/src/devices/machine/z80ctc.cpp
r250222r250223
1010
1111#include "emu.h"
1212#include "z80ctc.h"
13#include "cpu/z80/z80.h"
1314#include "cpu/z80/z80daisy.h"
1415
1516
r250222r250223
8586      m_zc0_cb(*this),
8687      m_zc1_cb(*this),
8788      m_zc2_cb(*this),
88      m_zc3_cb(*this),
89      m_vector(0)
89      m_zc3_cb(*this)
9090{
9191}
9292
r250222r250223
284284//-------------------------------------------------
285285
286286z80ctc_device::ctc_channel::ctc_channel()
287   : m_device(NULL),
288      m_index(0),
289      m_mode(0),
287   : m_mode(0),
290288      m_tconst(0),
291289      m_down(0),
292290      m_extclk(0),
trunk/src/devices/machine/z80ctc.h
r250222r250223
8888private:
8989   // internal helpers
9090   void interrupt_check();
91   void timercallback(int chanindex);
9192
9293   // a single channel within the CTC
9394   class ctc_channel
trunk/src/devices/sound/2151intf.cpp
r250222r250223
99***************************************************************************/
1010
1111#include "emu.h"
12#include "fm.h"
1213#include "2151intf.h"
1314#include "ym2151.h"
1415
r250222r250223
2324
2425ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2526   : device_t(mconfig, YM2151, "YM2151", tag, owner, clock, "ym2151", __FILE__),
26      device_sound_interface(mconfig, *this),
27      m_stream(NULL),
28      m_chip(NULL),
29      m_lastreg(0),
27      device_sound_interface(mconfig, *this),
3028      m_irqhandler(*this),
3129      m_portwritehandler(*this)
3230{
trunk/src/devices/sound/3526intf.cpp
r250222r250223
1919*
2020******************************************************************************/
2121#include "3526intf.h"
22#include "fm.h"
2223#include "fmopl.h"
2324
2425
r250222r250223
156157
157158ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
158159   : device_t(mconfig, YM3526, "YM3526", tag, owner, clock, "ym3526", __FILE__),
159      device_sound_interface(mconfig, *this),
160      m_stream(NULL),
161      m_chip(NULL),
160      device_sound_interface(mconfig, *this),
162161      m_irq_handler(*this)
163162{
164163}
trunk/src/devices/sound/3812intf.cpp
r250222r250223
2020******************************************************************************/
2121#include "emu.h"
2222#include "3812intf.h"
23#include "fm.h"
2324#include "sound/fmopl.h"
2425
2526
r250222r250223
154155
155156ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
156157   : device_t(mconfig, YM3812, "YM3812", tag, owner, clock, "ym3812", __FILE__),
157      device_sound_interface(mconfig, *this),
158      m_stream(NULL),
159      m_chip(NULL),
158      device_sound_interface(mconfig, *this),
160159      m_irq_handler(*this)
161160{
162161}
trunk/src/devices/sound/8950intf.cpp
r250222r250223
1919*
2020******************************************************************************/
2121#include "8950intf.h"
22#include "fm.h"
2223#include "fmopl.h"
2324
2425
r250222r250223
205206
206207y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
207208   : device_t(mconfig, Y8950, "Y8950", tag, owner, clock, "y8950", __FILE__),
208      device_sound_interface(mconfig, *this),
209      m_stream(NULL),
210      m_chip(NULL),
209      device_sound_interface(mconfig, *this),
211210      m_irq_handler(*this),
212211      m_keyboard_read_handler(*this),
213212      m_keyboard_write_handler(*this),
trunk/src/devices/sound/ay8910.cpp
r250222r250223
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;
497   double rw;
496   double rt, rw = 0;
498497   double temp[32], min=10.0, max=0.0;
499498
500499   for (j=0; j < par->res_count; j++)
trunk/src/devices/sound/discrete.cpp
r250222r250223
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
4250/* for_each collides with c++ standard libraries - include it here */
4351#define for_each(_T, _e, _l) for (_T _e = (_l)->begin_ptr() ;  _e <= (_l)->end_ptr(); _e++)
4452
r250222r250223
127135
128136protected:
129137   discrete_task(discrete_device &pdev)
130   : task_group(0), m_device(pdev), m_threadid(-1), m_samples(0)
131{
138   : task_group(0), m_device(pdev), m_threadid(-1)
139   {
132140      source_list.clear();
133141      step_list.clear();
134142      m_buffers.clear();
r250222r250223
324332                     buf.source = dest_node->m_input[inputnum];
325333                     buf.node_num = inputnode_num;
326334                     //buf.node = device->discrete_find_node(inputnode);
327                     m_buffers.count();
335                     i = m_buffers.count();
328336                     pbuf = m_buffers.add(buf);
329337                  }
330338                  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);
r250222r250223
354362 *
355363 *************************************/
356364
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),
365discrete_base_node::discrete_base_node() :
363366   m_step_intf(NULL),
364   m_input_intf(NULL),
365   m_output_intf(NULL)
367   m_input_intf(NULL)
366368{
367369   m_output[0] = 0.0;
368370}
r250222r250223
851853
852854discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
853855   : discrete_device(mconfig, DISCRETE, "DISCRETE", tag, owner, clock),
854      device_sound_interface(mconfig, *this),
855      m_stream(NULL)
856      device_sound_interface(mconfig, *this)
856857{
857858}
858859
r250222r250223
11031104{
11041105   const discrete_base_node *node = discrete_find_node(offset);
11051106
1106   UINT8 data;
1107   UINT8 data = 0;
11071108
11081109   /* Read the node input value if allowed */
11091110   if (node)
r250222r250223
11411142      discrete_log("discrete_sound_w write to non-existent NODE_%02d\n", offset-NODE_00);
11421143   }
11431144}
1145
1146#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1147#pragma GCC diagnostic pop
1148#endif
trunk/src/devices/sound/samples.cpp
r250222r250223
363363                     chan.source_num = -1;
364364                     if (samples > 0)
365365                        memset(buffer, 0, samples * sizeof(*buffer));
366                     samples = 0;
366367                     break;
367368                  }
368369               }
trunk/src/devices/sound/tms5110.cpp
r250222r250223
393393             * Old frame was unvoiced, new is voiced
394394             * Old frame was unvoiced, new frame is silence/zero energy (non-existent on tms51xx rev D and F (present and working on tms52xx, present but buggy on tms51xx rev A and B))
395395             */
396            if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && NEW_FRAME_UNVOICED_FLAG)
397               || ((OLD_FRAME_UNVOICED_FLAG == 1) && !NEW_FRAME_UNVOICED_FLAG)
398               || ((OLD_FRAME_SILENCE_FLAG == 1) && !NEW_FRAME_SILENCE_FLAG) )
396            if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && (NEW_FRAME_UNVOICED_FLAG == 1))
397               || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_UNVOICED_FLAG == 0))
398               || ((OLD_FRAME_SILENCE_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 0)) )
399399               //|| ((m_inhibit == 1) && (OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) ) //TMS51xx INTERP BUG1
400400               //|| ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) )
401401               m_inhibit = 1;
r250222r250223
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
732729      m_x[9] = m_x[8] + matrix_multiply(m_current_k[8], m_u[8]);
733730      m_x[8] = m_x[7] + matrix_multiply(m_current_k[7], m_u[7]);
734731      m_x[7] = m_x[6] + matrix_multiply(m_current_k[6], m_u[6]);
r250222r250223
746743      for (i = 9; i >= 0; i--)
747744      {
748745         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      {
754746         fprintf(stderr,"b%d:%04d ", i+1, m_x[i]);
747         if ((i % 5) == 0) fprintf(stderr,"\n");
755748      }
756      fprintf(stderr,"\n");
757749#endif
758750      return m_u[0];
759751}
trunk/src/devices/sound/tms5220.cpp
r250222r250223
788788             * Old frame was unvoiced, new is voiced
789789             * Old frame was unvoiced, new frame is silence/zero energy (non-existent on tms51xx rev D and F (present and working on tms52xx, present but buggy on tms51xx rev A and B))
790790             */
791            if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && NEW_FRAME_UNVOICED_FLAG)
792               || ((OLD_FRAME_UNVOICED_FLAG == 1) && !NEW_FRAME_UNVOICED_FLAG)
793               || ((OLD_FRAME_SILENCE_FLAG == 1) && !NEW_FRAME_SILENCE_FLAG)
791            if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && (NEW_FRAME_UNVOICED_FLAG == 1))
792               || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_UNVOICED_FLAG == 0))
793               || ((OLD_FRAME_SILENCE_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 0))
794794               //|| ((m_inhibit == 1) && (OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) ) //TMS51xx INTERP BUG1
795               || ((OLD_FRAME_UNVOICED_FLAG == 1) && NEW_FRAME_SILENCE_FLAG) )
795               || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 1)) )
796796               m_inhibit = 1;
797797            else // normal frame, normal interpolation
798798               m_inhibit = 0;
r250222r250223
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
11351132      m_x[9] = m_x[8] + matrix_multiply(m_current_k[8], m_u[8]);
11361133      m_x[8] = m_x[7] + matrix_multiply(m_current_k[7], m_u[7]);
11371134      m_x[7] = m_x[6] + matrix_multiply(m_current_k[6], m_u[6]);
r250222r250223
11491146      for (i = 9; i >= 0; i--)
11501147      {
11511148         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      {
11571149         fprintf(stderr,"b%d:%04d ", i+1, m_x[i]);
1150         if ((i % 5) == 0) fprintf(stderr,"\n");
11581151      }
1159      fprintf(stderr,"\n");
11601152#endif
11611153      return m_u[0];
11621154}
trunk/src/devices/sound/votrax.cpp
r250222r250223
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), 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)
99      device_sound_interface(mconfig, *this),
100      m_stream(NULL),
101      m_phoneme_timer(NULL),
102      m_request_cb(*this)
108103{
109104}
110105
r250222r250223
525520   if (LOG_TIMING)
526521      osd_printf_debug("%4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X %4X ", m_master_clock, m_counter_34, m_latch_70, m_latch_72, m_beta1, m_p1, m_p2, m_phi1, m_phi2, m_phi1_20, m_phi2_20, m_subphoneme_count, m_clock_88, m_counter_84, m_latch_92, m_internal_request);
527522   if (LOG_LOWPARAM)
528      osd_printf_debug("%d %d %d %d %d ", m_srff_132, m_srff_114, m_srff_112, m_srff_142, m_latch_80);
523      osd_printf_debug("%4X %4X %4X %4X %4X ", m_srff_132, m_srff_114, m_srff_112, m_srff_142, m_latch_80);
529524   if (LOG_GLOTTAL)
530525      osd_printf_debug("%4X %4X %4X %4X %4X %4X %4X ", m_counter_220, m_counter_222, m_counter_224, m_counter_234, m_counter_236, m_fgate, m_glottal_sync);
531526   if (LOG_TRANSITION)
r250222r250223
656651         {
657652            // if the request line was previously low, reset the VD/CLD flip-flops
658653            if (m_internal_request == CLEAR_LINE)
659                {
660               m_srff_112 = m_srff_114 = false;
661                }
654               m_srff_112 = m_srff_114 = 0;
662655            m_internal_request = ASSERT_LINE;
663656         }
664657
r250222r250223
691684            {
692685               // update CL
693686               case 3:
694                  m_srff_132 = m_srff_114 && BIT(~romdata, 3);
687                  m_srff_132 = m_srff_114 & BIT(~romdata, 3);
695688                  break;
696689
697690               // update CLD
698691               case 4:
699692                  romdata_swapped = (BIT(romdata, 0) << 3) | (BIT(romdata, 1) << 2) | (BIT(romdata, 2) << 1) | (BIT(romdata, 3) << 0);
700693                  if (m_counter_84 != 0 && romdata_swapped == (m_counter_84 ^ 0xf))
701                        {
702                     m_srff_114 = true;
703                        }
694                     m_srff_114 = 1;
704695                  break;
705696
706697               // update VD
707698               case 5:
708699                  romdata_swapped = (BIT(romdata, 0) << 3) | (BIT(romdata, 1) << 2) | (BIT(romdata, 2) << 1) | (BIT(romdata, 3) << 0);
709700                  if (m_counter_84 != 0 && romdata_swapped == (m_counter_84 ^ 0xf))
710                        {
711                     m_srff_112 = true;
712                        }
701                     m_srff_112 = 1;
713702                  break;
714703
715704               // update FF == PAC & (VA | FA)
r250222r250223
851840            // write if not FF and low 2 bits of latch
852841            // FF is the S/R flip-flop at 142 ANDed with !(/FA & /VA)
853842            case 0: case 1: case 2: case 3: case 4:
854               if ((m_srff_142 && !((m_fa == 0) && (m_va == 0))) == 0 && (m_latch_46 & 0x3) == 0x3)
843               if (!(m_srff_142 & !((m_fa == 0) & (m_va == 0))) && (m_latch_46 & 0x3) == 0x3)
855844                  ram_write = 1;
856845               break;
857846
858847            case 5:
859848               if ((m_latch_46 & 0xc) == 0xc && m_srff_112)
860                    {
861849                  ram_write = 1;
862                    }
863850               break;
864851
865852            case 6:
866853               if ((m_latch_46 & 0xc) == 0xc && m_srff_114)
867                    {
868854                  ram_write = 1;
869                    }
870855               break;
871856         }
872857
r250222r250223
12591244   m_latch_92 = 0;
12601245
12611246   // reset low parameter clocking
1262   m_srff_132 = false;
1263   m_srff_114 = false;
1264   m_srff_112 = false;
1265   m_srff_142 = false;
1247   m_srff_132 = 0;
1248   m_srff_114 = 0;
1249   m_srff_112 = 0;
1250   m_srff_142 = 0;
12661251   m_latch_80 = 50;
12671252   update_subphoneme_clock_period();
12681253
trunk/src/devices/sound/votrax.h
r250222r250223
9898   UINT8                       m_latch_92;             // 2-bit latch @ 92
9999
100100   // low parameter clocking
101   bool                        m_srff_132;             // S/R flip-flop @ 132
102   bool                        m_srff_114;             // S/R flip-flop @ 114
103   bool                        m_srff_112;             // S/R flip-flop @ 112
104   bool                        m_srff_142;             // S/R flip-flop @ 142
101   UINT8                       m_srff_132;             // S/R flip-flop @ 132
102   UINT8                       m_srff_114;             // S/R flip-flop @ 114
103   UINT8                       m_srff_112;             // S/R flip-flop @ 112
104   UINT8                       m_srff_142;             // S/R flip-flop @ 142
105105   UINT8                       m_latch_80;             // phoneme timing latch @ 80
106106
107107   // glottal circuit
trunk/src/devices/sound/ym2151.cpp
r250222r250223
601601
602602   for (i=0; i<768; i++)
603603   {
604#if 0
605604      /* 3.4375 Hz is note A; C# is 4 semitones higher */
606605      Hz = 1000;
607      /* Hz is close, but not perfect */
606#if 0
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;
r250222r250223
687687
688688   /* calculate timers' deltas */
689689   /* User's Manual pages 15,16  */
690   #ifndef USE_MAME_TIMERS
691      mult = (1<<TIMER_SH);
692   #endif
690   mult = (1<<TIMER_SH);
693691   for (i=0; i<1024; i++)
694692   {
695693      /* ASG 980324: changed to compute both tim_A_tab and timer_A_time */
trunk/src/devices/video/ef9345.cpp
r250222r250223
860860         set_busy_flag(3.5);
861861         switch(cmd&7)
862862         {
863            case 0:     m_registers[1] = m_charset->u8(indexrom(7) & 0x1fff); break;
863            case 0:     m_registers[1] = m_charset->u8(indexrom(7) & 0x1fff);
864864            case 1:     m_registers[1] = m_tgs; break;
865865            case 2:     m_registers[1] = m_mat; break;
866866            case 3:     m_registers[1] = m_pat; break;
trunk/src/devices/video/h63484.cpp
r250222r250223
20162016   m_hc = m_hds = m_hdw = m_hws = m_hww = 0;
20172017   m_vc = m_vws = m_vww = m_vds = m_vsw = 0;
20182018   m_sp[0] = m_sp[1] = m_sp[2] = 0;
2019   m_ppx = m_ppy = 0;
20192020   m_cl0 = m_cl1 = 0;
20202021   m_xmin = m_ymin = m_xmax = m_ymax = 0;
20212022   m_ppx = m_pzcx = m_psx = m_pzx = m_pex = 0;
trunk/src/devices/video/i8244.cpp
r250222r250223
746746   {
747747      for( ii = 0; ii < samples; ii++, buffer++ )
748748      {
749         *buffer = 0;
749750         *buffer = signal & 0x1;
750751         period = (m_vdc.s.sound & 0x20) ? 1 : 4;
751752         if( ++m_sh_count >= period )
trunk/src/devices/video/mc6845.cpp
r250222r250223
10471047   m_vert_sync_pos = 1;
10481048   m_de = 0;
10491049   m_sync_width = 1;
1050   m_vert_disp = 0;
10501051   m_horiz_pix_total = m_vert_pix_total = 0;
10511052   m_max_visible_x = m_max_visible_y = 0;
10521053   m_hsync_on_pos = m_vsync_on_pos = 0;
trunk/src/devices/video/poly.h
r250222r250223
656656      v3 = tv;
657657      if (v2->y < v1->y)
658658      {
659         const vertex_t *tv2 = v1;
659         const vertex_t *tv = v1;
660660         v1 = v2;
661         v2 = tv2;
661         v2 = tv;
662662      }
663663   }
664664
trunk/src/devices/video/psx.cpp
r250222r250223
23122312
23132313   n_xend = SINT11( COORD_X( m_packet.GouraudLine.vertex[ 1 ].n_coord ) );
23142314   n_yend = SINT11( COORD_Y( m_packet.GouraudLine.vertex[ 1 ].n_coord ) );
2315   n_cr2.w.h = BGR_R( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cr2.w.l = 0;
2316   n_cg2.w.h = BGR_G( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cg2.w.l = 0;
2317   n_cb2.w.h = BGR_B( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cb2.w.l = 0;
2315   n_cr2.w.h = BGR_R( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cr1.w.l = 0;
2316   n_cg2.w.h = BGR_G( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cg1.w.l = 0;
2317   n_cb2.w.h = BGR_B( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cb1.w.l = 0;
23182318
23192319   n_x.sw.h = n_xstart; n_x.sw.l = 0;
23202320   n_y.sw.h = n_ystart; n_y.sw.l = 0;
trunk/src/devices/video/scn2674.cpp
r250222r250223
4444
4545void scn2674_device::device_reset()
4646{
47   m_screen1_l = 0;
48   m_screen1_h = 0;
49   m_cursor_l = 0;
50   m_cursor_h = 0;
51   m_screen2_l = 0;
52   m_screen2_h = 0;
53   m_irq_register = 0;
54   m_status_register = 0;
55   m_irq_mask = 0;
56   m_gfx_enabled = 0;
57   m_display_enabled = 0;
58   m_display_enabled_field = 0;
59   m_display_enabled_scanline = 0;
60   m_cursor_enabled = 0;
61   m_IR0_double_ht_wd = 0;
62   m_IR0_scanline_per_char_row = 1;
63   m_IR0_sync_select = 0;
64   m_IR0_buffer_mode_select = 0;
65   m_IR1_interlace_enable = 0;
66   m_IR1_equalizing_constant = 0;
67   m_IR2_row_table = 0;
68   m_IR2_horz_sync_width = 0;
69   m_IR2_horz_back_porch = 0;
70   m_IR3_vert_front_porch = 0;
71   m_IR3_vert_back_porch = 0;
72   m_IR4_rows_per_screen = 0;
73   m_IR4_character_blink_rate_divisor = 0;
74   m_IR5_character_per_row = 0;
75   m_IR6_cursor_first_scanline = 0;
76   m_IR6_cursor_last_scanline = 0;
77   m_IR7_cursor_underline_position = 0;
78   m_IR7_cursor_rate_divisor = 0;
79   m_IR7_cursor_blink = 0;
80   m_IR7_vsync_width = 0;
81   m_IR8_display_buffer_first_address_LSB = 0;
82   m_IR9_display_buffer_first_address_MSB = 0;
83   m_IR9_display_buffer_last_address = 0;
84   m_IR10_display_pointer_address_lower = 0;
85   m_IR11_display_pointer_address_upper = 0;
86   m_IR11_reset_scanline_counter_on_scrollup = 0;
87   m_IR11_reset_scanline_counter_on_scrolldown = 0;
88   m_IR12_scroll_start = 0;
89   m_IR12_split_register_1 = 0;
90   m_IR13_scroll_end = 0;
91   m_IR13_split_register_2 = 0;
92   m_IR14_scroll_lines = 0;
93   m_IR14_double_1 = 0;
94   m_IR14_double_2 = 0;
95   m_spl1 = 0;
96   m_spl2 = 0;
97   m_dbl1 = 0;
98   m_buffer = 0;
99   m_linecounter = 0;
100   m_irq_state = 0;
47   m_IR_pointer= 0;
48   m_screen1_l= 0;
49   m_screen1_h= 0;
50   m_cursor_l= 0;
51   m_cursor_h= 0;
52   m_screen2_l= 0;
53   m_screen2_h= 0;
54   m_irq_register= 0;
55   m_status_register= 0;
56   m_irq_mask= 0;
57   m_gfx_enabled= 0;
58   m_display_enabled= 0;
59   m_display_enabled_field= 0;
60   m_display_enabled_scanline= 0;
61   m_cursor_enabled= 0;
62   m_IR0_double_ht_wd= 0;
63   m_IR0_scanline_per_char_row= 1;
64   m_IR0_sync_select= 0;
65   m_IR0_buffer_mode_select= 0;
66   m_IR1_interlace_enable= 0;
67   m_IR1_equalizing_constant= 0;
68   m_IR2_row_table= 0;
69   m_IR2_horz_sync_width= 0;
70   m_IR2_horz_back_porch= 0;
71   m_IR3_vert_front_porch= 0;
72   m_IR3_vert_back_porch= 0;
73   m_IR4_rows_per_screen= 0;
74   m_IR4_character_blink_rate_divisor= 0;
75   m_IR5_character_per_row= 0;
76   m_IR6_cursor_first_scanline= 0;
77   m_IR6_cursor_last_scanline= 0;
78   m_IR7_cursor_underline_position= 0;
79   m_IR7_cursor_rate_divisor= 0;
80   m_IR7_cursor_blink= 0;
81   m_IR7_vsync_width= 0;
82   m_IR8_display_buffer_first_address_LSB= 0;
83   m_IR9_display_buffer_first_address_MSB= 0;
84   m_IR9_display_buffer_last_address= 0;
85   m_IR10_display_pointer_address_lower= 0;
86   m_IR11_display_pointer_address_upper= 0;
87   m_IR11_reset_scanline_counter_on_scrollup= 0;
88   m_IR11_reset_scanline_counter_on_scrolldown= 0;
89   m_IR12_scroll_start= 0;
90   m_IR12_split_register_1= 0;
91   m_IR13_scroll_end= 0;
92   m_IR13_split_register_2= 0;
93   m_IR14_scroll_lines= 0;
94   m_IR14_double_1= 0;
95   m_IR14_double_2= 0;
96   m_spl1= 0;
97   m_spl2= 0;
98   m_dbl1= 0;
99   m_buffer= 0;
100   m_linecounter= 0;
101   m_irq_state= 0;
101102   m_IR_pointer = 0;
102103   m_address = 0;
103104   m_start1change = 0;
trunk/src/emu/addrmap.cpp
r250222r250223
2929      m_addrmask(0),
3030      m_share(NULL),
3131      m_region(NULL),
32      m_rgnoffs(0),
33       m_submap_bits(0),
32      m_rgnoffs(0),
3433      m_memory(NULL),
3534      m_bytestart(0),
3635      m_byteend(0),
trunk/src/emu/audit.cpp
r250222r250223
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
1826//**************************************************************************
1927//  CORE FUNCTIONS
2028//**************************************************************************
r250222r250223
270278   int found = 0;
271279
272280   // iterate over sample entries
273   samples_device_iterator iterator(m_enumerator.config().root_device());
274   for (samples_device *device = iterator.first(); device != NULL; device = iterator.next())
281   samples_device_iterator iter(m_enumerator.config().root_device());
282   for (samples_device *device = iter.first(); device != NULL; device = iter.next())
275283   {
276284      // by default we just search using the driver name
277285      std::string searchpath(m_enumerator.driver().name);
r250222r250223
607615      m_shared_device(NULL)
608616{
609617}
618
619#if (defined(__MINGW32__) && (__GNUC__ >= 5))
620#pragma GCC diagnostic pop
621#endif
trunk/src/emu/config.cpp
r250222r250223
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
r250222r250223
13531353   address_space *space;
13541354   const char *action = NULL;
13551355   UINT64 address, length;
1356   int type;
1356   int type = 0;
13571357   int wpnum;
13581358
13591359   /* CPU is implicit */
r250222r250223
18301830{
18311831   UINT64 offset, endoffset, length, width = 0, ascii = 1;
18321832   address_space *space;
1833   FILE *f;
1833   FILE *f = NULL;
18341834   UINT64 i, j;
18351835
18361836   /* validate parameters */
r250222r250223
19841984   /* initialize entire memory by default */
19851985   if (params <= 1)
19861986   {
1987      offset = 0;
1988      length = space->bytemask() + 1;
19871989      for (entry = space->map()->m_entrylist.first(); entry != NULL; entry = entry->next())
19881990      {
19891991         cheat_region[region_count].offset = space->address_to_byte(entry->m_addrstart) & space->bytemask();
r250222r250223
24542456   UINT64 offset, length, bytes = 1;
24552457   int minbytes, maxbytes, byteswidth;
24562458   address_space *space, *decrypted_space;
2457   FILE *f;
2459   FILE *f = NULL;
24582460   int j;
24592461
24602462   /* validate parameters */
trunk/src/emu/debug/debugcon.cpp
r250222r250223
1111#include "emu.h"
1212#include "debugcon.h"
1313#include "debugcpu.h"
14#include "debughlp.h"
1415#include "debugvw.h"
1516#include "textbuf.h"
1617#include "debugger.h"
r250222r250223
269270{
270271   char command[MAX_COMMAND_LENGTH], parens[MAX_COMMAND_LENGTH];
271272   char *params[MAX_COMMAND_PARAMS] = { 0 };
272   CMDERR result;
273   CMDERR result = CMDERR_NONE;
273274   char *command_start;
274275   char *p, c = 0;
275276
trunk/src/emu/debug/debugcpu.cpp
r250222r250223
1212#include "emuopts.h"
1313#include "osdepend.h"
1414#include "debugcpu.h"
15#include "debugcmd.h"
1516#include "debugcon.h"
1617#include "express.h"
1718#include "debugvw.h"
trunk/src/emu/debug/debugvw.cpp
r250222r250223
1717#include "dvmemory.h"
1818#include "dvbpoints.h"
1919#include "dvwpoints.h"
20#include "debugcmd.h"
2021#include "debugcpu.h"
22#include "debugcon.h"
2123#include <ctype.h>
2224
2325
r250222r250223
441443debug_view *debug_view_manager::append(debug_view *view)
442444{
443445   debug_view **viewptr;
444   for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) { }
446   for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) ;
445447   *viewptr = view;
446448   return view;
447449}
trunk/src/emu/debug/debugvw.h
r250222r250223
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);
165166   void set_visible_size(debug_view_xy size);
166167   void set_visible_position(debug_view_xy pos);
167168   void set_cursor_position(debug_view_xy pos);
trunk/src/emu/debug/dvmemory.h
r250222r250223
1111#ifndef __DVMEMORY_H__
1212#define __DVMEMORY_H__
1313
14#include "dvstate.h"
15
16
1417//**************************************************************************
1518//  TYPE DEFINITIONS
1619//**************************************************************************
trunk/src/emu/debug/express.cpp
r250222r250223
11051105      throw expression_error(expression_error::INVALID_TOKEN, token.offset());
11061106
11071107   // convert the space to flags
1108   expression_space memspace;
1108   expression_space memspace = EXPSPACE_INVALID;
11091109   switch (space)
11101110   {
11111111      case 'p':   memspace = physical ? EXPSPACE_PROGRAM_PHYSICAL : EXPSPACE_PROGRAM_LOGICAL; break;
r250222r250223
12191219
12201220   // loop over all the original tokens
12211221   parse_token *prev = NULL;
1222   parse_token *next;
1222   parse_token *next = NULL;
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
r250222r250223
1313#include "debug/debugcpu.h"
1414#include "debug/debugcmd.h"
1515#include "debug/debugcon.h"
16#include "debug/express.h"
1617#include "debug/debugvw.h"
1718#include <ctype.h>
1819
trunk/src/emu/devcb.cpp
r250222r250223
108108//-------------------------------------------------
109109
110110devcb_read_base::devcb_read_base(device_t &device, UINT64 defmask)
111   : devcb_base(device, defmask),
112     m_adapter(NULL)
111   : devcb_base(device, defmask)
113112{
114113}
115114
r250222r250223
336335//-------------------------------------------------
337336
338337devcb_write_base::devcb_write_base(device_t &device, UINT64 defmask)
339   : devcb_base(device, defmask),
340     m_adapter(NULL)
338   : devcb_base(device, defmask)
341339{
342340}
343341
trunk/src/emu/devcpu.cpp
r250222r250223
99***************************************************************************/
1010
1111#include "emu.h"
12#include "debugger.h"
1213#include <ctype.h>
1314
1415
trunk/src/emu/devfind.cpp
r250222r250223
4040//  find_memregion - find memory region
4141//-------------------------------------------------
4242
43void *finder_base::find_memregion(UINT8 width, size_t &length, bool required) const
43void *finder_base::find_memregion(UINT8 width, size_t &length, bool required)
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
r250222r250223
5353
5454protected:
5555   // helpers
56   void *find_memregion(UINT8 width, size_t &length, bool required) const;
56   void *find_memregion(UINT8 width, size_t &length, bool required);
5757   void *find_memshare(UINT8 width, size_t &bytes, bool required);
5858   bool report_missing(bool found, const char *objname, bool required);
5959
r250222r250223
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; }
8384
84   virtual _ObjectClass *operator->() const { assert(m_target != NULL); return m_target; }
85
8685   // getter for explicit fetching
8786   _ObjectClass *target() const { return m_target; }
8887
trunk/src/emu/device.cpp
r250222r250223
1414#include "debug/debugcpu.h"
1515
1616
17
1718//**************************************************************************
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//**************************************************************************
1863//  LIVE DEVICE MANAGEMENT
1964//**************************************************************************
2065
r250222r250223
853898      m_type(type)
854899{
855900   device_interface **tailptr;
856   for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) { }
901   for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) ;
857902   *tailptr = this;
858903}
859904
trunk/src/emu/device.h
r250222r250223
198198
199199   // debugging
200200   device_debug *debug() const { return m_debug; }
201   offs_t safe_pc() const;
202   offs_t safe_pcbase() const;
201   offs_t safe_pc();
202   offs_t safe_pcbase();
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
r250222r250223
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) const { return m_input[linenum].m_curstate; }
169   int input_state(int linenum) { 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) const { return (m_nextsuspend & reason) != 0; }
174   bool suspended(UINT32 reason = SUSPEND_ANY_REASON) { 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); }
r250222r250223
195195   device_execute_interface &execute() { return *this; }
196196
197197protected:
198   // internal helpers
199   void run_thread_wrapper();
200
198201   // clock and cycle information getters
199202   virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const;
200203   virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const;
trunk/src/emu/digfx.cpp
r250222r250223
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"),
26   m_palette(NULL),
25   : device_interface(device, "gfx"),
2726   m_gfxdecodeinfo(gfxinfo),
2827   m_palette_tag(palette_tag),
2928   m_palette_is_sibling(palette_tag == NULL),
trunk/src/emu/diimage.cpp
r250222r250223
1414#include "ui/ui.h"
1515#include "ui/menu.h"
1616#include "zippath.h"
17#include "ui/filesel.h"
18#include "ui/swlist.h"
1719#include "ui/imgcntrl.h"
1820#include "softlist.h"
1921#include "image.h"
r250222r250223
5557
5658device_image_interface::device_image_interface(const machine_config &mconfig, device_t &device)
5759   : device_interface(device, "image"),
58      m_err(),
5960      m_file(NULL),
6061      m_mame_file(NULL),
6162      m_software_info_ptr(NULL),
62      m_software_part_ptr(NULL),
63       m_supported(0),
63      m_software_part_ptr(NULL),
6464      m_readonly(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),
65      m_created(false),
7066      m_is_loading(FALSE)
7167{
7268}
r250222r250223
579575
580576image_error_t device_image_interface::load_image_by_path(UINT32 open_flags, const char *path)
581577{
582   file_error filerr;
583   image_error_t err;
578   file_error filerr = FILERR_NOT_FOUND;
579   image_error_t err = IMAGE_ERROR_FILENOTFOUND;
584580   std::string revised_path;
585581
586582   /* attempt to read the file */
r250222r250223
633629   if(m_file)
634630      core_fclose(m_file);
635631
636   file_error filerr;
637   image_error_t err;
632   file_error filerr = FILERR_NOT_FOUND;
633   image_error_t err = IMAGE_ERROR_FILENOTFOUND;
638634   std::string revised_path;
639635
640636   /* attempt to open the file for writing*/
trunk/src/emu/diimage.h
r250222r250223
253253   void setup_working_directory();
254254   bool try_change_working_directory(const char *subdir);
255255
256   int read_hash_config(const char *sysname);
256257   void run_hash(void (*partialhash)(hash_collection &, const unsigned char *, unsigned long, const char *), hash_collection &hashes, const char *types);
257258   void image_checkhash();
258259   void update_names(const device_type device_type = NULL, const char *inst = NULL, const char *brief = NULL);
trunk/src/emu/dinetwork.cpp
r250222r250223
1616{
1717}
1818
19int device_network_interface::send(UINT8 *buf, int len) const
19int device_network_interface::send(UINT8 *buf, int len)
2020{
2121   if(!m_dev) return 0;
2222   return m_dev->send(buf, len);
trunk/src/emu/dinetwork.h
r250222r250223
1919   bool get_promisc() { return m_promisc; }
2020   int get_interface() { return m_intf; }
2121
22   int send(UINT8 *buf, int len) const;
22   int send(UINT8 *buf, int len);
2323   virtual void recv_cb(UINT8 *buf, int len);
2424
2525protected:
trunk/src/emu/dioutput.cpp
r250222r250223
3535{
3636}
3737
38void device_output_interface::set_output_value(int value) const
38void device_output_interface::set_output_value(int value)
3939{
4040   if (m_output_name)
4141      output_set_value(m_output_name, value);
r250222r250223
4343      fatalerror("Output name not set!");
4444}
4545
46void device_output_interface::set_led_value(int value) const
46void device_output_interface::set_led_value(int value)
4747{
4848   if (m_output_name)
4949      output_set_value(m_output_name, value);
r250222r250223
5151      output_set_led_value(m_output_index, value);
5252}
5353
54void device_output_interface::set_lamp_value(int value) const
54void device_output_interface::set_lamp_value(int value)
5555{
5656   if (m_output_name)
5757      output_set_value(m_output_name, value);
r250222r250223
5959      output_set_lamp_value(m_output_index, value);
6060}
6161
62void device_output_interface::set_digit_value(int value) const
62void device_output_interface::set_digit_value(int value)
6363{
6464   if (m_output_name)
6565      output_set_value(m_output_name, value);
trunk/src/emu/dioutput.h
r250222r250223
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) 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;
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);
5454
5555protected:
5656   int m_output_index;
trunk/src/emu/dipty.cpp
r250222r250223
5353   return m_opened;
5454}
5555
56ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count) const
56ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count)
5757{
5858   UINT32 actual_bytes;
5959
r250222r250223
6464   }
6565}
6666
67void device_pty_interface::write(UINT8 tx_char) const
67void device_pty_interface::write(UINT8 tx_char)
6868{
6969   UINT32 actual_bytes;
7070
trunk/src/emu/dipty.h
r250222r250223
2929
3030      bool is_open(void) const;
3131
32      ssize_t read(UINT8 *rx_chars , size_t count) const;
33      void write(UINT8 tx_char) const;
32      ssize_t read(UINT8 *rx_chars , size_t count);
33      void write(UINT8 tx_char);
3434
3535      bool is_slave_connected(void) const;
3636
trunk/src/emu/dirtc.h
r250222r250223
5555   void set_current_time(running_machine &machine);
5656
5757protected:
58   static UINT8 convert_to_bcd(int val);
59   static int bcd_to_integer(UINT8 val);
58   UINT8 convert_to_bcd(int val);
59   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
r250222r250223
1919   m_rcv_register_data(0x8000),
2020   m_rcv_flags(0),
2121   m_rcv_bit_count_received(0),
22   m_rcv_bit_count(0),
23   m_rcv_byte_received(0),
22   m_rcv_bit_count(0),
2423   m_rcv_framing_error(false),
2524   m_rcv_parity_error(false),
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),
25   m_tra_flags(TRANSMIT_REGISTER_EMPTY),
3026   m_rcv_clock(NULL),
3127   m_tra_clock(NULL),
3228   m_rcv_rate(attotime::never),
trunk/src/emu/dislot.cpp
r250222r250223
2020{
2121}
2222
23device_slot_option::device_slot_option(const char *name, const device_type &devtype):
24   m_next(NULL),
25    m_name(name),
23device_slot_option::device_slot_option(const char *name, const device_type &devtype):
24   m_name(name),
2625   m_devtype(devtype),
2726   m_selectable(true),
2827   m_default_bios(NULL),
trunk/src/emu/disound.cpp
r250222r250223
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 num = 0; num < stream->output_count(); num++)
198               stream->set_output_gain(num, gain);
197            for (int outputnum = 0; outputnum < stream->output_count(); outputnum++)
198               stream->set_output_gain(outputnum, gain);
199199   }
200200
201201   // look up the stream and stream output index
trunk/src/emu/distate.cpp
r250222r250223
146146UINT64 device_state_entry::value() const
147147{
148148   // pick up the value
149   UINT64 result;
149   UINT64 result = ~(UINT64)0;
150150   switch (m_datasize)
151151   {
152152      default:
r250222r250223
172172   bool leadzero = false;
173173   bool percent = false;
174174   bool explicitsign = false;
175   bool hitnonzero;
175   bool hitnonzero = false;
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
r250222r250223
195195//  or 0 if no state object exists
196196//-------------------------------------------------
197197
198inline offs_t device_t::safe_pc() const
198inline offs_t device_t::safe_pc()
199199{
200200   return (m_state != NULL) ? m_state->pc() : 0;
201201}
r250222r250223
206206//  base or 0 if no state object exists
207207//-------------------------------------------------
208208
209inline offs_t device_t::safe_pcbase() const
209inline offs_t device_t::safe_pcbase()
210210{
211211   return (m_state != NULL) ? m_state->pcbase() : 0;
212212}
trunk/src/emu/drawgfxm.h
r250222r250223
5050#ifndef __DRAWGFXM_H__
5151#define __DRAWGFXM_H__
5252
53#include "profiler.h"
54
55
5356/* special priority type meaning "none" */
5457struct NO_PRIORITY { char dummy[3]; };
5558
trunk/src/emu/drivenum.cpp
r250222r250223
395395//  we're done with it
396396//-------------------------------------------------
397397
398void driver_enumerator::release_current() const
398void driver_enumerator::release_current()
399399{
400400   // skip if no current entry
401401   if (m_current < 0 || m_current >= s_driver_count)
trunk/src/emu/drivenum.h
r250222r250223
117117
118118private:
119119   // internal helpers
120   void release_current() const;
120   void release_current();
121121
122122   // entry in the config cache
123123   struct config_entry
trunk/src/emu/drivers/testcpu.cpp
r250222r250223
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"),
36         m_space(NULL)
35         m_ram(*this, "ram")
3736   {
3837   }
3938
trunk/src/emu/emualloc.cpp
r250222r250223
99***************************************************************************/
1010
1111#include "emucore.h"
12#include "coreutil.h"
1213
1314
1415//**************************************************************************
trunk/src/emu/emuopts.cpp
r250222r250223
290290         }
291291      }
292292   }
293   while (add_slot_options(false)) { }
293   while (add_slot_options(false));
294294   add_device_options(false);
295295}
296296
r250222r250223
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;
363   
364   core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
362   bool result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
365363
366364   // keep adding slot options until we stop seeing new stuff
367365   bool isfirstpass = true;
368366   while (add_slot_options(isfirstpass))
369367   {
370      core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
368      result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
371369      isfirstpass = false;
372370   }
373371
r250222r250223
375373   add_device_options(true);
376374   if (name != NULL && exists(name))
377375      set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
378   core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
376   result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
379377
380   int num;
378   int num = 0;
381379   do {
382380      num = options_count();
383381      update_slot_options();
r250222r250223
530528
531529      // then add the options
532530      add_device_options(true);
533      int num;
531      int num = 0;
534532      do {
535533         num = options_count();
536534         update_slot_options();
trunk/src/emu/emupal.cpp
r250222r250223
2424      m_entries(0),
2525      m_indirect_entries(0),
2626      m_enable_shadows(0),
27      m_enable_hilights(0),
28      m_membits(0),
29      m_membits_supplied(false),
30      m_endianness(),
27      m_enable_hilights(0),
28      m_membits_supplied(false),
3129      m_endianness_supplied(false),
3230      m_raw_to_rgb(raw_to_rgb_converter()),
3331      m_palette(NULL),
34      m_pens(NULL),
35      m_format(),
32      m_pens(NULL),
3633      m_shadow_table(NULL),
3734      m_shadow_group(0),
38      m_hilight_group(0),
39      m_white_pen(0),
40      m_black_pen(0),
35      m_hilight_group(0),
4136      m_init(palette_init_delegate())
4237{
4338}
trunk/src/emu/hash.cpp
r250222r250223
292292      // non-hex alpha values specify a hash type
293293      if (uc >= 'G' && uc <= 'Z')
294294      {
295         if (skip_digits != 0)
296            errors = true;
295297         skip_digits = 0;
296298         if (uc == HASH_CRC)
297299         {
trunk/src/emu/hashfile.cpp
r250222r250223
539539
540540bool read_hash_config(device_image_interface &image, const char *sysname, std::string &result)
541541{
542   hash_file *hashfile;
543   const hash_info *info;
542   hash_file *hashfile = NULL;
543   const hash_info *info = NULL;
544544
545545   /* open the hash file */
546546   hashfile = hashfile_open(image.device().mconfig().options(), sysname, FALSE, NULL);
trunk/src/emu/input.cpp
r250222r250223
843843   assert(m_item[itemid] == NULL);
844844
845845   // determine the class and create the appropriate item class
846   input_device_item *item;
846   input_device_item *item = NULL;
847847   switch (m_class.standard_item_class(originalid))
848848   {
849849      case ITEM_CLASS_SWITCH:
r250222r250223
859859         break;
860860
861861      default:
862         item = NULL;
863862         assert(false);
864863   }
865864
trunk/src/emu/ioport.cpp
r250222r250223
9797#include "profiler.h"
9898#include "ui/ui.h"
9999#include "uiinput.h"
100#include "debug/debugcon.h"
100101
101102#include "osdepend.h"
102103
r250222r250223
726727//-------------------------------------------------
727728
728729digital_joystick::digital_joystick(int player, int number)
729   :   m_next(NULL),
730      m_player(player),
730   : m_player(player),
731731      m_number(number),
732732      m_current(0),
733733      m_current4way(0),
r250222r250223
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),
2458      m_has_configs(false),
2459      m_has_analog(false),
2460      m_has_dips(false),
2461      m_has_bioses(false)
2457      m_playback_accumulated_frames(0)
24622458{
24632459   memset(m_type_to_entry, 0, sizeof(m_type_to_entry));
24642460}
r250222r250223
32373233               xml_set_attribute(portnode, "type", input_type_to_token(tempstr, entry->type(), entry->player()));
32383234
32393235               // add only the sequences that have changed from the defaults
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));
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));
32433239            }
32443240         }
32453241      }
trunk/src/emu/ioport.h
r250222r250223
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);
13971398   INT32 frame_interpolate(INT32 oldval, INT32 newval);
13981399   ioport_type token_to_input_type(const char *string, int &player) const;
13991400   const char *input_type_to_token(std::string &str, ioport_type type, int player);
trunk/src/emu/luaengine.cpp
r250222r250223
1313#include "luabridge/Source/LuaBridge/LuaBridge.h"
1414#include <signal.h>
1515#include "emu.h"
16#include "emuopts.h"
17#include "osdepend.h"
1618#include "drivenum.h"
1719#include "ui/ui.h"
1820#include "luaengine.h"
r250222r250223
836838      osd_lock_release(lock);
837839
838840      // Wait for response
839      int done;
841      int done = 0;
840842      do {
841843         osd_sleep(osd_ticks_per_second() / 1000);
842844         osd_lock_acquire(lock);
trunk/src/emu/machine.cpp
r250222r250223
7575#include "debugger.h"
7676#include "render.h"
7777#include "cheat.h"
78#include "ui/selgame.h"
7879#include "uiinput.h"
7980#include "crsshair.h"
81#include "validity.h"
8082#include "unzip.h"
83#include "debug/debugcon.h"
8184#include "debug/debugvw.h"
8285#include "image.h"
8386#include "luaengine.h"
r250222r250223
319322
320323   // notify this device and all its subdevices that they are now configured
321324   device_iterator iter(root_device());
322   for (device_t *dev = iter.first(); dev != NULL; dev = iter.next())
323      if (!dev->configured())
324         dev->config_complete();
325   for (device_t *device = iter.first(); device != NULL; device = iter.next())
326      if (!device->configured())
327         device->config_complete();
325328   return *device;
326329}
327330
r250222r250223
575578         // find length of the device name
576579         int end1 = statename_str.find("/", pos + 3);
577580         int end2 = statename_str.find("%", pos + 3);
578         int end;
581         int end = -1;
579582
580583         if ((end1 != -1) && (end2 != -1))
581584            end = MIN(end1, end2);
trunk/src/emu/machine.h
r250222r250223
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))
7677#define auto_bitmap_ind8_alloc(m, w, h) auto_alloc(m, bitmap_ind8(w, h))
7778#define auto_bitmap_ind16_alloc(m, w, h)    auto_alloc(m, bitmap_ind16(w, h))
7879#define auto_bitmap_ind32_alloc(m, w, h)    auto_alloc(m, bitmap_ind32(w, h))
r250222r250223
190191   bool scheduled_event_pending() const { return m_exit_pending || m_hard_reset_pending; }
191192
192193   // fetch items by name
193   inline device_t *device(const char *tag) const { return root_device().subdevice(tag); }
194   inline device_t *device(const char *tag) { return root_device().subdevice(tag); }
194195   template<class _DeviceClass> inline _DeviceClass *device(const char *tag) { return downcast<_DeviceClass *>(device(tag)); }
195196
196197   // configuration helpers
trunk/src/emu/machine/generic.cpp
r250222r250223
99*********************************************************************/
1010
1111#include "emu.h"
12#include "emuopts.h"
1213#include "config.h"
1314
1415
trunk/src/emu/mame.cpp
r250222r250223
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"
7683#include "validity.h"
84#include "debug/debugcon.h"
7785#include "luaengine.h"
7886#include <time.h>
7987
trunk/src/emu/memory.cpp
r250222r250223
335335
336336   // construction/destruction
337337   handler_entry_read(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
338      : handler_entry(width, endianness, rambaseptr),
339        m_ioport(NULL)
338      : handler_entry(width, endianness, rambaseptr)
340339   {
341340   }
342341
r250222r250223
398397
399398   // construction/destruction
400399   handler_entry_write(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
401      : handler_entry(width, endianness, rambaseptr),
402        m_ioport(NULL)
400      : handler_entry(width, endianness, rambaseptr)
403401   {
404402   }
405403
r250222r250223
40814079      m_byteend(0),
40824080      m_bytemask(~0),
40834081      m_rambaseptr(rambaseptr),
4084      m_subunits(0),
4085       m_invsubmask(0)
4082      m_subunits(0)
40864083{
40874084}
40884085
trunk/src/emu/network.cpp
r250222r250223
99#include <ctype.h>
1010
1111#include "emu.h"
12#include "emuopts.h"
1213#include "network.h"
1314#include "config.h"
1415#include "xmlfile.h"
trunk/src/emu/render.cpp
r250222r250223
935935   m_base_layerconfig.set_zoom_to_screen(manager.machine().options().artwork_crop());
936936
937937   // determine the base orientation based on options
938   m_orientation = ROT0;
938939   if (!manager.machine().options().rotate())
939940      m_base_orientation = orientation_reverse(manager.machine().system().flags & ORIENTATION_MASK);
940941
r250222r250223
13521353      ui_xform.yoffs = 0;
13531354      ui_xform.xscale = (float)m_width;
13541355      ui_xform.yscale = (float)m_height;
1355      ui_xform.color.r = ui_xform.color.g = ui_xform.color.b = 1.0f;
1356      ui_xform.color.r = ui_xform.color.g = ui_xform.color.b = ui_xform.color.a = 1.0f;
13561357      ui_xform.color.a = 0.9f;
13571358      ui_xform.orientation = m_orientation;
13581359      ui_xform.no_center = true;
r250222r250223
25002501
25012502float render_manager::ui_aspect(render_container *rc)
25022503{
2503   int orient;
2504   float aspect;
2504   int orient = 0;
2505   float aspect = 1.0f;
25052506
25062507   if (rc == m_ui_container || rc == NULL) {
25072508      // ui container, aggregated multi-screen target
trunk/src/emu/render.h
r250222r250223
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
315307   // render primitive types
316308   enum primitive_type
317309   {
r250222r250223
530522      friend class simple_list<item>;
531523
532524   public:
533      item() : m_next(NULL), m_type(0), m_flags(0), m_internal(0), m_width(0), m_texture(NULL) { }
534
535525      // getters
536526      item *next() const { return m_next; }
537527      UINT8 type() const { return m_type; }
trunk/src/emu/rendfont.cpp
r250222r250223
1010
1111#include "emu.h"
1212#include "rendfont.h"
13#include "rendutil.h"
1314#include "emuopts.h"
1415#include "coreutil.h"
1516
r250222r250223
510511            else if (strncmp(ptr, "BITMAP", 6) == 0)
511512            {
512513               // stash the raw pointer and scan for the end of the character
513               for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) { }
514               for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) ;
514515               break;
515516            }
516517         }
trunk/src/emu/rendlay.cpp
r250222r250223
5353#include "rendlay.h"
5454#include "rendutil.h"
5555#include "xmlfile.h"
56#include "png.h"
57#include "ui/ui.h"
5658
5759
5860
r250222r250223
630632      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");
631633
632634      // split out position names from string and figure out our number of symbols
633      int location;
635      int location = -1;
634636      m_numstops = 0;
635637      location=symbollist.find(",");
636638      while (location!=-1)
trunk/src/emu/romload.cpp
r250222r250223
1010#include "emu.h"
1111#include "emuopts.h"
1212#include "drivenum.h"
13#include "png.h"
1314#include "chd.h"
15#include "config.h"
1416#include "softlist.h"
1517#include "ui/ui.h"
1618
trunk/src/emu/save.cpp
r250222r250223
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;
197   UINT32 sig = 0;
198198   sig = machine.save().signature();
199199
200200   // seek to the beginning and read the header
trunk/src/emu/schedule.cpp
r250222r250223
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
1422//**************************************************************************
1523//  DEBUGGING
1624//**************************************************************************
r250222r250223
490498               exec->m_totalcycles += ran;
491499
492500               // update the local time for this CPU
493               attotime deltatime(0, exec->m_attoseconds_per_cycle * ran);
494               assert(deltatime >= attotime::zero);
495               exec->m_localtime += deltatime;
501               attotime delta(0, exec->m_attoseconds_per_cycle * ran);
502               assert(delta >= attotime::zero);
503               exec->m_localtime += delta;
496504               LOG(("         %d ran, %d total, time = %s\n", ran, (INT32)exec->m_totalcycles, exec->m_localtime.as_string(PRECISION)));
497505
498506               // if the new local CPU time is less than our target, move the target up, but not before the base
r250222r250223
982990      timer->dump();
983991   machine().logerror("=============================================\n");
984992}
993
994#if (defined(__MINGW32__) && (__GNUC__ >= 5))
995#pragma GCC diagnostic pop
996#endif
trunk/src/emu/screen.cpp
r250222r250223
5858      m_container(NULL),
5959      m_width(100),
6060      m_height(100),
61      m_visarea(0, 99, 0, 99),
62       m_texformat(),
61      m_visarea(0, 99, 0, 99),
6362      m_curbitmap(0),
6463      m_curtexture(0),
6564      m_changed(true),
r250222r250223
635634   LOG_PARTIAL_UPDATES(("updating %d-%d\n", clip.min_y, clip.max_y));
636635   g_profiler.start(PROFILER_VIDEO);
637636
638   UINT32 flags;
637   UINT32 flags = UPDATE_HAS_NOT_CHANGED;
639638   screen_bitmap &curbitmap = m_bitmap[m_curbitmap];
640639   switch (curbitmap.format())
641640   {
r250222r250223
752751
753752      LOG_PARTIAL_UPDATES(("doing scanline partial draw: Y %d X %d-%d\n", clip.max_y, clip.min_x, clip.max_x));
754753
755      UINT32 flags;
754      UINT32 flags = UPDATE_HAS_NOT_CHANGED;
756755      screen_bitmap &curbitmap = m_bitmap[m_curbitmap];
757756      switch (curbitmap.format())
758757      {
trunk/src/emu/softlist.cpp
r250222r250223
99***************************************************************************/
1010
1111#include "emu.h"
12#include "pool.h"
1213#include "emuopts.h"
1314#include "softlist.h"
1415#include "clifront.h"
r250222r250223
278279      m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM),
279280      m_filter(NULL),
280281      m_parsed(false),
281      m_file(mconfig.options().hash_path(), OPEN_FLAG_READ),
282      m_description(NULL)
282      m_file(mconfig.options().hash_path(), OPEN_FLAG_READ)
283283{
284284}
285285
trunk/src/emu/sound.cpp
r250222r250223
791791//-------------------------------------------------
792792
793793sound_stream::stream_output::stream_output()
794   : m_stream(NULL),
795     m_dependents(0),
796     m_gain(0x100)
794   : m_dependents(0),
795      m_gain(0x100)
797796{
798797}
799798
trunk/src/emu/speaker.cpp
r250222r250223
99***************************************************************************/
1010
1111#include "emu.h"
12#include "emuopts.h"
13#include "osdepend.h"
14#include "config.h"
15#include "sound/wavwrite.h"
1216
1317
1418
trunk/src/emu/sprite.h
r250222r250223
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) { }
2827   // getters
2928   const sparse_dirty_rect *next() const { return m_next; }
3029
trunk/src/emu/tilemap.cpp
r250222r250223
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),
1593       m_bytes_per_entry(0),
1592      m_standard_mapper(TILEMAP_STANDARD_COUNT),
15941593      m_tile_width(8),
15951594      m_tile_height(8),
15961595      m_num_columns(64),
trunk/src/emu/timer.cpp
r250222r250223
217217      case TIMER_TYPE_PERIODIC:
218218      {
219219         // convert the period into attotime
220         attotime period;
220         attotime period = attotime::never;
221221         if (m_period > attotime::zero)
222222         {
223223            period = m_period;
trunk/src/emu/ui/cheatopt.cpp
r250222r250223
1111#include "emu.h"
1212#include "cheat.h"
1313
14#include "uiinput.h"
1415#include "ui/ui.h"
1516#include "ui/menu.h"
1617#include "ui/cheatopt.h"
trunk/src/emu/ui/filemngr.cpp
r250222r250223
1414#include "emu.h"
1515#include "ui/ui.h"
1616#include "ui/menu.h"
17#include "ui/swlist.h"
1718#include "ui/filemngr.h"
1819#include "ui/filesel.h"
1920#include "ui/miscmenu.h"
r250222r250223
2829//  ctor
2930//-------------------------------------------------
3031
31ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container), selected_device(NULL)
32ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container)
3233{
3334   // This warning string is used when accessing from the force_file_manager call, i.e.
3435   // when the file manager is loaded top front in the case of mandatory image devices
r250222r250223
126127      if (subiter.count() > 0)
127128      {
128129         // if so, cycle through all its image interfaces
129         image_interface_iterator subiterator(*dev);
130         for (device_image_interface *scan = subiterator.first(); scan != NULL; scan = subiterator.next())
130         image_interface_iterator subiter(*dev);
131         for (device_image_interface *scan = subiter.first(); scan != NULL; scan = subiter.next())
131132         {
132133            // if it is a children device, and not something further down the device tree, we want it in the menu!
133134            if (strcmp(scan->device().owner()->tag(), dev->tag()) == 0)
trunk/src/emu/ui/filesel.cpp
r250222r250223
1616#include "ui/ui.h"
1717#include "ui/menu.h"
1818#include "zippath.h"
19#include "ui/menu.h"
1920#include "ui/filesel.h"
21#include "ui/swlist.h"
2022#include "imagedev/floppy.h"
2123
2224
r250222r250223
98100
99101   // take off the borders
100102   x1 += UI_BOX_LR_BORDER;
103   x2 -= UI_BOX_LR_BORDER;
101104   y1 += UI_BOX_TB_BORDER;
105   y2 -= UI_BOX_TB_BORDER;
102106
103107   // draw the text within it
104108   container->manager().machine().ui().draw_text_full(container,text, x1, y1, text_width, JUSTIFY_LEFT, WRAP_WORD,
r250222r250223
218222ui_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)
219223   : ui_menu(machine, container),
220224      m_current_directory(current_directory),
221      m_current_file(current_file),
222      m_current_format(NULL)
225      m_current_file(current_file)
223226{
224227   m_image = image;
225228   m_ok = ok;
r250222r250223
271274   item_append("New Image Name:", new_image_name, 0, ITEMREF_NEW_IMAGE_NAME);
272275
273276   // do we support multiple formats?
274   if (ENABLE_FORMATS) format = m_image->formatlist();
277   format = m_image->formatlist();
275278   if (ENABLE_FORMATS && (format != NULL))
276279   {
277280      item_append("Image Format:", m_current_format->description(), 0, ITEMREF_FORMAT);
r250222r250223
344347ui_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)
345348   : ui_menu(machine, container),
346349      m_current_directory(current_directory),
347      m_current_file(current_file),
348      m_entrylist(NULL)
350      m_current_file(current_file)
349351{
350352   m_image = image;
351353   m_has_empty = has_empty;
r250222r250223
536538void ui_menu_file_selector::populate()
537539{
538540   zippath_directory *directory = NULL;
539   file_error err;
541   file_error err = FILERR_NONE;
540542   const osd_directory_entry *dirent;
541543   const file_selector_entry *entry;
542544   const file_selector_entry *selected_entry = NULL;
trunk/src/emu/ui/imgcntrl.cpp
r250222r250223
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),
32     submenu_result(0),
33     create_ok(false),
34     create_confirmed(false)
31   : ui_menu(machine, container)
3532{
3633   image = _image;
3734
trunk/src/emu/ui/inputmap.cpp
r250222r250223
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), last_sortorder(0), record_next(false)
227ui_menu_input::ui_menu_input(running_machine &machine, render_container *container) : ui_menu(machine, container)
228228{
229229   pollingitem = 0;
230230   pollingref = 0;
r250222r250223
264264   if (pollingitem != NULL)
265265   {
266266      input_item_data *item = pollingitem;
267      input_seq newseq;
267268
268269      /* if UI_CANCEL is pressed, abort */
269270      if (ui_input_pressed(machine(), IPT_UI_CANCEL))
r250222r250223
532533    switches menus
533534-------------------------------------------------*/
534535
535ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container), diplist(NULL), dipcount(0)
536ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container)
536537{
537538   type = _type;
538539}
trunk/src/emu/ui/mainmenu.cpp
r250222r250223
99*********************************************************************/
1010
1111#include "emu.h"
12#include "audit.h"
1213#include "crsshair.h"
14#include "osdnet.h"
1315#include "emuopts.h"
1416#include "rendutil.h"
1517#include "cheat.h"
18#include "uiinput.h"
19#include "ui/ui.h"
1620#include "ui/menu.h"
1721#include "ui/filemngr.h"
22#include "ui/filesel.h"
1823#include "ui/barcode.h"
1924#include "ui/cheatopt.h"
2025#include "ui/info.h"
r250222r250223
2833#include "ui/tapectrl.h"
2934#include "ui/videoopt.h"
3035#include "imagedev/cassette.h"
36#include "imagedev/bitbngr.h"
3137#include "machine/bcreader.h"
3238
3339
trunk/src/emu/ui/menu.cpp
r250222r250223
99*********************************************************************/
1010
1111#include "emu.h"
12#include "emuopts.h"
1213#include "rendutil.h"
1314#include "cheat.h"
1415#include "uiinput.h"
1516#include "ui/ui.h"
1617#include "ui/menu.h"
1718#include "ui/mainmenu.h"
19#include "ui/cheatopt.h"
1820
1921
2022
r250222r250223
409411
410412   float effective_width, effective_left;
411413   float visible_width, visible_main_menu_height;
412   float visible_extra_menu_height;
414   float visible_extra_menu_height = 0;
413415   float visible_top, visible_left;
414416   int selected_subitem_too_big = FALSE;
415417   int visible_lines;
r250222r250223
810812void ui_menu::handle_keys(UINT32 flags)
811813{
812814   int ignorepause = ui_menu::stack_has_special_main_menu();
813   int ignoreright;
814   int ignoreleft;
815   int ignoreright = FALSE;
816   int ignoreleft = FALSE;
815817   int code;
816818
817819   // bail if no items
trunk/src/emu/ui/menu.h
r250222r250223
180180   void draw_text_box();
181181   void handle_events();
182182   void handle_keys(UINT32 flags);
183   void clear_free_list();
183184
184185   inline bool exclusive_input_pressed(int key, int repeat);
185186   static void clear_free_list(running_machine &machine);
trunk/src/emu/ui/miscmenu.cpp
r250222r250223
1515#include "ui/ui.h"
1616#include "ui/menu.h"
1717#include "ui/miscmenu.h"
18#include "ui/filemngr.h"
1819
1920
2021/***************************************************************************
trunk/src/emu/ui/selgame.cpp
r250222r250223
99***************************************************************************/
1010
1111#include "emu.h"
12#include "osdnet.h"
1213#include "emuopts.h"
1314#include "ui/ui.h"
1415#include "ui/menu.h"
16#include "rendutil.h"
17#include "cheat.h"
1518#include "uiinput.h"
1619#include "ui/selgame.h"
1720#include "ui/inputmap.h"
1821#include "ui/miscmenu.h"
1922#include "audit.h"
23#include "crsshair.h"
2024#include <ctype.h>
2125
2226
r250222r250223
307311   x1 += UI_BOX_LR_BORDER;
308312   x2 -= UI_BOX_LR_BORDER;
309313   y1 += UI_BOX_TB_BORDER;
314   y2 -= UI_BOX_TB_BORDER;
310315
311316   // draw the text within it
312317   machine().ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
r250222r250223
405410   x1 += UI_BOX_LR_BORDER;
406411   x2 -= UI_BOX_LR_BORDER;
407412   y1 += UI_BOX_TB_BORDER;
413   y2 -= UI_BOX_TB_BORDER;
408414
409415   // draw all lines
410416   for (line = 0; line < 4; line++)
trunk/src/emu/ui/swlist.cpp
r250222r250223
270270      // handle selections
271271      else if (event->iptkey == IPT_UI_SELECT)
272272      {
273         entry_info *info = (entry_info *) event->itemref;
274         m_result = info->short_name;
273         entry_info *entry = (entry_info *) event->itemref;
274         m_result = entry->short_name;
275275         ui_menu::stack_pop(machine());
276276      }
277277      else if (event->iptkey == IPT_SPECIAL)
trunk/src/emu/ui/ui.cpp
r250222r250223
1818#include "uiinput.h"
1919#include "ui/ui.h"
2020#include "ui/menu.h"
21#include "ui/cheatopt.h"
2122#include "ui/mainmenu.h"
23#include "ui/miscmenu.h"
2224#include "ui/filemngr.h"
2325#include "ui/sliders.h"
2426#include "ui/viewgfx.h"
r250222r250223
369371
370372      // clear the input memory
371373      machine().input().reset_polling();
372      while (machine().input().poll_switches() != INPUT_CODE_INVALID) { }
374      while (machine().input().poll_switches() != INPUT_CODE_INVALID) ;
373375
374376      // loop while we have a handler
375377      while (m_handler_callback != handler_ingame && !machine().scheduled_event_pending() && !ui_menu::stack_has_special_main_menu())
r250222r250223
16861688UINT32 ui_manager::handler_load_save(running_machine &machine, render_container *container, UINT32 state)
16871689{
16881690   char filename[20];
1691   input_code code;
16891692   char file = 0;
16901693
16911694   // if we're not in the middle of anything, skip
trunk/src/emu/ui/videoopt.cpp
r250222r250223
1111#include "emu.h"
1212#include "rendutil.h"
1313
14#include "uiinput.h"
15#include "ui/ui.h"
1416#include "ui/menu.h"
1517#include "ui/videoopt.h"
1618
trunk/src/emu/ui/viewgfx.cpp
r250222r250223
1010
1111#include "emu.h"
1212#include "ui/ui.h"
13#include "ui/menu.h"
1314#include "uiinput.h"
1415#include "render.h"
1516#include "rendfont.h"
r250222r250223
192193            i < tempcount && state.gfxset.devcount < MAX_GFX_DECODERS;
193194            i++, interface = gfx_iter.next())
194195      {
195         for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++) { }
196         for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++);
196197
197198         // count = index of first NULL
198199         if (count > 0)
r250222r250223
10061007   pixelscale = state.tilemap.zoom;
10071008   if (pixelscale == 0)
10081009   {
1009      for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) { }
1010      for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) { }
1010      for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) ;
1011      for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) ;
10111012      pixelscale = MIN(maxxscale, maxyscale);
10121013   }
10131014
trunk/src/emu/uiinput.cpp
r250222r250223
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;
252   int pressed = FALSE;
253253
254254g_profiler.start(PROFILER_INPUT);
255255
trunk/src/emu/validity.cpp
r250222r250223
287287      validate_roms();
288288      validate_inputs();
289289      validate_devices();
290       m_current_config = NULL;
291290   }
292291   catch (emu_fatalerror &err)
293292   {
294293      osd_printf_error("Fatal error %s", err.string());
295294   }
295   m_current_config = NULL;
296296
297297   // if we had warnings or errors, output
298298   if (m_errors > start_errors || m_warnings > start_warnings)
r250222r250223
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
r250222r250223
11421142         // find length of the device name
11431143         int end1 = snapstr.find("/", pos + 3);
11441144         int end2 = snapstr.find("%", pos + 3);
1145         int end;
1145         int end = -1;
11461146
11471147         if ((end1 != -1) && (end2 != -1))
11481148            end = MIN(end1, end2);
trunk/src/emu/video/resnet.cpp
r250222r250223
346346   max = minval;
347347   for( i = 0; i < networks_no; i++ )
348348   {
349      double val;
349      double val = 0.0;
350350      double max_tmp = minval;
351351      double min_tmp = maxval;
352352
trunk/src/emu/video/rgbgen.h
r250222r250223
1919class rgbaint_t
2020{
2121public:
22   inline rgbaint_t(): m_a(0), m_r(0), m_g(0), m_b(0) { }
22   inline rgbaint_t() { }
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
r250222r250223
2828   typedef __vector unsigned int   VECU32;
2929
3030public:
31   inline rgbaint_t(): VECS8(0), VECU8(0), VECS16(0), VECU16(0), VECS32(0), VECU32(0) { }
31   inline rgbaint_t() { }
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): VECS8(0), VECU8(0), VECS16(0), VECU16(0), VECS32(0), VECU32(0) { m_value = rgba; }
35   inline rgbaint_t(VECS32 rgba) { m_value = rgba; }
3636
3737   inline void set(rgbaint_t& other) { m_value = other.m_value; }
3838
trunk/src/emu/video/vector.cpp
r250222r250223
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),
134      m_vector_list(NULL)
133      device_video_interface(mconfig, *this)
135134{
136135}
137136
138137vector_device::vector_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
139138   : device_t(mconfig, VECTOR, "VECTOR", tag, owner, clock, "vector_device", __FILE__),
140     device_video_interface(mconfig, *this),
141     m_vector_list(NULL)
139      device_video_interface(mconfig, *this)
142140{
143141}
144142
r250222r250223
301299   float xratio = xscale / yscale;
302300   float yratio = yscale / xscale;
303301   xratio = (xratio < 1.0f) ? xratio : 1.0f;
304   yratio = (yratio < 1.0f) ? yratio : 1.0f;
302   xratio = (yratio < 1.0f) ? yratio : 1.0f;
305303
306304   point *curpoint;
307305   render_bounds clip;
trunk/src/lib/formats/ioprocs.cpp
r250222r250223
176176
177177   if (filler_size)
178178   {
179      memset(filler_buffer, generic->filler, sizeof(filler_buffer));
179      memset(filler_buffer, generic->filler, sizeof(buffer));
180180      do
181181      {
182182         bytes_to_write = (filler_size > sizeof(filler_buffer)) ? sizeof(filler_buffer) : (size_t) filler_size;
trunk/src/lib/formats/upd765_dsk.cpp
r250222r250223
304304         // Handling enough tracks is better than not
305305         if(cn.track_count >= tracks && cc.track_count < tracks)
306306            goto change;
307         else if(cc.track_count >= tracks && cn.track_count < tracks)
307         else if(cn.track_count >= tracks && cc.track_count < tracks)
308308            goto dont_change;
309309
310310         // Both are on the same side of the track count, so closest is best
trunk/src/lib/netlist/devices/nld_system.cpp
r250222r250223
316316         rc.m_cmd = MULT;
317317      else if (cmd == "/")
318318         rc.m_cmd = DIV;
319      else if (cmd == "/")
320         rc.m_cmd = DIV;
319321      else if (cmd.startsWith("A"))
320322      {
321323         rc.m_cmd = PUSH_INPUT;
trunk/src/lib/netlist/nl_parser.cpp
r250222r250223
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
1219namespace netlist
1320{
1421// ----------------------------------------------------------------------------------------
r250222r250223
456463#endif
457464}
458465}
466
467#if (defined(__MINGW32__) && (__GNUC__ >= 5))
468#pragma GCC diagnostic pop
469#endif
trunk/src/lib/netlist/plib/pconfig.h
r250222r250223
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
815#ifndef PCONFIG_H_
916#define PCONFIG_H_
1017
r250222r250223
199206#endif
200207
201208#endif /* PCONFIG_H_ */
209
210#if (defined(__MINGW32__) && (__GNUC__ >= 5))
211#pragma GCC diagnostic pop
212#endif
trunk/src/lib/netlist/plib/pparser.cpp
r250222r250223
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
1219// ----------------------------------------------------------------------------------------
1320// A simple tokenizer
1421// ----------------------------------------------------------------------------------------
r250222r250223
468475   }
469476   return ostrm;
470477}
478
479
480#if (defined(__MINGW32__) && (__GNUC__ >= 5))
481#pragma GCC diagnostic pop
482#endif
trunk/src/lib/netlist/solver/nld_solver.cpp
r250222r250223
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
1220#if 0
1321#pragma GCC optimize "-ffast-math"
1422//#pragma GCC optimize "-ftree-parallelize-loops=4"
r250222r250223
641649}
642650
643651NETLIB_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
r250222r250223
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
1421template<typename Class>
1522static plist_t<int> bubble(const pnamedlist_t<Class *> &sl)
1623{
r250222r250223
446453   }
447454
448455}
456
457#if (defined(__MINGW32__) && (__GNUC__ >= 5))
458#pragma GCC diagnostic pop
459#endif
trunk/src/mame/arcade.lst
r250222r250223
81388138wwfwfestb       // bootleg
81398139wwfwfestj       // TA-0031 (c) 1991 (Japan)
81408140wwfwfestk       // TA-0031 (c) 1991 (Korea)
8141shadfrce        // TA-0032 (c) 1993 (World)
8142shadfrceu       // TA-0032 (c) 1993 (US)
8141shadfrce        // TA-0032 (c) 1993 (US)
81438142shadfrcej       // TA-0032 (c) 1993 (Japan)
8143shadfrcejv2     // TA-0032 (c) 1993 (Japan)
81448144
81458145// Stern "Berzerk hardware" games
81468146berzerk         // (c) 1980
r250222r250223
90069006// 68020 board
90079007samuraia        // (c) 1993 (World)
90089008sngkace         // (c) 1993 (Japan)
9009sngkacea        // (c) 1993 (Japan)
90109009gunbird         // (c) 1994
90119010gunbirdk        // (c) 1994
90129011gunbirdj        // (c) 1994
r250222r250223
1123211231potnpkre        // Bootleg
1123311232potnpkrf        // Bootleg
1123411233potnpkrg        // Bootleg
11235potnpkrh        // Bootleg
11234goodluck        // Unknown
11235superdbl        // 198? Karateco
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
1126611239witchcrd        // (c) 1991, Video Klein
1126711240witchcda        // 1991, Unknown
1126811241witchcdb        // 1991, Unknown
r250222r250223
1130611279wupndownd       // (c) 1998, Video Klein
1130711280wstrike         // (c) 1992, Video Klein
1130811281wstrikea        // (c) 1992, Video Klein
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
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
1132011319pmpoker         // (c) 1981 PlayMan
1132111320royale          // Unknown
1132211321royalea         // Unknown
r250222r250223
1133211331genie           // (c) 198? Video Fun Games Ltd.
1133311332geniea          // 198?, Unknown
1133411333silverga        // 1983, Unknown
11335superdbl        // 198? Karateco
1133611334pokerdub        // 198?, Unknown
1133711335pokerduc        // 198?, Unknown
1133811336bchancep        // 198?, Unknown
r250222r250223
1331413312deathrac      // (c) 1976 Exidy
1331513313biplane4      // (c) 1976 Fun Games
1331613314take5         // (c) 1975 Fun Games
13317//knightar    // (c) 1976 PSE
13318bazooka       // (c) 1976 PSE
13319bazookabr     // (c) 1977 Taito do Brasil
1332013315dpatrol       // (c) 1977 PSE
13316//knightar    // (c) 1976 PSE
1332113317//gametree    // (c) 1978 PSE
1332213318vollyrmt      // (c) 1973 Ramtek
1332313319hockyrmt      // (c) 1973 Ramtek
r250222r250223
1332913325monacogp      // (c) 1980 Sega
1333013326monacogpa     // (c) 1980 Sega
1333113327gunman        // (c) 1977 Taito
13328bazooka       // (c) 1977 PSE
13329bazookabr     // (c) 1977 Taito do Brasil
1333213330missilex      // (c) 1977 Taito
1333313331ttblock       // (c) 1977 Taito
1333413332zzblock       // (c) 1979 Taito
trunk/src/mame/audio/irem.cpp
r250222r250223
409409#define USE_FRONTIERS 1
410410#define USE_FIXED_STV 1
411411
412#include "nl_kidniki.inc"
412#include "nl_kidniki.cpp"
413413
414414NETLIST_START(kidniki_interface)
415415
trunk/src/mame/audio/nl_kidniki.cpp
r0r250223
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
r250222r250223
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
r250222r250223
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)
820819SLOT_INTERFACE_END
821820
822821SLOT_INTERFACE_START(cpc_exp_cards)
r250222r250223
834833   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
835834   SLOT_INTERFACE("hd20", CPC_HD20)
836835   SLOT_INTERFACE("doubler", CPC_DOUBLER)
837   SLOT_INTERFACE("transtape", CPC_TRANSTAPE)
838836SLOT_INTERFACE_END
839837
840838SLOT_INTERFACE_START(cpcplus_exp_cards)
r250222r250223
850848   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
851849   SLOT_INTERFACE("hd20", CPC_HD20)
852850   SLOT_INTERFACE("doubler", CPC_DOUBLER)
853   SLOT_INTERFACE("transtape", CPC_TRANSTAPE)  // Plus compatible?
854851SLOT_INTERFACE_END
855852
856853SLOT_INTERFACE_START(aleste_exp_cards)
r250222r250223
868865   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
869866   SLOT_INTERFACE("hd20", CPC_HD20)
870867   SLOT_INTERFACE("doubler", CPC_DOUBLER)
871   SLOT_INTERFACE("transtape", CPC_TRANSTAPE)
872868   SLOT_INTERFACE("magicsound", AL_MAGICSOUND)
873869SLOT_INTERFACE_END
874870
trunk/src/mame/drivers/bfm_ad5.cpp
r250222r250223
3838   // find it.
3939   int found = find_project_string(machine(), 3, 0);
4040   if (!found)
41    {
4241      printf("Normal rom pair string not found, checking mismatched / missing rom string\n");
43    }
4442
4543   // help identify roms where one of the pair is missing too
4644   if (!found)
4745   {
48      found = find_project_string(machine(), 3, 1);
46         found = find_project_string(machine(), 3, 1);
47         found = find_project_string(machine(), 3, 2);
4948   }
5049
51    if (!found)
52    {
53      found = find_project_string(machine(), 3, 2);
54    }
55   
56    if (!found)
57    {
50   if (!found)
5851      printf("No suitable string found\n");
59    }
6052
6153}
6254
trunk/src/mame/drivers/bfm_sc5sw.cpp
r250222r250223
1313513135   // find it.
1313613136   int found = find_project_string(machine(), 3, 0);
1313713137   if (!found)
13138    {
1313913138      printf("Normal rom pair string not found, checking mismatched / missing rom string\n");
13140    }
1314113139
1314213140   // help identify roms where one of the pair is missing too
1314313141   if (!found)
1314413142   {
13145      found = find_project_string(machine(), 3, 1);
13143         found = find_project_string(machine(), 3, 1);
13144         found = find_project_string(machine(), 3, 2);
1314613145   }
13147   
13148    if (!found)
13149    {
13150      found = find_project_string(machine(), 3, 2);
13151    }
13152   
13153    if (!found)
13154    {
13155        printf("No suitable string found\n");
13156    }
1315713146
13147   if (!found)
13148      printf("No suitable string found\n");
13149
1315813150}
1315913151
1316013152// PR2437 28 PLAYS LATER         TEDL SOUNDS         NITH
trunk/src/mame/drivers/c65_old.cpp
r0r250223
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
r250222r250223
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
381388#define LOG_PCI
382389//#define LOG_BASEBOARD
383390
r250222r250223
12761283// 0023
12771284// 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 )
12781285/* 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/d6800.cpp
r250222r250223
282282   */
283283
284284   m_beeper->set_frequency(BIT(data, 0) ? 2400 : 1200);
285   m_beeper->set_state(BIT(data, 6) & (m_cb2 ? 1 : 0));
285   m_beeper->set_state(BIT(data, 6) & m_cb2);
286286
287287   m_portb = data & 0x7f;
288288}
trunk/src/mame/drivers/exidyttl.cpp
r250222r250223
44
55Exidy discrete hardware games
66
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)
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)
1313 Spiders From Space (1976)
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)
14 Sting (1974)
15 Super Death Chase (1977)
16 Table Foosballer / Table Football (1975)
17 Table Pinball (1974)
18 TV Pinball (1974) (PB-4)
1919
2020***************************************************************************/
2121
r250222r250223
211211   ROM_LOAD( "6331-36.t7",     0x0000, 0x0020, CRC(15e00a2a) SHA1(cd43d227a34e5444ed9d8a4acf5497df9c789c73) )
212212ROM_END
213213
214
215
214216GAME( 1977, attckexd,  0,        attack,   0, driver_device,  0, ROT0, "Exidy", "Attack (Set 1) [TTL]", MACHINE_IS_SKELETON )
215217GAME( 1977, attckexd2, attckexd, attack,   0, driver_device,  0, ROT0, "Exidy", "Attack (Set 2) [TTL]", MACHINE_IS_SKELETON )
216218GAME( 1976, deathrac,  0,        deathrac, 0, driver_device,  0, ROT0, "Exidy", "Death Race [TTL]", MACHINE_IS_SKELETON )
trunk/src/mame/drivers/fidelz80.cpp
r250222r250223
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?
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.
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)
1512*  * Get rom locations from pcb (done for UVC, VCC is probably similar)
1613*  * correctly hook up 7002/VBRC and 7014/bridgec3 speech so that the z80 is halted while words are being spoken
1714*
r250222r250223
5249
5350I/O map:
5451--------
5500-03: 8255 port chip, mirrored over the 00-FF range; program accesses F4-F7
5200-FF: 8255 port chip [LN edit: 00-03, mirrored over the 00-FF range; program accesses F4-F7]
5653
5754
58558255 connections:
r250222r250223
608605void fidelz80_state::update_display()
609606{
610607   // data for the 4x 7seg leds, bits are 0bxABCDEFG
611   UINT8 out_digit = BITSWAP8(m_digit_data,7,0,1,2,3,4,5,6) & 0x7f;
608   UINT8 out_digit = BITSWAP8( m_digit_data,7,0,1,2,3,4,5,6 ) & 0x7f;
612609
613610   if (m_led_selected&0x04)
614611   {
615612      output_set_digit_value(0, out_digit);
616613
617      output_set_led_value(1, m_led_data);
614      output_set_led_value(1, m_led_data & 0x01);
618615   }
619616   if (m_led_selected&0x08)
620617   {
621618      output_set_digit_value(1, out_digit);
622619
623      output_set_led_value(0, m_led_data);
620      output_set_led_value(0, m_led_data & 0x01);
624621   }
625622   if (m_led_selected&0x10)
626623   {
r250222r250223
632629   }
633630}
634631
635READ8_MEMBER(fidelz80_state::fidelz80_portc_r)
632READ8_MEMBER( fidelz80_state::fidelz80_portc_r )
636633{
637634   UINT8 data = 0xff;
638635
r250222r250223
656653   return data;
657654}
658655
659WRITE8_MEMBER(fidelz80_state::fidelz80_portb_w)
656WRITE8_MEMBER( fidelz80_state::fidelz80_portb_w )
660657{
661658   if (!(data & 0x80))
662659   {
663      m_led_data = data & 1; // common for two leds
660      m_led_data = (data&0x01);  // common for two leds
664661
665662      m_led_selected = data;
666663
r250222r250223
670667   // ignoring the language switch enable for now, is bit 0x40
671668}
672669
673WRITE8_MEMBER(fidelz80_state::fidelz80_portc_w)
670WRITE8_MEMBER( fidelz80_state::fidelz80_portc_w )
674671{
675672   m_kp_matrix = data;
676673}
677674
678WRITE8_MEMBER(fidelz80_state::cc10_porta_w)
675WRITE8_MEMBER( fidelz80_state::cc10_porta_w )
679676{
680677   m_beep->set_state((data & 0x80) ? 0 : 1);
681678
r250222r250223
684681   update_display();
685682}
686683
687READ8_MEMBER(fidelz80_state::vcc_portb_r)
684READ8_MEMBER( fidelz80_state::vcc_portb_r )
688685{
689686   return (m_speech->bsy_r() != 0) ? 0x80 : 0x00;
690687}
691688
692WRITE8_MEMBER(fidelz80_state::vcc_porta_w)
689WRITE8_MEMBER( fidelz80_state::vcc_porta_w )
693690{
694691   m_speech->set_volume(15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
695692   m_speech->reg_w(data & 0x3f);
r250222r250223
704701    I8255 Device, for VSC
705702******************************************************************************/
706703
707WRITE8_MEMBER(fidelz80_state::vsc_porta_w)
704WRITE8_MEMBER( fidelz80_state::vsc_porta_w )
708705{
709   UINT8 out_digit = BITSWAP8(data,7,6,2,1,0,5,4,3);
706   UINT8 out_digit = BITSWAP8( data,7,6,2,1,0,5,4,3 );
710707
711708   if (m_kp_matrix & 0x01)
712709   {
r250222r250223
731728   m_speech->reg_w(data & 0x3f);
732729}
733730
734WRITE8_MEMBER(fidelz80_state::vsc_portb_w)
731WRITE8_MEMBER( fidelz80_state::vsc_portb_w )
735732{
736   for (int row = 1; row <= 8; row++)
733   for (int row=1; row<=8; row++)
737734   {
738735      if (m_kp_matrix & 0x01)
739736         output_set_indexed_value("led_a", row, BIT(data, 8-row));
r250222r250223
754751   }
755752}
756753
757WRITE8_MEMBER(fidelz80_state::vsc_portc_w)
754WRITE8_MEMBER( fidelz80_state::vsc_portc_w )
758755{
759756   m_kp_matrix = (m_kp_matrix & 0x300) | data;
760757}
r250222r250223
763760    PIO Device, for VSC
764761******************************************************************************/
765762
766READ8_MEMBER(fidelz80_state::vsc_pio_porta_r)
763READ8_MEMBER( fidelz80_state::vsc_pio_porta_r )
767764{
768765   UINT8 data = 0;
769766
r250222r250223
791788   return data & 0xff;
792789}
793790
794READ8_MEMBER(fidelz80_state::vsc_pio_portb_r)
791READ8_MEMBER( fidelz80_state::vsc_pio_portb_r )
795792{
796793   UINT8 data = 0x00;
797794
r250222r250223
801798   return data;
802799}
803800
804WRITE8_MEMBER(fidelz80_state::vsc_pio_portb_w)
801WRITE8_MEMBER( fidelz80_state::vsc_pio_portb_w )
805802{
806803   m_kp_matrix = (m_kp_matrix & 0xff) | ((data & 0x03)<<8);
807804
r250222r250223
958955   return m_i8041->upi41_master_r(space, 1);
959956}
960957
961WRITE8_MEMBER(fidelz80_state::bridgec_speech_w)
958WRITE8_MEMBER( fidelz80_state::bridgec_speech_w )
962959{
963960   // todo: HALT THE z80 here, and set up a callback to poll the s14001a DONE line to resume z80
964961   m_speech->set_volume(15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
r250222r250223
966963   m_speech->rst_w(BIT(data, 7));
967964}
968965
969void fidelz80_state::machine_start()
966void fidelz80_state::machine_reset()
970967{
971   // zerofill
972968   m_led_selected = 0;
973969   m_kp_matrix = 0;
974970   m_digit_data = 0;
975971   m_led_data = 0;
976972   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));
984973}
985974
986975TIMER_DEVICE_CALLBACK_MEMBER(fidelz80_state::nmi_timer)
r250222r250223
10201009   AM_RANGE(0x2000, 0x3fff) AM_ROM // 8k rom
10211010   AM_RANGE(0x4000, 0x5fff) AM_ROM // 8k rom
10221011   AM_RANGE(0x6000, 0x63ff) AM_RAM AM_MIRROR(0x1c00) // 1k ram (2114*2) mirrored 8 times
1023   AM_RANGE(0xe000, 0xe000) AM_WRITE(bridgec_speech_w) AM_MIRROR(0x1fff) // write to speech chip, halts cpu
1012   AM_RANGE(0xE000, 0xE000) AM_WRITE(bridgec_speech_w) AM_MIRROR(0x1FFF) // write to speech chip, halts cpu
10241013ADDRESS_MAP_END
10251014
10261015static ADDRESS_MAP_START(fidel_z80_io, AS_IO, 8, fidelz80_state)
r250222r250223
10701059}
10711060
10721061static INPUT_PORTS_START( fidelz80 )
1073   PORT_START("LEVEL") // cc10 only
1062   PORT_START("LEVEL")     // cc10 only
10741063      PORT_CONFNAME( 0x80, 0x00, "Number of levels" )
10751064      PORT_CONFSETTING( 0x00, "10" )
10761065      PORT_CONFSETTING( 0x80, "3" )
r250222r250223
12591248******************************************************************************/
12601249
12611250static MACHINE_CONFIG_START( cc10, fidelz80_state )
1262
12631251   /* basic machine hardware */
12641252   MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
12651253   MCFG_CPU_PROGRAM_MAP(cc10_z80_mem)
r250222r250223
12781266   MCFG_I8255_OUT_PORTC_CB(WRITE8(fidelz80_state, fidelz80_portc_w))
12791267
12801268   /* sound hardware */
1281   MCFG_SPEAKER_STANDARD_MONO("mono")
1282   MCFG_SOUND_ADD("beeper", BEEP, 0)
1283   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
1269   MCFG_SPEAKER_STANDARD_MONO( "mono" )
1270   MCFG_SOUND_ADD( "beeper", BEEP, 0 )
1271   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
12841272MACHINE_CONFIG_END
12851273
12861274static MACHINE_CONFIG_START( vcc, fidelz80_state )
1287
12881275   /* basic machine hardware */
12891276   MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
12901277   MCFG_CPU_PROGRAM_MAP(vcc_z80_mem)
r250222r250223
13101297MACHINE_CONFIG_END
13111298
13121299static MACHINE_CONFIG_START( vsc, fidelz80_state )
1313
13141300   /* basic machine hardware */
13151301   MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
13161302   MCFG_CPU_PROGRAM_MAP(vsc_mem)
r250222r250223
13391325MACHINE_CONFIG_END
13401326
13411327static MACHINE_CONFIG_START( bridgec, fidelz80_state )
1342
13431328   /* basic machine hardware */
13441329   MCFG_CPU_ADD("maincpu", Z80, XTAL_5MHz/2) // 2.5MHz
13451330   MCFG_CPU_PROGRAM_MAP(bridgec_z80_mem)
r250222r250223
13561341   MCFG_I8243_ADD("i8243", NOOP, WRITE8(fidelz80_state,digit_w))
13571342
13581343   /* sound hardware */
1359   MCFG_SPEAKER_STANDARD_MONO("mono")
1344   MCFG_SPEAKER_STANDARD_MONO( "mono" )
13601345   MCFG_SOUND_ADD("speech", S14001A, 25000) // around 25khz
1361   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
1346   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
13621347MACHINE_CONFIG_END
13631348
13641349
r250222r250223
14321417 Drivers
14331418******************************************************************************/
14341419
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 )
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 )
trunk/src/mame/drivers/goldnpkr.cpp
r250222r250223
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.
2728  * Jack Potten's Poker (NGold, set 1),               198?, Unknown.
2829  * Jack Potten's Poker (NGold, set 2),               198?, Unknown.
2930  * 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.
5631  * Witch Card (Video Klein CPU box, set 1),          1991, Video Klein.
5732  * Witch Card (Video Klein CPU box, set 2),          1991, Video Klein.
5833  * Witch Card (Spanish, witch game, set 1),          1991, Unknown.
r250222r250223
10782  * Witch Jack (Export, 6T/12T ver 0.87),             1992-1996, Video Klein.
10883  * Witch Jack (Export, 6T/12T ver 0.87-88),          1992-1996, Video Klein.
10984  * 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.
110111  * PlayMan Poker (German),                           1981, PM / Beck Elektronik.
111112  * Super Loco 93 (Spanish, set 1),                   1993, Unknown.
112113  * Super Loco 93 (Spanish, set 2),                   1993, Unknown.
r250222r250223
123124  * Genie (ICP-1, set 2),                             198?, Unknown.
124125  * Silver Game,                                      1983, Unknown.
125126  * 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.
r250222r250223
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
10611049  TODO:
10621050
10631051  - Missing PIA connections.
r250222r250223
17841772   PORT_START("IN0-3")
17851773   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn Mode") PORT_CODE(KEYCODE_F2)
17861774   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) /* O.A.R? (D-31 in schematics) */
1787   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_IMPULSE(3) PORT_NAME("Coupon (Note In)")
1775   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_NAME("Coupon (Note In)")
17881776   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Coin In")
17891777   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )   PORT_NAME("Weight (Coupon In)")
17901778   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
r250222r250223
44994487   ROM_LOAD( "prg.bin",    0x4000, 0x4000, CRC(d7a932a2) SHA1(c940ea90378a631c217a09c4a9e73c382acaa48d) )
45004488
45014489   ROM_REGION( 0x3000, "gfx1", 0 )
4502   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4490   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
45034491   ROM_LOAD( "3.bin",  0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) )    /* text layer */
45044492
45054493   ROM_REGION( 0x1800, "gfx2", 0 )
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 */
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 */
45094497
45104498   ROM_REGION( 0x0100, "proms", 0 )
4511   ROM_LOAD( "82s129.9c",  0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4499   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
45124500ROM_END
45134501
45144502/* Unknown australian hard to dump set
r250222r250223
45324520   ROM_LOAD( "bprom.bin",    0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
45334521ROM_END
45344522
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
45604523ROM_START( goodluck )
45614524   ROM_REGION( 0x10000, "maincpu", 0 )
45624525   ROM_LOAD( "goodluck_glh6b.bin", 0x0000, 0x8000, CRC(2cfa4a2c) SHA1(720e2900f3a0ef2632aa201a63b5eba0570e6aa3) )
r250222r250223
45714534   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
45724535
45734536   ROM_REGION( 0x0100, "proms", 0 )
4574   ROM_LOAD( "82s129.9c",  0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4537   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
45754538ROM_END
45764539
4540/****************************************************
45774541
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
45784571/************************************************************
45794572
45804573  Ngold (3 sets).
r250222r250223
46424635ROM_END
46434636
46444637
4645/**************************************** BUENA SUERTE SETS ****************************************/
4638/******************************* WITCH CARD SETS *******************************/
46464639
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
46474971/*
46484972    checksum routine at $5827
46494973    protect $4000+ & $7ff9.
r250222r250223
50255349ROM_END
50265350
50275351
5028/**************************************** VIDEO KLEIN SETS ****************************************/
5352/******************************* FALCONS WILD SETS *******************************/
50295353
5354/*********************************************
50305355
5031/*********** WITCH CARD SETS *************/
5356    Falcons Wild - Wild Card 1991.
5357    1992-1992 TVG D-6310 GRUENBERG.
5358    (bootleg in real Bonanza hardware).
50325359
5033/*  Witch Card (Video Klein)
5034    Video Klein original with epoxy block module
5035*/
5036   ROM_START( witchcrd )
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 )
50375489   ROM_REGION( 0x10000, "maincpu", 0 )
5038   ROM_LOAD( "epoxy_27128.bin",    0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) )  /* epoxy block program ROM */
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) )
50395493
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
50405511   ROM_REGION( 0x3000, "gfx1", 0 )
50415512   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
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 */
5513   ROM_LOAD( "royalechr.bin",  0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) )    /* text layer */
50445514
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 */
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 */
50495519
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 */
5520   ROM_REGION( 0x0100, "proms", 0 )
5521   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
50535522ROM_END
50545523
5055/*  Witch Card (Spanish, set 1)
5056    Unknown argentine manufacturer.
5057*/
5058ROM_START( witchcda )
5524ROM_START( royalea )
50595525   ROM_REGION( 0x10000, "maincpu", 0 )
5060   ROM_LOAD( "w_card.256", 0x0000, 0x8000, CRC(63a471f8) SHA1(96a2140e2da0050e7865a6662f707cf024130832) )
5526   ROM_LOAD( "royal.256", 0x0000, 0x8000, CRC(9d7fdb79) SHA1(05cae00bca0f6ae696c69f531cb0fa2104ff696a) )
50615527
50625528   ROM_REGION( 0x3000, "gfx1", 0 )
50635529   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5064   ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) )    /* text layer */
5530   ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) )    /* text layer */
50655531
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
50665549   ROM_REGION( 0x3000, "gfx2", 0 )
50675550   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
50685551   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
r250222r250223
50725555   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
50735556ROM_END
50745557
5075/*  Witch Card (Spanish, set 2)
5076    Unknown argentine manufacturer.
5077*/
5078ROM_START( witchcdb )
5558ROM_START( sloco93a )
50795559   ROM_REGION( 0x10000, "maincpu", 0 )
5080   ROM_LOAD( "w_card.128", 0x4000, 0x4000, CRC(11ecac96) SHA1(717709b31f3dfa09be321c14fbf0e95d492ad2f2) )
5560   ROM_LOAD( "locoloco.256",   0x0000, 0x8000, CRC(ab037b0b) SHA1(16f811daaed5bf7b72549db85755c5274dfee310) )
50815561
50825562   ROM_REGION( 0x3000, "gfx1", 0 )
50835563   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5084   ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) )    /* text layer */
5564   ROM_LOAD( "confloco.032",   0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) )    /* text layer */
50855565
50865566   ROM_REGION( 0x3000, "gfx2", 0 )
50875567   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
r250222r250223
50925572   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
50935573ROM_END
50945574
5095/*  Witch Card (English, no witch game)
5096    Hack?
5575/*
5576    checksum routine at $5f3e
5577    protect $4000+ & $7ff9.
5578    (see cmp at $5f6b)
5579    balanced at $7ff8.
50975580*/
5098ROM_START( witchcdc )
5099   ROM_REGION( 0x10000, "maincpu", 0 )
5100   ROM_LOAD( "wc_sbruj.256",   0x0000, 0x8000, CRC(5689ae41) SHA1(c7a624ec881204137489b147ce66cc9a9900650a) )
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) )
51015584
51025585   ROM_REGION( 0x3000, "gfx1", 0 )
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 */
5586   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5587   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
51055588
51065589   ROM_REGION( 0x3000, "gfx2", 0 )
51075590   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
r250222r250223
51125595   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
51135596ROM_END
51145597
5115/***************************************
5598/*****************************
51165599
5117  Witch Card (German, WC3050, set 1 )
5600  Brasil XX sets...
51185601
5119  TV GAME ELEKTRONIK 1994
5120         PROMA
5121   CASINOVERSION WC3050
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) )
51225606
5123***************************************/
5124ROM_START( witchcdd )
5125   ROM_REGION( 0x10000, "maincpu", 0 )
5126   ROM_LOAD( "12a.bin",    0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
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 */
51275610
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 */
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 */
51315615
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 */
5616   ROM_REGION( 0x0100, "proms", 0 )
5617   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5618ROM_END
51365619
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
51375633   ROM_REGION( 0x0100, "proms", 0 )
5138   ROM_LOAD( "tbp24s10n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5634   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
51395635ROM_END
51405636
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 */
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) )
51485640
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) )
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 */
51545644
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 */
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 */
51585649
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 */
5650   ROM_REGION( 0x0100, "proms", 0 )
5651   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5652ROM_END
51635653
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 */
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 */
51675669ROM_END
51685670
5169/*  Witch Card (English, witch game, lights)
5170    PCB by PM. Hybrid hardware.
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) )
51715674
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) )
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 */
51805678
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
51815692   ROM_REGION( 0x3000, "gfx1", 0 )
5182   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5183   ROM_LOAD( "$14.bin",    0x2000, 0x1000, CRC(19b68bec) SHA1(b8ef17ba5545e2f104cd2783e5f1c97c400fcbbc) )    /* text layer */
5693   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5694   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
51845695
51855696   ROM_REGION( 0x3000, "gfx2", 0 )
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 */
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 */
51895700
51905701   ROM_REGION( 0x0100, "proms", 0 )
5191   ROM_LOAD( "wc_bprom.bin",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5702   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
51925703ROM_END
51935704
5194/*******************************************
5705/****************************************************
51955706
5196  Witch Card (Falcon)
5197  Original Falcon PCB marked
5198  "831 1.1 MADE IN JAPAN"
5707  Genie (Video Fun Games Ltd.)
5708  Skill game. Only for amusement.
51995709
5200  Same board as Falcons Wild, but without
5201  extra RAM / ROM / encrypted 2nd CPU.
5710  PCB is a heavily modified Golden Poker hardware.
5711  Silkscreened "ICP-1".
52025712
5203  AY8910 is present.
5713  CPU:   1x SY6502.
5714  Video: 1x HD6845P CRTC.
5715  I/O:   2x HD6821P PIAs.
52045716
5205*******************************************/
5206ROM_START( witchcdg )
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 )
52075734   ROM_REGION( 0x10000, "maincpu", 0 )
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) )
5735   ROM_LOAD( "2m.16a", 0x2000, 0x1000, CRC(30df75f5) SHA1(0696fb3db0b9927e6366db7316d605914ff8d464) )
5736   ROM_LOAD( "3m.17a", 0x3000, 0x1000, CRC(9d67f5c9) SHA1(d3bc13ce07a7b1713544756d7723dd0bcd59cd1a) )
52115737
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 */
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 */
52185741
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
52195768   ROM_REGION( 0x3000, "gfx1", 0 )
5220   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5221   ROM_COPY( "gfx2",   0x2800, 0x2000, 0x0800 )    /* srctag, srcoffs, offset, length */
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 */
52225771
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) )
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) )
52265779ROM_END
52275780
5228/***************************************
52295781
5230  Witch Card (German, WC3050, set 2 )
5782/****************************************************
52315783
5232  TV GAME ELEKTRONIK 1994
5233         PROMA
5234   CASINOVERSION WC3050
5784  Silver Game.
5785  1983.
52355786
5236***************************************/
5237ROM_START( witchcdh )
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 )
52385800   ROM_REGION( 0x10000, "maincpu", 0 )
5239   ROM_LOAD( "prog3000.a12",   0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
5801   ROM_LOAD( "14", 0x5000, 0x1000, CRC(e4691878) SHA1(376c3910030f27517d798aac759553d5634b8ffc) )
5802   ROM_LOAD( "55", 0x6000, 0x2000, CRC(aad57b3c) SHA1(9508026c1a7b227a70d89ad2f7245e75a615b932) )
52405803
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 */
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 */
52445807
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 */
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 */
52495812
52505813   ROM_REGION( 0x0100, "proms", 0 )
5251   ROM_LOAD( "tbp24s10n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5814   ROM_LOAD( "s287",       0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
52525815ROM_END
52535816
5254/***************************************
5817/***************************************************************
52555818
5256  Witch Card (German, WC3050, 27-4-94)
5819  Casino Poker
5820  1987, PM / Beck Elektronik
52575821
5258  TV GAME ELEKTRONIK 1994
5259         PROMA
5260   CASINOVERSION WC3050
5822  1x Xtal 10.000 MHz.
5823  1x UM6502A
5824  2x UM6521A
5825  1x UM6845
52615826
5262****************************************
5827  GFX ROMS 051, 052, 053 and 054 have duplicated halves.
52635828
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%
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.
52845832
5285***************************************/
5286ROM_START( witchcdi )
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 )
52875841   ROM_REGION( 0x10000, "maincpu", 0 )
5288   ROM_LOAD( "04.a12", 0x0000, 0x8000, CRC(0f662e02) SHA1(71d7344f63c11082beb4fb4eeb20b04780a9b14c) )
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) )
52895846
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 */
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 */
52935851
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 */
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 */
52985859
5299   ROM_REGION( 0x0100, "proms", 0 )
5300   ROM_LOAD( "27s21.d7",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
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 */
53015865ROM_END
53025866
5303/******************************************
5867/****************************************************
53045868
5305  Witch Game (Video Klein)
5869  Unknown poker game, set 1.
5870  198?.
53065871
5307  Another evil hardware from Video Klein
5308  with CPU box. Marked "12T1"
5872  There are French strings related to the game into
5873  the program ROM.
53095874
5310******************************************/
5311ROM_START( witchgme )
5312   ROM_REGION( 0x10000, "maincpu", 0 ) /* Video Klein */
5313   ROM_LOAD( "hn58c256p.box12t1",  0x0000, 0x8000, CRC(26c334cb) SHA1(d8368835c88668f09560f6096148a6e528806f65) )
5875  The dump lacks of 1 program ROM located at 17a.
5876  (empty socket in the PCB picture)
53145877
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 */
5878*****************************************************/
53215879
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 */
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 )
53255884
5326   ROM_REGION( 0x0100, "proms", 0 )
5327   ROM_LOAD( "n82s137f.box",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
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) */
53285888
5329   ROM_REGION( 0x0100, "proms2", 0 )
5330   ROM_LOAD( "tbp24s10n.2c",   0x0000, 0x0100, CRC(7c2aa098) SHA1(539ff9239b1b553b3883c9f0223aafcf217f9fc7) )
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) )
53315896ROM_END
53325897
5333/*  Witch Game (Video Klein)
5334    Video Klein original with epoxy block module.
5335    Alt set....
5336*/
5337   ROM_START( witchcdk )
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 )
53385912   ROM_REGION( 0x10000, "maincpu", 0 )
5339   ROM_LOAD( "wc_epoxy.bin",   0x0000, 0x8000, CRC(33f1acd9) SHA1(2facb3d807b5b2a2978e567d0c1106c0a027621a) )  /* epoxy block program ROM */
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) )
53405916
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 */
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) */
53455920
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 */
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 */
53505926
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 */
5927   ROM_REGION( 0x0100, "proms", 0 )
5928   ROM_LOAD( "tbp24s10.9c",    0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
53545929ROM_END
53555930
53565931
r250222r250223
54576032
54586033/****************************************************
54596034
5460  Wild Witch sets...
6035  Wild Witch (Video Klein)
54616036
54626037  Another evil hardware from Video Klein
54636038  with CPU box.
r250222r250223
76788253
76798254/************************************************
76808255
7681  Witch Up & Down sets...
8256  Witch Up & Down
76828257  (1988, Video Klein)
76838258
76848259  16 gfx banks!!!.
r250222r250223
83488923
83498924/*********************************************
83508925
8351   Witch Jack sets...
8926   Witch Jack
83528927   1992-1996 Video Klein
83538928
83548929*********************************************/
r250222r250223
84469021ROM_END
84479022
84489023
8449ROM_START( wtchjacka )  /* Witch Jack 0.87-88 / 1996-10-02, GFX OK */
9024ROM_START( wtchjacka )  /* Witch Jackpot 0.25 / 1994-11-24 */
84509025   ROM_REGION( 0x10000, "maincpu", 0 )
8451   ROM_LOAD( "wj5x5088.bin",   0x8000, 0x8000, CRC(08143537) SHA1(ef16531bcf955daded1be406dd3f61f37070298c) )
9026   ROM_LOAD( "wj5x5015.bin",   0x8000, 0x8000, CRC(bc0e6b78) SHA1(29482035f6122385447009abd695ed52fc669158) )
84529027
84539028   ROM_REGION( 0x18000, "temp", 0 )
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) )
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) )
84579032
84589033   ROM_REGION( 0x1800, "gfx0", 0 )
84599034   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250222r250223
85399114ROM_END
85409115
85419116
8542ROM_START( wtchjackb )  /* Witch Jack 0.87 / 1996-07-16, GFX OK */
9117ROM_START( wtchjackb )  /* Witch Jack 0.40 / 1995-02-27 */
85439118   ROM_REGION( 0x10000, "maincpu", 0 )
8544   ROM_LOAD( "wj5x5087.bin",   0x8000, 0x8000, CRC(b027d8a5) SHA1(f06b92cc7aacadca1b8c98bda19efa670596891c) )
9119   ROM_LOAD( "wj5x5040.bin",   0x8000, 0x8000, CRC(2f0f1d7a) SHA1(048d0641a4e03a77f4964898ad2c224cb487aa36) )
85459120
85469121   ROM_REGION( 0x18000, "temp", 0 )
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) )
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) )
85509125
85519126   ROM_REGION( 0x1800, "gfx0", 0 )
85529127   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250222r250223
86329207ROM_END
86339208
86349209
8635ROM_START( wtchjackc )  /* Witch Jack 0.70S / 1996-03-26 */
9210ROM_START( wtchjackc )  /* Witch Jack 0.40T / 1995-02-27, Not Working */
86369211   ROM_REGION( 0x10000, "maincpu", 0 )
8637   ROM_LOAD( "wj5x570s.bin",   0x8000, 0x8000, CRC(294e3ac6) SHA1(e58c38ae341dcb48572f8852ec858ef8433c6f95) )
9212   ROM_LOAD( "wj5x5t40.bin",   0x8000, 0x8000, CRC(a3a4f1d3) SHA1(16dcaf880134f10152703cb3ca81dfcbe48bff8b) )
86389213
86399214   ROM_REGION( 0x18000, "temp", 0 )
86409215   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250222r250223
87259300ROM_END
87269301
87279302
8728ROM_START( wtchjackd )  /* Witch Jack 0.70P / 1996-03-26 */
9303ROM_START( wtchjackd )  /* Witch Jack 0.62 / 1995-08-02 */
87299304   ROM_REGION( 0x10000, "maincpu", 0 )
8730   ROM_LOAD( "wj5x570p.bin",   0x8000, 0x8000, CRC(d77d8119) SHA1(c8999e3c55257750f27f1683f5b416e8e4e4297d) )
9305   ROM_LOAD( "wj5x563.bin",    0x8000, 0x8000, CRC(55e74382) SHA1(af0a890c55db36e8a2f847ea103858cc7b7115be) )  //
87319306
87329307   ROM_REGION( 0x18000, "temp", 0 )
87339308   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250222r250223
88189393ROM_END
88199394
88209395
8821ROM_START( wtchjacke )  /* Witch Jack 0.65 / 1995-10-19 */
9396ROM_START( wtchjacke )  /* Witch Jack 0.64 / 1995-09-13 */
88229397   ROM_REGION( 0x10000, "maincpu", 0 )
8823   ROM_LOAD( "wj5x565p.bin",   0x8000, 0x8000, CRC(20c23876) SHA1(ca2309766a68ba280d71b3b62e00d38d70b8536a) )
9398   ROM_LOAD( "wj5x564p.bin",   0x8000, 0x8000, CRC(7ee61b69) SHA1(313b750a7949f4d08cdf79c068d01ed91fc66dce) )
88249399
88259400   ROM_REGION( 0x18000, "temp", 0 )
88269401   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250222r250223
89119486ROM_END
89129487
89139488
8914ROM_START( wtchjackf )  /* Witch Jack 0.64 / 1995-09-13 */
9489ROM_START( wtchjackf )  /* Witch Jack 0.65 / 1995-10-19 */
89159490   ROM_REGION( 0x10000, "maincpu", 0 )
8916   ROM_LOAD( "wj5x564p.bin",   0x8000, 0x8000, CRC(7ee61b69) SHA1(313b750a7949f4d08cdf79c068d01ed91fc66dce) )
9491   ROM_LOAD( "wj5x565p.bin",   0x8000, 0x8000, CRC(20c23876) SHA1(ca2309766a68ba280d71b3b62e00d38d70b8536a) )
89179492
89189493   ROM_REGION( 0x18000, "temp", 0 )
89199494   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250222r250223
90049579ROM_END
90059580
90069581
9007ROM_START( wtchjackg )  /* Witch Jack 0.62 / 1995-08-02 */
9582ROM_START( wtchjackg )  /* Witch Jack 0.70S / 1996-03-26 */
90089583   ROM_REGION( 0x10000, "maincpu", 0 )
9009   ROM_LOAD( "wj5x563.bin",    0x8000, 0x8000, CRC(55e74382) SHA1(af0a890c55db36e8a2f847ea103858cc7b7115be) )  //
9584   ROM_LOAD( "wj5x570s.bin",   0x8000, 0x8000, CRC(294e3ac6) SHA1(e58c38ae341dcb48572f8852ec858ef8433c6f95) )
90109585
90119586   ROM_REGION( 0x18000, "temp", 0 )
90129587   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250222r250223
90979672ROM_END
90989673
90999674
9100ROM_START( wtchjackh )  /* Witch Jack 0.40T / 1995-02-27, Not Working */
9675ROM_START( wtchjackh )  /* Witch Jack 0.70P / 1996-03-26 */
91019676   ROM_REGION( 0x10000, "maincpu", 0 )
9102   ROM_LOAD( "wj5x5t40.bin",   0x8000, 0x8000, CRC(a3a4f1d3) SHA1(16dcaf880134f10152703cb3ca81dfcbe48bff8b) )
9677   ROM_LOAD( "wj5x570p.bin",   0x8000, 0x8000, CRC(d77d8119) SHA1(c8999e3c55257750f27f1683f5b416e8e4e4297d) )
91039678
91049679   ROM_REGION( 0x18000, "temp", 0 )
91059680   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250222r250223
91909765ROM_END
91919766
91929767
9193ROM_START( wtchjacki )  /* Witch Jack 0.40 / 1995-02-27 */
9768ROM_START( wtchjacki )  /* Witch Jack 0.87 / 1996-07-16, GFX OK */
91949769   ROM_REGION( 0x10000, "maincpu", 0 )
9195   ROM_LOAD( "wj5x5040.bin",   0x8000, 0x8000, CRC(2f0f1d7a) SHA1(048d0641a4e03a77f4964898ad2c224cb487aa36) )
9770   ROM_LOAD( "wj5x5087.bin",   0x8000, 0x8000, CRC(b027d8a5) SHA1(f06b92cc7aacadca1b8c98bda19efa670596891c) )
91969771
91979772   ROM_REGION( 0x18000, "temp", 0 )
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) )
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) )
92019776
92029777   ROM_REGION( 0x1800, "gfx0", 0 )
92039778   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250222r250223
92839858ROM_END
92849859
92859860
9286ROM_START( wtchjackj )  /* Witch Jackpot 0.25 / 1994-11-24 */
9861ROM_START( wtchjackj )  /* Witch Jack 0.87-88 / 1996-10-02, GFX OK */
92879862   ROM_REGION( 0x10000, "maincpu", 0 )
9288   ROM_LOAD( "wj5x5015.bin",   0x8000, 0x8000, CRC(bc0e6b78) SHA1(29482035f6122385447009abd695ed52fc669158) )
9863   ROM_LOAD( "wj5x5088.bin",   0x8000, 0x8000, CRC(08143537) SHA1(ef16531bcf955daded1be406dd3f61f37070298c) )
92899864
92909865   ROM_REGION( 0x18000, "temp", 0 )
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) )
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) )
92949869
92959870   ROM_REGION( 0x1800, "gfx0", 0 )
92969871   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250222r250223
93769951ROM_END
93779952
93789953
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
96019954/*
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) )
96109955
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
99789956  Bonne Chance!
99799957  This PCB came with PIAs 6821 for IO
99809958
r250222r250223
99889966            5f63
99899967
99909968*/
9969
99919970ROM_START( bchancep )   /* Bonne Chance! with PIAs 6821 */
99929971   ROM_REGION( 0x3000, "gfx", 0 )
99939972   ROM_LOAD( "84.bin",  0x0000, 0x1000, CRC(31f8104e) SHA1(b99f79019517ca90c48e9f303f41256d68faea91) )     /* cards deck gfx bitplane 3, identical halves */
r250222r250223
1004410023  in banks of 0x4000 each.
1004510024
1004610025*/
10026
1004710027ROM_START( pokermon )
1004810028   ROM_REGION( 0x10000, "maincpu", 0 ) /* 2 programs, selectable via DIP switch */
1004910029   ROM_LOAD( "mbv_bi.bin",      0x0000, 0x8000, CRC(da00e08a) SHA1(98e52915178e29ab3ae674e6b895da14626d3dd8) )
r250222r250223
1008810068   ROM_LOAD( "n82s129n.bin",  0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
1008910069ROM_END
1009010070
10071
1009110072/*
1009210073  Super 98',
1009310074  running in the ICP-1 boardset.
r250222r250223
1009510076  Please read the 'Games Notes' section
1009610077  for game and debug notes / issues...
1009710078*/
10079
1009810080ROM_START( super98 )
1009910081   ROM_REGION( 0x10000, "maincpu", 0 )
1010010082   ROM_LOAD( "27c256.17a",   0x0000, 0x8000, CRC(dfa319c5) SHA1(e1b2ef40350ee1f40272604cbe33b245210de003) )
r250222r250223
1041410396
1041510397  And repeat for every 0x100 segments...
1041610398
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 
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
1042110441***********************************************/
1042210442
1042310443DRIVER_INIT_MEMBER(goldnpkr_state, icp1db)
1042410444{
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*/
10445   /* nothing yet... */
1045310446}
1045410447
1045510448/**********************************************
r250222r250223
1054110534GAMEL( 198?, potnpkre,  pottnpkr, pottnpkr, pottnpkr, driver_device,  0,        ROT0,   "bootleg",                  "Jack Potten's Poker (set 6)",             0,                layout_goldnpkr )
1054210535GAMEL( 198?, potnpkrf,  pottnpkr, goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "bootleg",                  "Jack Potten's Poker (set 7, Royale GFX)", 0,                layout_goldnpkr )
1054310536GAMEL( 198?, potnpkrg,  pottnpkr, pottnpkr, potnpkra, driver_device,  0,        ROT0,   "bootleg",                  "Jack Potten's Poker (set 8, Australian)", 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 )
10537GAMEL( 198?, superdbl,  pottnpkr, goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "Karateco",                 "Super Double (French)",                   0,                layout_goldnpkr )
1054510538GAMEL( 198?, ngold,     pottnpkr, pottnpkr, ngold,    driver_device,  0,        ROT0,   "<unknown>",                "Jack Potten's Poker (NGold, set 1)",      0,                layout_goldnpkr )
1054610539GAMEL( 198?, ngolda,    pottnpkr, pottnpkr, ngold,    driver_device,  0,        ROT0,   "<unknown>",                "Jack Potten's Poker (NGold, set 2)",      0,                layout_goldnpkr )
1054710540GAMEL( 198?, ngoldb,    pottnpkr, pottnpkr, ngoldb,   driver_device,  0,        ROT0,   "<unknown>",                "Jack Potten's Poker (NGold, set 3)",      0,                layout_goldnpkr )
1054810541
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
1054910603GAMEL( 1990, bsuerte,   0,        witchcrd, bsuerte,  driver_device,  0,        ROT0,   "<unknown>",                "Buena Suerte (Spanish, set 1)",           0,                layout_goldnpkr )
1055010604GAMEL( 1991, bsuertea,  bsuerte,  witchcrd, bsuerte,  driver_device,  0,        ROT0,   "<unknown>",                "Buena Suerte (Spanish, set 2)",           0,                layout_goldnpkr )
1055110605GAMEL( 1991, bsuerteb,  bsuerte,  witchcrd, bsuerte,  driver_device,  0,        ROT0,   "<unknown>",                "Buena Suerte (Spanish, set 3)",           0,                layout_goldnpkr )
r250222r250223
1057510629GAMEL( 1990, falcnwldb, falcnwld, wildcard, wildcard, driver_device,  0,        ROT0,   "Video Klein",              "Falcons Wild - World Wide Poker (Video Klein, set 2)", 0,   layout_goldnpkr )
1057610630GAME(  1983, falcnwldc, falcnwld, wildcrdb, wildcard, goldnpkr_state, flcnw,    ROT0,   "Falcon",                   "Falcons Wild - World Wide Poker (Falcon original)",    MACHINE_NOT_WORKING )
1057710631
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
1063910632/*************************************** OTHER SETS ***************************************/
1064010633
1064110634/*     YEAR  NAME       PARENT    MACHINE   INPUT     STATE           INIT      ROT      COMPANY                     FULLNAME                                  FLAGS             LAYOUT  */
r250222r250223
1065610649GAMEL( 1983, silverga,  0,        goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "<unknown>",                "Silver Game",                             0,                layout_goldnpkr )
1065710650GAME(  1987, caspoker,  0,        goldnpkr, caspoker, driver_device,  0,        ROT0,   "PM / Beck Elektronik",     "Casino Poker (Ver PM86LO-35-5, German)",  MACHINE_IMPERFECT_COLORS )
1065810651
10659GAMEL( 198?, superdbl,  pottnpkr, goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "Karateco",                 "Super Double (French)",                   0,                layout_goldnpkr )
1066010652GAME(  198?, pokerdub,  0,        pottnpkr, goldnpkr, driver_device,  0,        ROT0,   "<unknown>",                "unknown French poker game",               MACHINE_NOT_WORKING )   // lacks of 2nd program ROM.
1066110653GAME(  198?, pokerduc,  0,        goldnpkr, goldnpkr, goldnpkr_state, icp1db,   ROT0,   "<unknown>",                "unknown encrypted poker game",            MACHINE_NOT_WORKING )   // encrypted.
1066210654
trunk/src/mame/drivers/goldstar.cpp
r250222r250223
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, "Unknown" )                   PORT_DIPLOCATION("DSW1:!1")     /* not checked */
6239   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )  PORT_DIPLOCATION("DSW1:!1")  /* OK */
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")     /* not checked */
6242   PORT_DIPNAME( 0x02, 0x02, "Hopper Out Switch" ) PORT_DIPLOCATION("DSW1:!2")  /* OK */
62436243   PORT_DIPSETTING(    0x02, "Active Low" )
62446244   PORT_DIPSETTING(    0x00, "Active High" )
6245   PORT_DIPNAME( 0x04, 0x04, "Payout Mode" )               PORT_DIPLOCATION("DSW1:!3")     /* not checked */
6245   PORT_DIPNAME( 0x04, 0x04, "Payout Mode" )       PORT_DIPLOCATION("DSW1:!3")  /* OK */
62466246   PORT_DIPSETTING(    0x04, "Payout Switch" )
62476247   PORT_DIPSETTING(    0x00, "Automatic" )
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 */
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 */
62526252   PORT_DIPSETTING(    0x00, "80%" )
62536253   PORT_DIPSETTING(    0x10, "90%" )
6254   PORT_DIPNAME( 0x20, 0x00, "Double Up Game" )            PORT_DIPLOCATION("DSW1:!6")     /* OK */
6254   PORT_DIPNAME( 0x20, 0x00, "W-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%" )
r250222r250223
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")      /* not checked */
6273   PORT_DIPNAME( 0x18, 0x00, "Hopper Limit" )          PORT_DIPLOCATION("DSW2:!4,!5")    /* OK */
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
r250222r250223
63186318   PORT_INCLUDE( cmv4_dsw4 )   /* Display Of Payout Limit not working; all others OK */
63196319
63206320   PORT_INCLUDE( cmv4_dsw5 )
6321   PORT_MODIFY("DSW5")
63226321   /* Display of Doll On Demo only affects payout table screen */
63236322   /* Coin In Limit OK */
6324   /* Condition For 3 Kind Of Bonus OK */
6323   /* Condition For 3 Kind Of Bonus not checked */
63256324   /* Display Of Doll At All Fr. Bonus not checked */
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 ) )
6325   /* DSW5-7 listed as unused */
63296326   /* Test Mode For Disp. Of Doll not working */
63306327INPUT_PORTS_END
63316328
trunk/src/mame/drivers/gstream.cpp
r250222r250223
346346
347347*/
348348
349   m_oki_bank_1 = ((BIT(data, 6) & ~BIT(data, 7)) << 1) | (BIT(data, 2) & BIT(data, 3));
350   m_oki_bank_2 = ((BIT(data, 4) & ~BIT(data, 5)) << 1) | (BIT(data, 0) & BIT(data, 1));
349   m_oki_bank_1 = ((BIT(data, 6) & !BIT(data, 7)) << 1) | (BIT(data, 2) & BIT(data, 3));
350   m_oki_bank_2 = ((BIT(data, 4) & !BIT(data, 5)) << 1) | (BIT(data, 0) & BIT(data, 1));
351351
352352   //popmessage("oki bank = %X\noki_1 = %X\noki_2 = %X\n",data, m_oki_bank_1, m_oki_bank_2);
353353
trunk/src/mame/drivers/inder.cpp
r250222r250223
12721272
12731273READ8_MEMBER( inder_state::ppic_r )
12741274{
1275   return (m_pc0 ? 1 : 0) | m_portc;
1275   return m_pc0 | m_portc;
12761276}
12771277
12781278WRITE8_MEMBER( inder_state::ppia_w )
trunk/src/mame/drivers/jchan.cpp
r250222r250223
5353lev 4 : 0x70 : 0000 10d0 - comm. with main68k, triggered when main writes cmd @ $403ffe
5454
5555***********************************************************************************************
56 PCB info
57***********************************************************************************************
5658
59
5760Jackie Chan Kung Fu Master
5861Jackie Chan Fist Of Fire
5962Kaneko, 1995
6063
61Both games run on the same PCB, only the EPROMs, maskROMs and EEPROM data are changed.
64Both games run on the same PCB, only the EPROMs are swapped.
6265
6366PCB Layout
6467----------
6568
6669JC-BOARD
67JC01X00047
6870|--------------------------------------------------------------------|
69|TA8210 J2M1X1.U56   JC-300-00.U84  LC3564 LC3564      JC-106-00.U171|
70|  VOL    YMZ280B    JC-301-00.U85  LC3564 LC3564                    |
71|     C4741           J2P1X5.U86                       JC-107-00.U172|
72|        58257        J2P1X6.U87          CG24143                    |
73|        58257                                         42S4260       |
74|        68000        PLSI2032            LH5497                     |
75|                     28.6364MHz   42101  CG24173      42S4260       |
76|   2003                           42101                             |
77|                     BABY004              |-----|     JC-200-00.U177|
78|J MC-1091                         LC3564  |VIEW2|                   |
79|A     58257                       LC3564  |-CHIP|     JC-100-00.U179|
80|M     58257                               |-----|                   |
81|M                            LC3564       J2G1X1.U164 JC-101-00.U180|
82|A                            LC3564       J2G1X2.U165               |
83|     58257  J2P1X1.U67       42101                    JC-102-00.U181|
84|SW1  58257  J2P1X2.U68       42101            42S4260               |
85|58257       J2P1X3.U69  16MHz    33.3333MHz           JC-103-00.U182|
86|58257       J2P1X4.U70  PLSI2032                                    |
87|                                           CG24173    JC-104-00.U183|
71|  VOL  J2M1X1.U56   JC-300-00.U84                     JC-106-00.U171|
72|         YMZ280B    JC-301-00.U85  6264                             |
73|     CA741           J2P1X5.U86    6264               JC-107-00.U172|
74|        62256        J2P1X6.U87          CG24143                    |
75|        62256                                         42S4260       |
76|        68000        PLSI2032            6264                       |
77|                     28.6364MHz    6116  CG24173      42S4260       |
78|                                   6116                             |
79|                     BABY004             VIEW2-CHIP   JC-200-00.U177|
80|J                                   6264                            |
81|A     62256                         6264              JC-100-00.U179|
82|M     62256                               J2G1X1.U164               |
83|M                                                     JC-101-00.U180|
84|A                                         J2G1X2.U165               |
85|     62256  J2P1X1.U67             6264               JC-102-00.U181|
86|     62256  J2P1X2.U68             6264       42S4260               |
87|62256       J2P1X3.U69  16MHz    33.3333MHz           JC-103-00.U182|
88|62256       J2P1X4.U70  PLSI2032    6116                            |
89|                                    6116   CG24173    JC-104-00.U183|
8890|  J2D1X1.U13  68000                           42S4240               |
8991|        93C46                                         JC-105-00.U184|
90|   TBS0P01                  LC3564 LC3564     LH5497                |
91| SW2                        LC3564 LC3564  CG24143    JC-108-00.U185|
92|   TBS0P01                   6264  6264          6264               |
93| DSW1                        6264  6264    CG24143    JC-108-00.U185|
9294|--------------------------------------------------------------------|
95
9396Notes:
94          68000 - Clock 16.0MHz (both)
95        YMZ280B - Clock 16.0MHz
96        TBS0P01 - Clock 16.0MHz (NEC uPD78324 with 32k internal ROM & 1k RAM)
97         LC3564 - Sanyo LC3564SM-85 8k x8 SRAM
98        42S4260 - NEC 42S4260-70 256k x16 DRAM
99          42101 - NEC D42101C-3 910-word x8-bit Line Buffer for Flicker-Free NTSC picture
100         LH5497 - SHARP LH5497D-20 CMOS 1kx9 FIFO
101          58257 - SONY CXK58257ASP-10L 8kx8 SRAM
102            SW1 - Test or reset switch, not populated
103            SW2 - 8-position DIP Switch
104          C4741 - NEC uPC4741 High Performance Quad Operational Amplifier
105          93C46 - AMTEL AT93C46 EEPROM
106       PLSI2032 - LATTICE pLSI 2032-80LJ (x2, PLCC44, labeled JCOP099 & JCOP100)
107     VIEW2-CHIP - KANEKO VIEW2-CHIP 1633F1208
108        BABY004 - KANEKO BABY004 9511EX009 VT-171
97    68000 clock - 16.0MHz (both)
98  YMZ280B clock - 16.0MHz
99  TBS0P01 clock - 16.0MHz (NEC uPD78324 with 32K internal ROM & 1024 byte RAM)
100          62256 - 32k x8 SRAM
101           6264 - 8k x8 SRAM
102           6116 - 2k x8 SRAM
103        42S4260 - 256k x16 DRAM
109104CG24143/CG24173 - Fujitsu custom graphics generators
110        MC-1091 - Custom I/O ceramic module
111         TA8210 - Toshiba TA8210AF 20W BTL 2 Channel Audio Power Amplifier
112           2003 - NEC uPA2003 Darlington Transistor Array
113          VSync - 59.6010Hz
114          HSync - 15.55610kHz
105       pLSI2032 - Lattice CPLD
106          CA741 - Intersil High Gain Operational Amplifier
107          VSync - 60Hz
108          HSync - 15.56kHz
115109
116Eproms:
110Kung Fu Master - Jackie Chan (C) Kaneko 1995
111
112KANEKO PCB NUMBER: JC01X00047
113
114CPU: TMP68HC000N-16 x 2
115SND: YAMAHA YMZ280B
116OSC: 16.0000MHZ, 33.3333MHZ, 28.6364MHZ
117DIPS:1 DIP LABELLED SW2, 8 POSITION
118     Location for SW1 on PCB, but empty.
119
120Eproms
121
117122Location    Rom Type    PCB Label
118---------------------------------
119123U164        27C2001     SPA-7A
120124U165        27C2001     SPA-7B
121not populated (U158)    SPB-4A
122not populated (U159)    SPB-4B
123125U13         27C1001     27C1001A
124126U56         27C2001     23C8001E
125127U67         27C040      27C4001
r250222r250223
129131U86         27C040      27C4001
130132U87         27C040      27C4001
131133
132Mask ROMs:
133Rom Label                   Label on PCB    Location
134----------------------------------------------------
134There are 12 mask roms (42 pin) labelled....
135
136Rom Label           Label on PCB        Location
135137JC-100-00  9511 D           SPA-0           U179
136138JC-101-00  9511 D           SPA-1           U180
137139JC-102-00  9511 D           SPA-2           U181
r250222r250223
139141JC-104-00  T39 9510K7092    SPA-4           U183
140142JC-105-00  T40 9510K7094    SPA-5           U184
141143JC-108-00  T65 9517K7012    SPA-6           U185
142not populated               SPA-7           U186
143144JC-106-00  T41 9510K7091    SPB-0           U171
144145JC-107-00  T42 9510K7096    SPB-1           U172
145not populated               SPB-2           U173
146not populated               SPB-3           U174
147146JC-200-00  W10 9510K7055    BG-0            U177
148not populated               BG-1            U178
149147JC-300-00  T43 9510K7098    23C16000        U84
150148JC-301-00  W11 9510K7059    23C16000        U85
151149
152***********************************************************************************************
150SPB-2, SPB-3 and SPA-7 are labeled but unused on this PCB.
153151
152Other chips:
153  AMTEL AT93C46 (EEPROM)
154  LATTICE pLSI 2032-80LJ (x 2, square, socketed labeled JCOP099 & JCOP100)
155  FUJITSU CG24143 4181 9449 Z01 (x 2, square SMD)
156  FUJITSU CG24173 6186 9447 Z01 (x 2, square SMD)
157  KANEKO VIEW2-CHIP 1633F1208 (square, SMD)
158  KANEKO BABY004 9511EX009 VT-171 (square, SMD)
159  KANEKO TBS0P01 452 9430HK001 (square, SMD NEC uPD78324 aka "TOYBOX")
160
161Ram I can see...
162SONY CXK58257ASP-10L (x 8)
163NEC D42101C-3 (x 4)
164SHARP LH5497D-20 (x 2)
165SANYO LC3564SM-85 (x 12, SMD)
166NEC 42S4260-70 (x 4, SMD)
167
168there are 9 PALS on the pcb (not dumped)
169
154170*/
155171
156172#include "emu.h"
trunk/src/mame/drivers/model3.cpp
r250222r250223
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
670678void model3_state::update_irq_state()
671679{
672680   if ((m_irq_enable & m_irq_state) || m_scsi_irq_state)
r250222r250223
60516059GAME( 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 )
60526060GAME( 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 )
60536061GAME( 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/naomi.cpp
r250222r250223
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
15831591#define CPU_CLOCK (200000000)
15841592
15851593READ64_MEMBER(naomi_state::naomi_arm_r )
r250222r250223
94299437GAME( 2006, xtrmhnt2, awbios, aw2c, aw2c, naomi_state, xtrmhnt2,   ROT0,   "Sega",                     "Extreme Hunting 2", GAME_FLAGS )
94309438GAME( 2008, claychal, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0,   "Sega",                     "Sega Clay Challenge", GAME_FLAGS )
94319439GAME( 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/pc2000.cpp
r250222r250223
220220
221221SED1520_UPDATE_CB(gl3000s_screen_update_left)
222222{
223   UINT8 sec[5];
224   UINT8 points[2][5];
223   UINT8 sec[3];
224   UINT8 points[2][3];
225225   memset(sec, 0, sizeof(sec));
226226   memset(points, 0, sizeof(points));
227227
r250222r250223
229229      for (int x=59; x<85; x++)
230230      {
231231         UINT8 data = vram[(y*0x50 + x) % 0x140];
232         INT32 dpos = (x - 74) / 2;
233            if (dpos < 0)
234            {
235                dpos = 0;
236            }
232         int dpos = (x - 74) / 2;
237233
238234         for (int yi=0; yi<8; yi++)
239235         {
r250222r250223
268264         }
269265      }
270266
271   for(int i=0; i < 3; i++)
267   for(int i=0; i<3; i++)
272268   {
273269      output_set_indexed_value("TIME", i, sec[i]);
274270      output_set_indexed_value("P1", i, points[1][i]);
trunk/src/mame/drivers/pse.cpp
r250222r250223
77 Game Name                       DATA
88 -------------------------------------
99 1-2-4 Cocktail Table (197?)     UNKNOWN
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
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
1818 Play Five (1975?)               UNKNOWN
19 Scandia (cabinet) (1975/08)     NO
19 Scandia (cabinet) (1975)        NO
2020 Two Game (1974)                 UNKNOWN
21 U.N. Command (1977)             YES?
21 U.N. Command (1977)             UNKNOWN
2222
2323 ***************************************************************************/
2424
r250222r250223
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
r250222r250223
120120
121121 ***************************************************************************/
122122
123ROM_START( bazooka )
124   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
125123
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
147124ROM_START( dpatrol )
148125   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
149126
r250222r250223
191168ROM_END
192169*/
193170
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 )
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 )
trunk/src/mame/drivers/psikyo.cpp
r250222r250223
12421242ROM_END
12431243
12441244ROM_START( sngkace )
1245
12451246   ROM_REGION( 0x100000, "maincpu", 0 )        /* Main CPU Code */
12461247   ROM_LOAD32_WORD_SWAP( "1-u127.bin", 0x000000, 0x040000, CRC(6c45b2f8) SHA1(08473297e174f3a6d67043f3b16f4e6b9c68b826) ) // 1&0
12471248   ROM_LOAD32_WORD_SWAP( "2-u126.bin", 0x000002, 0x040000, CRC(845a6760) SHA1(3b8fed294e28d9d8ef5cb5ec88b9ade396146a48) ) // 3&2
r250222r250223
12611262
12621263   ROM_REGION( 0x040000, "spritelut", 0 )  /* Sprites LUT */
12631264   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
12871266ROM_END
12881267
12891268
r250222r250223
20131992
20141993***************************************************************************/
20151994
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?
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?
20191997
20201998GAME( 1994, gunbird,  0,        gunbird,  gunbird, psikyo_state,  gunbird,  ROT270, "Psikyo", "Gunbird (World)", MACHINE_SUPPORTS_SAVE )
20211999GAME( 1994, gunbirdk, gunbird,  gunbird,  gunbirdj, psikyo_state, gunbird,  ROT270, "Psikyo", "Gunbird (Korea)", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/psikyosh.cpp
r250222r250223
703703   PORT_START("INPUTS")
704704   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
705705   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 )
706   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNUSED )
707   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNUSED )
706
708707   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
709708   PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
710709   PORT_DIPNAME( 0x00000040, 0x00000040, "Tilt (Enables Debug Mode)" )     /* Debug stuff. Resets EEPROM? */
711710   PORT_DIPSETTING(          0x00000040, DEF_STR( Off ) )
712711   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
713   PORT_BIT( 0x00ffff80, IP_ACTIVE_LOW, IPT_UNUSED )
712
714713   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 )
717714   PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
718715   PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
719716   PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
trunk/src/mame/drivers/ptcsol.cpp
r250222r250223
654654            chr = m_p_videoram[x & 0x3ff];
655655
656656            // cursor
657            if (BIT(chr, 7) && cursor_inv)
657            if (BIT(chr, 7) & cursor_inv)
658658               inv ^= 0xff;
659659
660660            chr &= 0x7f;
trunk/src/mame/drivers/rabbit.cpp
r250222r250223
314314
315315      xflip = (source[0]&0x00008000)>>15;
316316      yflip = (source[0]&0x00004000)>>14;
317      colr = (source[1]&0x0ff00000)>>15;
317318
319
318320      tileno = (source[1]&0x0001ffff);
319321      colr =   (source[1]&0x0ff00000)>>20;
320322
trunk/src/mame/drivers/shadfrce.cpp
r250222r250223
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?
575574ROM_START( shadfrce )
576575   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
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
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) )
581580
582581   ROM_REGION( 0x10000, "audiocpu", 0 ) /* Z80 Code */
583582   ROM_LOAD( "32j10-0.42",  0x00000, 0x10000, CRC(65daf475) SHA1(7144332b2d17af8645e22e1926b33113db0d20e2) )
584583
585584   ROM_REGION( 0x020000, "chars", 0 ) /* Chars */
586   ROM_LOAD( "32j11-0.55",  0x00000, 0x20000, CRC(7252d993) SHA1(43f7de381841039aa290486aafb98e2cf3b8579b) )
585   ROM_LOAD( "32a11-0.55",  0x00000, 0x20000, CRC(cfaf5e77) SHA1(eab76e085f695c74cc868aaf95f04ff2acf66ee9) )
587586
588587   ROM_REGION( 0xa00000, "sprites", 0 ) /* Sprite Tiles */
589588   ROM_LOAD( "32j4-0.12",  0x000000, 0x200000, CRC(1ebea5b6) SHA1(35bd49dda9ad75326d45ffb10c87d83fc4f1b7a8) )
r250222r250223
601600   ROM_LOAD( "32j9-0.76",  0x000000, 0x080000, CRC(16001e81) SHA1(67928d2024f963aee91f1498b6f4c76101d2f3b8) )
602601ROM_END
603602
604ROM_START( shadfrceu )
603ROM_START( shadfrcej )
605604   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
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) )
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) )
610609
611610   ROM_REGION( 0x10000, "audiocpu", 0 ) /* Z80 Code */
612611   ROM_LOAD( "32j10-0.42",  0x00000, 0x10000, CRC(65daf475) SHA1(7144332b2d17af8645e22e1926b33113db0d20e2) )
613612
614613   ROM_REGION( 0x020000, "chars", 0 ) /* Chars */
615   ROM_LOAD( "32a11-0.55",  0x00000, 0x20000, CRC(cfaf5e77) SHA1(eab76e085f695c74cc868aaf95f04ff2acf66ee9) )
614   ROM_LOAD( "32j11-0.55",  0x00000, 0x20000, CRC(7252d993) SHA1(43f7de381841039aa290486aafb98e2cf3b8579b) )
616615
617616   ROM_REGION( 0xa00000, "sprites", 0 ) /* Sprite Tiles */
618617   ROM_LOAD( "32j4-0.12",  0x000000, 0x200000, CRC(1ebea5b6) SHA1(35bd49dda9ad75326d45ffb10c87d83fc4f1b7a8) )
r250222r250223
630629   ROM_LOAD( "32j9-0.76",  0x000000, 0x080000, CRC(16001e81) SHA1(67928d2024f963aee91f1498b6f4c76101d2f3b8) )
631630ROM_END
632631
633ROM_START( shadfrcej )
632ROM_START( shadfrcejv2 )
634633   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
635634   ROM_LOAD16_BYTE( "32j12-01.34", 0x00001, 0x40000, CRC(38fdbe1d) SHA1(476d8ef2c0d2a8c568ce44631f93f8c730f91b08) ) /* Japan Version 2 */
636635   ROM_LOAD16_BYTE( "32j13-01.26", 0x00000, 0x40000, CRC(6e1df6f1) SHA1(c165553fe967b437413dd7ddc87a267548dd0ca9) )
r250222r250223
660659ROM_END
661660
662661
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 )
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 )
trunk/src/mame/drivers/spinb.cpp
r250222r250223
472472
473473READ8_MEMBER( spinb_state::ppia_c_r )
474474{
475   return (m_pc0a ? 1 : 0) | m_portc_a;
475   return m_pc0a | m_portc_a;
476476}
477477
478478READ8_MEMBER( spinb_state::ppim_c_r )
479479{
480   return (m_pc0m ? 1 : 0) | m_portc_m;
480   return m_pc0m | m_portc_m;
481481}
482482
483483WRITE8_MEMBER( spinb_state::ppia_b_w )
trunk/src/mame/drivers/ssem.cpp
r250222r250223
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
1421class ssem_state : public driver_device
1522{
1623public:
r250222r250223
642649
643650/*   YEAR  NAME     PARENT    COMPAT   MACHINE  INPUT  INIT        COMPANY                       FULLNAME */
644651COMP(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/st_mp200.cpp
r250222r250223
438438
439439   if (!m_u10_ca2)
440440   {
441      if (m_7d && BIT(data, 1))
442        {
443            m_digit = 6;
444        }
445      else if BIT(data, 2)
446        {
441      if (m_7d & BIT(data, 1))
442         m_digit = 6;
443      else
444      if BIT(data, 2)
447445         m_digit = 5;
448        }
449      else if BIT(data, 3)
450        {
446      else
447      if BIT(data, 3)
451448         m_digit = 4;
452        }
453      else if BIT(data, 4)
454        {
449      else
450      if BIT(data, 4)
455451         m_digit = 3;
456        }
457      else if BIT(data, 5)
458        {
452      else
453      if BIT(data, 5)
459454         m_digit = 2;
460        }
461      else if BIT(data, 6)
462        {
455      else
456      if BIT(data, 6)
463457         m_digit = 1;
464        }
465      else if BIT(data, 7)
466        {
458      else
459      if BIT(data, 7)
467460         m_digit = 0;
468        }
469461
470462      if (BIT(data, 0) && (m_counter > 8))
471463      {
trunk/src/mame/drivers/taitottl.cpp
r250222r250223
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
198225/*
199226
200227 Missile-X
r250222r250223
252279
253280
254281GAME( 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 )
255284GAME( 1977, missilex,  0,       taitottl, 0, driver_device,  0, ROT0, "Taito", "Missile-X [TTL]", MACHINE_IS_SKELETON )
256285GAME( 1977, ttblock,   0,       taitottl, 0, driver_device,  0, ROT0, "Taito", "T.T. Block [TTL]", MACHINE_IS_SKELETON )
257286GAME( 1979, zzblock,   0,       taitottl, 0, driver_device,  0, ROT0, "Taito", "Zun Zun Block [TTL]", MACHINE_IS_SKELETON )
trunk/src/mame/drivers/vboy.cpp
r250222r250223
627627//              attotime new_time = machine().time();
628628
629629//              if((new_time - m_input_latch_time) < m_maincpu->cycles_to_attotime(640))
630//                  value |= machine().rand() & 2;
630               value |= machine().rand() & 2;
631631
632632            value = m_vboy_regs.kcr | 0x4c;
633633         }
trunk/src/mame/includes/amstrad.h
r250222r250223
3131#include "bus/cpc/hd20.h"
3232#include "bus/cpc/magicsound.h"
3333#include "bus/cpc/doubler.h"
34#include "bus/cpc/transtape.h"
3534#include "machine/ram.h"
3635#include "imagedev/cassette.h"
3736#include "bus/centronics/ctronics.h"
trunk/src/mame/includes/fidelz80.h
r250222r250223
22// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco
33/***************************************************************************
44
5    Fidelity Electronics Z80 based board driver
5        fidelz80.h
66
77****************************************************************************/
88
r250222r250223
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;
r250222r250223
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
4143   //model VCC/UVC
4244   void update_display();
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);
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 );
4951
5052   //model 7014 and VBC
51   DECLARE_WRITE8_MEMBER(bridgec_speech_w);
53   DECLARE_WRITE8_MEMBER(bridgec_speech_w );
5254   DECLARE_WRITE8_MEMBER(kp_matrix_w);
5355   DECLARE_READ8_MEMBER(unknown_r);
5456   DECLARE_READ8_MEMBER(unknown2_r);
r250222r250223
7173   TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer);
7274
7375   DECLARE_WRITE8_MEMBER(digit_w);
74
75   virtual void machine_start();
7676};
7777
7878
trunk/src/mame/includes/shadfrce.h
r250222r250223
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 );
86   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offset );
8787};
trunk/src/mame/layout/cmpacman.lay
r250222r250223
4747         <color red="1.0" green="0.5" blue="0.0" />
4848      </rect>
4949      <rect state="0">
50         <color red="0.5" green="0.25" blue="0.0" />
50         <color red="0.15" green="0.075" blue="0.0" />
5151      </rect>
5252      <text string="TAKE">
5353         <color red="0.0" green="0.0" blue="0.0" />
r250222r250223
134134         <color red="0.7" green="0.35" blue="0.0" />
135135      </rect>
136136      <rect state="0">
137         <color red="0.4" green="0.2" blue="0.0" />
137         <color red="0.1" green="0.05" blue="0.0" />
138138      </rect>
139139   </element>
140140
trunk/src/mame/machine/c65_old.cpp
r0r250223
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
r250222r250223
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
1724#define DEBUG_REGISTERS (1)
1825
1926#if DEBUG_REGISTERS
r250222r250223
722729{
723730   m_powervr2->pvr_scanline_timer(param);
724731}
732#if (defined(__MINGW32__) && (__GNUC__ >= 5))
733#pragma GCC diagnostic pop
734#endif
trunk/src/mame/machine/deco146.cpp
r250222r250223
14491449
14501450   m_current_rambank = 0;
14511451
1452   m_nand = 0x0000;
1453   m_xor = 0x0000;
14521454   m_soundlatch = 0x0000;
14531455
14541456   m_latchaddr = 0xffff;
r250222r250223
14581460   m_xor=0;
14591461//  m_nand=0xffff;
14601462   m_nand=0x0; // wizard fire doesn't initialize it, but accesses addresses rohga needs the mask applied on
1463
1464
1465
14611466}
14621467
14631468
trunk/src/mame/machine/namcos2.cpp
r250222r250223
674674INTERRUPT_GEN_MEMBER(namcos2_shared_state::namcos2_68k_gpu_vblank)
675675{
676676   /* only used by namcos21 */
677   //int scanline = get_posirq_scanline();
678   INT32 scanline = 0x50+0x89; /* HACK for Winning Run */
677   int scanline = get_posirq_scanline();
678   scanline = 0x50+0x89; /* HACK for Winning Run */
679679
680680   //printf( "namcos2_68k_gpu_vblank(%d)\n",m_68k_gpu_C148[NAMCOS2_C148_POSIRQ] );
681681   adjust_posirq_timer(scanline);
trunk/src/mame/machine/pgmprot_igs027a_type1.cpp
r250222r250223
18461846{
18471847   if (stage==-1)
18481848   {
1849      tableoffs = 0;
1850      tableoffs2 = 0;
18491851      entries_left = 0;
18501852      currentcolumn = 0;
18511853      currentrow = 0;
r250222r250223
21122114   hackcount2 = 0;
21132115   hack_47_value = 0;
21142116   hack_31_table_offset = 0;
2117   hack_31_table_offset = 0;
21152118
21162119//#define PUZZLI2_LEVEL_STRUCTURE_LOG
21172120#ifdef PUZZLI2_LEVEL_STRUCTURE_LOG
trunk/src/mame/machine/sorcerer.cpp
r250222r250223
188188      bool sound = BIT(m_iop_config->read(), 3);
189189
190190      m_cassette1->change_state(
191         (BIT(data,4) && sound) ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED, CASSETTE_MASK_SPEAKER);
191         (BIT(data,4) & sound) ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED, CASSETTE_MASK_SPEAKER);
192192
193193      m_cassette2->change_state(
194         (BIT(data,5) && sound) ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED, CASSETTE_MASK_SPEAKER);
194         (BIT(data,5) & sound) ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED, CASSETTE_MASK_SPEAKER);
195195
196196      /* cassette 1 motor */
197197      m_cassette1->change_state(
trunk/src/mame/machine/xbox.cpp
r250222r250223
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
1926#define LOG_PCI
2027//#define LOG_OHCI
2128//#define USB_ENABLED
r250222r250223
15291536   MCFG_SCREEN_UPDATE_DRIVER(xbox_base_state, screen_update_callback)
15301537   MCFG_SCREEN_VBLANK_DRIVER(xbox_base_state, vblank_callback)
15311538MACHINE_CONFIG_END
1539
1540#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1541#pragma GCC diagnostic pop
1542#endif
trunk/src/mame/video/aerofgt.cpp
r250222r250223
463463
464464      pri = m_spriteram3[attr_start + 2] & 0x0010;
465465
466      if ( chip_disabled_pri && !pri)
466      if ( chip_disabled_pri & !pri)
467467         continue;
468      if ((!chip_disabled_pri) && (pri >> 4))
468      if ((!chip_disabled_pri) & (pri >> 4))
469469         continue;
470470      ox = m_spriteram3[attr_start + 1] & 0x01ff;
471471      xsize = (m_spriteram3[attr_start + 2] & 0x0700) >> 8;
trunk/src/mame/video/aussiebyte.cpp
r250222r250223
156156      gfx = 0;
157157   if BIT(ac_attr, 5) // blank
158158      gfx = 0;
159   if (ac_curs && BIT(ac_cnt, 14)) // cursor
159   if (ac_curs & BIT(ac_cnt, 14)) // cursor
160160      gfx ^= 0xff;
161161   if BIT(ac_attr, 4) // reverse video
162162      gfx ^= 0xff;
trunk/src/mame/video/cosmic.cpp
r250222r250223
469469         if (((!vb_) & vc_ & (!vd_)) ^ (vb_ & (!vc_) & vd_))
470470         {
471471            /* tree */
472            if (!hd_ && hc_ && !hb_)
472            if ((!hd_) & hc_ & (!hb_))
473473            {
474474               offs_t offs = ((x >> 3) & 0x03) | ((y & 0x1f) << 2) |
475475                           (flip_screen() ? 0x80 : 0);
r250222r250223
482482
483483               color = (plane1 & plane2)       |   // R
484484                     (plane2         )  << 1 |   // G
485                     (plane1 & ~plane2) << 2;    // B
485                     (plane1 & !plane2) << 2;    // B
486486            }
487487         }
488488         else
489489         {
490490            /* water */
491            if (hd_ && !hc_ && hb_ && !ha_)
491            if (hd_ & !hc_ & hb_ & !ha_)
492492            {
493493               offs_t offs = hd | (water << 1) | 0x0200;
494494
trunk/src/mame/video/mikromik.cpp
r250222r250223
3636         // Step 3: Fill in missing 2 pixels in the screen bitmap by repeating last column of the char bitmap
3737         // (works better with MikroMikko 1 font than duplicating the first and the last column)
3838         qh = d7 & d6; // extend pixels on the right side only if there were two adjacent ones before shifting out the MSB
39         video_in = ((((d7 & llen) | (vsp ? 0 : 1)) & (gpa0 ? 0 : 1)) & qh) | lten;
40         color = (hlt_in ? 1 : 2) * (video_in ^ compl_in);
39         video_in = ((((d7 & llen) | !vsp) & !gpa0) & qh) | lten;
40         color = (hlt_in ? 1 : 2)*(video_in ^ compl_in);
4141         bitmap.pix32(y, x + 8) = m_palette->pen(color);
4242         bitmap.pix32(y, x + 9) = m_palette->pen(color);
4343      }
r250222r250223
4545      for (i = 0; i < 8; ++i) // ...and now the actual character bitmap bits for this scanline
4646      {
4747         qh = BIT(data, i);
48         video_in = ((((d7 & llen) | (vsp ? 0 : 1)) & (gpa0 ? 0 : 1)) & qh) | lten;
48         video_in = ((((d7 & llen) | !vsp) & !gpa0) & qh) | lten;
4949         color = (hlt_in ? 1 : 2)*(video_in ^ compl_in);
5050         bitmap.pix32(y, x + i) = m_palette->pen(color);
5151      }
trunk/src/mame/video/shadfrce.cpp
r250222r250223
101101
102102
103103
104void shadfrce_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
104void shadfrce_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offset )
105105{
106106   /* | ---- ---- hhhf Fe-Y | ---- ---- yyyy yyyy | ---- ---- TTTT TTTT | ---- ---- tttt tttt |
107107      | ---- ---- -pCc cccX | ---- ---- xxxx xxxx | ---- ---- ---- ---- | ---- ---- ---- ---- | */
r250222r250223
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;
130126      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;
135127
136      if (pal & 0x20) pal ^= 0x60;    /* skip hole */
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;
137133
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);
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;
145141         }
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         }
146158      }
159
147160      source-=8;
148161   }
149162}
r250222r250223
156169   {
157170      m_bg1tilemap->draw(screen, bitmap, cliprect, 0,0);
158171      m_bg0tilemap->draw(screen, bitmap, cliprect, 0,1);
159      draw_sprites(screen,bitmap,cliprect);
172      draw_sprites(screen,bitmap,cliprect, 0);
173      draw_sprites(screen,bitmap,cliprect, 0x200); // y-wrap
160174      m_fgtilemap->draw(screen, bitmap, cliprect, 0,0);
161175   }
162176   else
trunk/src/osd/modules/debugger/debugint.cpp
r250222r250223
1717#include "debug/debugvw.h"
1818#include "debug/dvdisasm.h"
1919#include "debug/dvmemory.h"
20#include "debug/dvstate.h"
2021#include "debug/debugcon.h"
2122#include "debug/debugcpu.h"
2223
r250222r250223
150151   DISABLE_COPYING(DView_edit);
151152
152153public:
153   DView_edit(): active(0), container(NULL) { }
154   ~DView_edit() { }
154   DView_edit()
155   { }
156   ~DView_edit()
157   { }
155158   int                 active;
156159   render_container *  container;
157160   std::string         str;
r250222r250223
11281131   x1 += UI_BOX_LR_BORDER;
11291132   x2 -= UI_BOX_LR_BORDER;
11301133   y1 += UI_BOX_TB_BORDER;
1134   y2 -= UI_BOX_TB_BORDER;
11311135
11321136   /* draw the text within it */
11331137   editor->container->manager().machine().ui().draw_text_full(editor->container, editor->str.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
r250222r250223
14331437{
14341438   if (firststop && list == NULL)
14351439   {
1436      render_target *target = &device.machine().render().ui_target();
1440      DView *dv;
1441      render_target *target;
14371442
1443      target = &device.machine().render().ui_target();
1444
14381445      //set_view_by_name(target, "Debug");
14391446
1440      DView *disassembly = dview_alloc(target, device.machine(), DVT_DISASSEMBLY, VIEW_STATE_FOLLOW_CPU);
1441      disassembly->editor.active = TRUE;
1442      disassembly->editor.container = &device.machine().render().ui_container();
1443     
1444        dview_alloc(target, device.machine(), DVT_STATE, VIEW_STATE_FOLLOW_CPU);
1445     
1446        DView *console = dview_alloc(target, device.machine(), DVT_CONSOLE, VIEW_STATE_FOLLOW_CPU);
1447      dview_set_title(console, "Console");
1448      console->editor.active = TRUE;
1449      console->editor.container = &device.machine().render().ui_container();
1450      set_focus_view(console);
1447      dv = dview_alloc(target, device.machine(), DVT_DISASSEMBLY, VIEW_STATE_FOLLOW_CPU);
1448      dv->editor.active = TRUE;
1449      dv->editor.container = &device.machine().render().ui_container();
1450      dv = dview_alloc(target, device.machine(), DVT_STATE, VIEW_STATE_FOLLOW_CPU);
1451      dv = dview_alloc(target, device.machine(), DVT_CONSOLE, VIEW_STATE_FOLLOW_CPU);
1452      dview_set_title(dv, "Console");
1453      dv->editor.active = TRUE;
1454      dv->editor.container = &device.machine().render().ui_container();
1455      set_focus_view(dv);
14511456   }
14521457
14531458   followers_set_cpu(&device);
trunk/src/osd/modules/debugger/debugwin.cpp
r250222r250223
2222#include "win/uimetrics.h"
2323
2424#include "emu.h"
25#include "uiinput.h"
2526#include "debugger.h"
2627
2728#include "window.h"
29#include "winmain.h"
2830#include "../../windows/input.h"
2931
3032
trunk/src/osd/modules/debugger/win/consolewininfo.cpp
r250222r250223
99#include "consolewininfo.h"
1010
1111#include "debugviewinfo.h"
12#include "disasmviewinfo.h"
1213#include "uimetrics.h"
1314
1415#include "debug/debugcon.h"
r250222r250223
8384   set_cpu(*debug_cpu_get_visible_cpu(machine()));
8485
8586   // mark the edit box as the default focus and set it
86   editwin_info::set_default_focus();
87   set_default_focus();
8788   return;
8889
8990cleanup:
trunk/src/osd/modules/debugger/win/debugviewinfo.cpp
r250222r250223
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;
318         COLORREF fgcolor = RGB(0x00,0x00,0x00);
319319         COLORREF bgcolor = RGB(0xff,0xff,0xff);
320320         HBRUSH bgbrush = NULL;
321321         int last_attrib = -1;
trunk/src/osd/modules/debugger/win/debugwininfo.cpp
r250222r250223
1111#include "debugviewinfo.h"
1212
1313#include "debug/debugcpu.h"
14#include "imagedev/cassette.h"
15
16#include "strconv.h"
1417#include "window.h"
1518#include "winutf8.h"
1619
trunk/src/osd/modules/debugger/win/disasmwininfo.cpp
r250222r250223
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
1419#include "winutf8.h"
1520
1621
r250222r250223
3338   update_caption();
3439
3540   // recompute the children once to get the maxwidth
36   disasmwin_info::recompute_children();
41   recompute_children();
3742
3843   // position the window and recompute children again
3944   SetWindowPos(window(), HWND_TOP, 100, 100, maxwidth(), 200, SWP_SHOWWINDOW);
40   disasmwin_info::recompute_children();
45   recompute_children();
4146
4247   // mark the edit box as the default focus and set it
43   editwin_info::set_default_focus();
48   set_default_focus();
4449}
4550
4651
trunk/src/osd/modules/debugger/win/logwininfo.cpp
r250222r250223
3838   SetWindowPos(window(), HWND_TOP, 100, 100, bounds.right - bounds.left, bounds.bottom - bounds.top, SWP_SHOWWINDOW);
3939
4040   // recompute the children
41   debugwin_info::recompute_children();
41   recompute_children();
4242}
4343
4444
trunk/src/osd/modules/debugger/win/memorywininfo.cpp
r250222r250223
5959   update_caption();
6060
6161   // recompute the children once to get the maxwidth
62   memorywin_info::recompute_children();
62   recompute_children();
6363
6464   // position the window and recompute children again
6565   SetWindowPos(window(), HWND_TOP, 100, 100, maxwidth(), 200, SWP_SHOWWINDOW);
66   memorywin_info::recompute_children();
66   recompute_children();
6767
6868   // mark the edit box as the default focus and set it
69   editwin_info::set_default_focus();
69   set_default_focus();
7070}
7171
7272
trunk/src/osd/modules/debugger/win/pointswininfo.cpp
r250222r250223
4646   SetWindowPos(window(), HWND_TOP, 100, 100, bounds.right - bounds.left, bounds.bottom - bounds.top, SWP_SHOWWINDOW);
4747
4848   // recompute the children
49   debugwin_info::recompute_children();
49   recompute_children();
5050}
5151
5252
trunk/src/osd/modules/debugger/win/uimetrics.cpp
r250222r250223
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;
3435
3536      if (m_debug_font == NULL)
3637         fatalerror("Unable to create debugger font\n");
trunk/src/osd/modules/font/font_none.cpp
r250222r250223
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:
2425};
2526
2627bool osd_font_none::open(const char *font_path, const char *_name, int &height)
trunk/src/osd/modules/font/font_windows.cpp
r250222r250223
3434//-------------------------------------------------
3535
3636class osd_font_windows : public osd_font
37{   
37{
3838public:
39   osd_font_windows(): m_font(NULL) { }
4039   virtual ~osd_font_windows() { }
4140
4241   virtual bool open(const char *font_path, const char *name, int &height);
trunk/src/osd/modules/midi/none.cpp
r250222r250223
4141   virtual bool poll();
4242   virtual int read(UINT8 *pOut);
4343   virtual void write(UINT8 data);
44
45private:
46   //int dummy;
4447};
4548
4649osd_midi_device *none_module::create_midi_device()
trunk/src/osd/modules/midi/portmidi.cpp
r250222r250223
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) { }
5049   virtual ~osd_midi_device_pm() { }
5150   virtual bool open_input(const char *devname);
5251   virtual bool open_output(const char *devname);
r250222r250223
209208   {
210209      return false;
211210   }
211   return false;
212212}
213213
214214void osd_midi_device_pm::close()
trunk/src/osd/modules/netdev/pcap.cpp
r250222r250223
168168      m_p = NULL;
169169      return;
170170   }
171   netdev_pcap::set_mac(get_mac());
171   set_mac(get_mac());
172172
173173#ifdef SDLMAME_MACOSX
174174   m_ctx.head = 0;
r250222r250223
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
r250222r250223
1818
1919// MAMEOS headers
2020#include "d3dintf.h"
21#include "winmain.h"
2122
2223
2324
r250222r250223
8283   {
8384      osd_printf_verbose("Direct3D: Unable to find Direct3DCreate9\n");
8485      FreeLibrary(dllhandle);
86      dllhandle = NULL;
8587      return NULL;
8688   }
8789
r250222r250223
9193   {
9294      osd_printf_verbose("Direct3D: Error attempting to initialize Direct3D9\n");
9395      FreeLibrary(dllhandle);
96      dllhandle = NULL;
9497      return NULL;
9598   }
9699
trunk/src/osd/modules/render/d3d/d3dhlsl.cpp
r250222r250223
2929#include "render.h"
3030#include "ui/ui.h"
3131#include "rendutil.h"
32#include "options.h"
3233#include "emuopts.h"
3334#include "aviio.h"
3435#include "png.h"
r250222r250223
3839#include "d3dintf.h"
3940#include "winmain.h"
4041#include "window.h"
42#include "config.h"
4143#include "d3dcomm.h"
4244#include "modules/render/drawd3d.h"
4345#include "strconv.h"
r250222r250223
176178//  shader manager constructor
177179//============================================================
178180
179shaders::shaders():
180   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),
181   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),
182   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),
183   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),
184   focus_effect(NULL), phosphor_effect(NULL), deconverge_effect(NULL), color_effect(NULL), yiq_encode_effect(NULL), yiq_decode_effect(NULL), bloom_effect(NULL),
185   downsample_effect(NULL), vector_effect(NULL), fsfx_vertices(NULL), curr_texture(NULL), curr_render_target(NULL), curr_poly(NULL)
186
181shaders::shaders()
187182{
188183   master_enable = false;
189184   vector_enable = true;
r250222r250223
34403435         // find length of the device name
34413436         int end1 = snapstr.find("/", pos + 3);
34423437         int end2 = snapstr.find("%", pos + 3);
3443         int end;
3438         int end = -1;
34443439
34453440         if ((end1 != -1) && (end2 != -1))
34463441         {
trunk/src/osd/modules/render/d3d/d3dhlsl.h
r250222r250223
2020//  TYPE DEFINITIONS
2121//============================================================
2222
23struct slider_state;
24
2523namespace d3d
2624{
2725class effect;
trunk/src/osd/modules/render/drawd3d.cpp
r250222r250223
2727// MAME headers
2828#include "emu.h"
2929#include "render.h"
30
30#include "ui/ui.h"
3131#include "rendutil.h"
32#include "options.h"
3233#include "emuopts.h"
3334#include "aviio.h"
35#include "png.h"
3436
3537// MAMEOS headers
3638#include "modules/render/d3d/d3dintf.h"
3739#include "winmain.h"
3840#include "window.h"
41#include "config.h"
42#include "strconv.h"
3943#include "modules/render/d3d/d3dcomm.h"
4044#include "drawd3d.h"
4145
r250222r250223
612616}
613617
614618renderer::renderer(osd_window *window)
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_texture_manager(NULL), m_line_count(0)
619   : osd_renderer(window, FLAG_NONE)
619620{
621   m_device = NULL;
622   m_restarting = false;
623   m_shaders = NULL;
624   m_numverts = 0;
625   m_numpolys = 0;
626   m_vertexbuf = NULL;
627   m_lockedbuf = NULL;
628   m_vectorbatch = NULL;
629   m_last_texture = NULL;
630   m_hlsl_buf = NULL;
631   m_texture_manager = NULL;
620632}
621633
622634int renderer::initialize()
trunk/src/osd/modules/render/drawdd.cpp
r250222r250223
1717#include "emu.h"
1818#include "render.h"
1919#include "rendutil.h"
20#include "options.h"
2021#include "rendersw.inc"
2122
2223// MAMEOS headers
2324#include "winmain.h"
2425#include "window.h"
26#include "config.h"
2527
2628
2729
r250222r250223
3840{
3941public:
4042   renderer_dd(osd_window *window)
41   : osd_renderer(window, FLAG_NONE),
42      width(0),
43      height(0),
44      refresh(0),
43   : osd_renderer(window, FLAG_NONE),
4544      //adapter(0),
4645      adapter_ptr(NULL),
4746      clearouter(0),
trunk/src/osd/modules/render/drawnone.cpp
r250222r250223
3232   virtual void record() { };
3333   virtual void toggle_fsfx() { };
3434   virtual void destroy();
35
36private:
3537};
3638
3739//============================================================
trunk/src/osd/modules/render/drawogl.cpp
r250222r250223
1919// MAME headers
2020#include "osdcomm.h"
2121#include "emu.h"
22#include "options.h"
2223#include "emuopts.h"
2324
2425#ifndef OSD_WINDOWS
trunk/src/osd/modules/sound/direct_sound.cpp
r250222r250223
174174            memcpy(m_bytes2, (UINT8 const *)data + m_locked1, bytes - m_locked1);
175175         }
176176
177         unlock();
177         result = unlock();
178178         return DS_OK;
179179      }
180180      HRESULT clear()
r250222r250223
189189         assert(0U == m_locked2);
190190         memset(m_bytes1, 0, m_locked1);
191191
192         unlock();
192         result = unlock();
193193         return DS_OK;
194194      }
195195
trunk/src/osd/modules/sync/work_osd.cpp
r250222r250223
444444      osd_work_item *item;
445445
446446      // first allocate a new work item; try the free list first
447      INT32 myslot = osd_scalable_lock_acquire(queue->lock);
447      INT32 lockslot = 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, myslot);
452      osd_scalable_lock_release(queue->lock, lockslot);
453453
454454      // if nothing, allocate something new
455455      if (item == NULL)
trunk/src/osd/sdl/sdldir.cpp
r250222r250223
99//============================================================
1010
1111#ifdef SDLMAME_WIN32
12#include "../windows/windir.cpp"
12#include "../windows/windir.c"
1313#else
1414
1515#ifndef _LARGEFILE64_SOURCE
trunk/src/osd/sdl/sdlfile.cpp
r250222r250223
99//============================================================
1010
1111#ifdef SDLMAME_WIN32
12#include "../windows/winfile.cpp"
13#include "../windows/winutil.cpp"
12#include "../windows/winfile.c"
13#include "../windows/winutil.c"
1414#else
1515
1616#ifndef _LARGEFILE64_SOURCE
trunk/src/osd/sdl/sdlptty_win32.cpp
r250222r250223
99//
1010//============================================================
1111
12#include "../windows/winptty.cpp"
12#include "../windows/winptty.c"
trunk/src/osd/sdl/sdlsocket.cpp
r250222r250223
99//============================================================
1010
1111#ifdef SDLMAME_WIN32
12#include "../windows/winsocket.cpp"
12#include "../windows/winsocket.c"
1313#else
1414
1515#include <stdio.h>
trunk/src/osd/strconv.cpp
r250222r250223
1313
1414// MAMEOS headers
1515#include "strconv.h"
16#include "unicode.h"
1617
1718#if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS)
1819//============================================================
r250222r250223
119120}
120121
121122#else
122#include "unicode.h"
123
123124//============================================================
124125//  osd_uchar_from_osdchar
125126//============================================================
trunk/src/osd/windows/input.cpp
r250222r250223
122122{
123123public:
124124   device_info(running_machine &machine)
125      : head(NULL), next(NULL), name(NULL), poll(NULL), device(NULL), m_machine(machine) { }
125      : m_machine(machine) { }
126126
127127   running_machine &machine() const { return m_machine; }
128128
trunk/src/osd/windows/output.cpp
r250222r250223
1212
1313// MAME headers
1414#include "emu.h"
15#include "osdepend.h"
1516#include "winmain.h"
1617// MAMEOS headers
1718#include "output.h"
trunk/src/osd/windows/video.cpp
r250222r250223
1313// MAME headers
1414#include "emu.h"
1515#include "emuopts.h"
16#include "osdepend.h"
17#include "video/vector.h"
1618#include "render.h"
19#include "rendutil.h"
20#include "ui/ui.h"
1721#include "uiinput.h"
1822
1923// MAMEOS headers
r250222r250223
2226#include "window.h"
2327#include "input.h"
2428#include "strconv.h"
29#include "config.h"
2530
2631//============================================================
2732//  CONSTANTS
r250222r250223
108113win_monitor_info::win_monitor_info(const HMONITOR handle, const char *monitor_device, float aspect)
109114   : osd_monitor_info(&m_handle, monitor_device, aspect), m_handle(handle)
110115{
111   win_monitor_info::refresh();
116   refresh();
112117}
113118
114119win_monitor_info::~win_monitor_info()
trunk/src/osd/windows/winclip.cpp
r250222r250223
7676
7777char *osd_get_clipboard_text(void)
7878{
79   char *result;
79   char *result = NULL;
8080
8181   // try to access unicode text
8282   result = get_clipboard_text_by_format(CF_UNICODETEXT, convert_wide);
trunk/src/osd/windows/window.cpp
r250222r250223
2323
2424// MAME headers
2525#include "emu.h"
26#include "emuopts.h"
2627#include "uiinput.h"
2728
2829// MAMEOS headers
r250222r250223
3031#include "window.h"
3132#include "video.h"
3233#include "input.h"
34#include "strconv.h"
35#include "config.h"
3336#include "winutf8.h"
3437
3538#include "winutil.h"
r250222r250223
614617      RECT bounds;
615618
616619      // hide cursor
617      while (ShowCursor(FALSE) >= -1) { };
620      while (ShowCursor(FALSE) >= -1) ;
618621      ShowCursor(TRUE);
619622
620623      // store the cursor position
r250222r250223
629632   else
630633   {
631634      // show cursor
632      while (ShowCursor(TRUE) < 1) { };
635      while (ShowCursor(TRUE) < 1) ;
633636      ShowCursor(FALSE);
634637
635638      // allow cursor to move freely
r250222r250223
964967   }
965968
966969   if (LOG_TEMP_PAUSE)
967      osd_printf_verbose("winwindow_ui_pause_from_main_thread(): %d --> %d\n", old_temp_pause, ui_temp_pause);
970      machine.logerror("winwindow_ui_pause_from_main_thread(): %d --> %d\n", old_temp_pause, ui_temp_pause);
968971}
969972
970973
r250222r250223
18551858   {
18561859      win_physical_width = newrect.width();
18571860      win_physical_height = newrect.height();
1858      osd_printf_verbose("Physical width %d, height %d\n",win_physical_width,win_physical_height);
1861      machine().logerror("Physical width %d, height %d\n",win_physical_width,win_physical_height);
18591862   }
18601863}
18611864
trunk/src/osd/windows/winfile.cpp
r250222r250223
2020// MAMEOS headers
2121#include "strconv.h"
2222#include "winutil.h"
23#include "winutf8.h"
2324
2425#include "winfile.h"
2526
r250222r250223
186187         break;
187188      case WINFILE_SOCKET:
188189         return win_read_socket(file, buffer, offset, length, actual);
190         break;
189191      case WINFILE_PTTY:
190192         return win_read_ptty(file, buffer, offset, length, actual);
193         break;
191194
192195   }
193196   return FILERR_NONE;
r250222r250223
223226         break;
224227      case WINFILE_SOCKET:
225228         return win_write_socket(file, buffer, offset, length, actual);
229         break;
226230      case WINFILE_PTTY:
227231         return win_write_ptty(file, buffer, offset, length, actual);
232         break;
228233
229234   }
230235   return FILERR_NONE;
r250222r250223
269274         break;
270275      case WINFILE_SOCKET:
271276         return FILERR_FAILURE;
277         break;
272278      case WINFILE_PTTY:
273279         return FILERR_FAILURE;
280         break;
274281
275282   }
276283   return FILERR_NONE;
trunk/src/osd/windows/winmain.cpp
r250222r250223
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"
3237#include "winutf8.h"
3338#include "winutil.h"
3439#include "debugger.h"
r250222r250223
412417
413418
414419   // parse config and cmdline options
415   DWORD result;
420   DWORD result = 0;
416421   {
417422      windows_options options;
418423      windows_osd_interface osd(options);
r250222r250223
13491354//-------------------------------------------------
13501355
13511356sampling_profiler::sampling_profiler(UINT32 max_seconds, UINT8 stack_depth = 0)
1352   :   m_target_thread(NULL),
1353      m_thread(NULL),
1357   : m_thread(NULL),
13541358      m_thread_id(0),
13551359      m_thread_exit(false),
13561360      m_stack_depth(stack_depth),
trunk/src/osd/windows/winsocket.cpp
r250222r250223
1616// MAME headers
1717#include "osdcore.h"
1818
19// MAMEOS headers
20#include "strconv.h"
21#include "winutil.h"
22#include "winutf8.h"
23
1924#include "winfile.h"
2025
2126const char *winfile_socket_identifier  = "socket.";
trunk/src/osd/windows/winutf8.cpp
r250222r250223
235235                        int x, int y, int width, int height, HWND parent, HMENU menu,
236236                        HINSTANCE instance, void* param)
237237{
238   TCHAR* t_classname;
238   TCHAR* t_classname = NULL;
239239   TCHAR* t_windowname = NULL;
240240   HWND result = 0;
241241
trunk/src/osd/windows/winutil.cpp
r250222r250223
1212
1313// MAMEOS headers
1414#include "winutil.h"
15#include "strconv.h"
1516
1617//============================================================
1718//  win_error_to_file_error


Previous 199869 Revisions Next


© 1997-2024 The MAME Team