Previous 199869 Revisions Next

r31177 Thursday 3rd July, 2014 at 20:28:08 UTC by Wilbert Pol
tms34010: Modernised cpu core. (nw)
[src/emu/cpu/tms34010]34010fld.c 34010gfx.c 34010ops.c 34010ops.h 34010tbl.c tms34010.c tms34010.h
[src/mame/drivers]artmagic.c btoads.c coolpool.c exterm.c harddriv.c jpmimpct.c lethalj.c metalmx.c micro3d.c midtunit.c midwunit.c midxunit.c midyunit.c potgoldu.c skeetsht.c skimaxx.c tickee.c xtheball.c
[src/mame/machine]inder_vid.c
[src/mame/video]exterm.c

trunk/src/mame/drivers/midwunit.c
r31176r31177
615615 *
616616 *************************************/
617617
618static const tms34010_config tms_config =
618static const tms340x0_config tms_config =
619619{
620620   FALSE,                          /* halt on reset */
621621   "screen",                       /* the screen operated on */
r31176r31177
639639static MACHINE_CONFIG_START( wunit, midwunit_state )
640640
641641   MCFG_CPU_ADD("maincpu", TMS34010, 50000000)
642   MCFG_CPU_CONFIG(tms_config)
642   MCFG_TMS340X0_CONFIG(tms_config)
643643   MCFG_CPU_PROGRAM_MAP(main_map)
644644
645645   MCFG_MACHINE_RESET_OVERRIDE(midwunit_state,midwunit)
trunk/src/mame/drivers/skimaxx.c
r31176r31177
467467   // TODO
468468}
469469
470static const tms34010_config tms_config =
470static const tms340x0_config tms_config =
471471{
472472   FALSE,                     /* halt on reset */
473473   "screen",                  /* the screen operated on */
r31176r31177
508508
509509   /* video hardware */
510510   MCFG_CPU_ADD("tms", TMS34010, XTAL_50MHz)
511   MCFG_CPU_CONFIG(tms_config)
511   MCFG_TMS340X0_CONFIG(tms_config)
512512   MCFG_CPU_PROGRAM_MAP(tms_program_map)
513513
514514   MCFG_SCREEN_ADD("screen", RASTER)
trunk/src/mame/drivers/btoads.c
r31176r31177
299299 *
300300 *************************************/
301301
302static const tms34010_config tms_config =
302static const tms340x0_config tms_config =
303303{
304304   FALSE,                          /* halt on reset */
305305   "screen",                       /* the screen operated on */
r31176r31177
323323static MACHINE_CONFIG_START( btoads, btoads_state )
324324
325325   MCFG_CPU_ADD("maincpu", TMS34020, CPU_CLOCK/2)
326   MCFG_CPU_CONFIG(tms_config)
326   MCFG_TMS340X0_CONFIG(tms_config)
327327   MCFG_CPU_PROGRAM_MAP(main_map)
328328
329329   MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK/4)
trunk/src/mame/drivers/midyunit.c
r31176r31177
10661066 *
10671067 *************************************/
10681068
1069static const tms34010_config zunit_tms_config =
1069static const tms340x0_config zunit_tms_config =
10701070{
10711071   FALSE,                          /* halt on reset */
10721072   "screen",                       /* the screen operated on */
r31176r31177
10791079   midyunit_from_shiftreg          /* read from shiftreg function */
10801080};
10811081
1082static const tms34010_config yunit_tms_config =
1082static const tms340x0_config yunit_tms_config =
10831083{
10841084   FALSE,                          /* halt on reset */
10851085   "screen",                       /* the screen operated on */
r31176r31177
11041104
11051105   /* basic machine hardware */
11061106   MCFG_CPU_ADD("maincpu", TMS34010, FAST_MASTER_CLOCK)
1107   MCFG_CPU_CONFIG(zunit_tms_config)
1107   MCFG_TMS340X0_CONFIG(zunit_tms_config)
11081108   MCFG_CPU_PROGRAM_MAP(main_map)
11091109
11101110   MCFG_MACHINE_RESET_OVERRIDE(midyunit_state,midyunit)
r31176r31177
11401140
11411141   /* basic machine hardware */
11421142   MCFG_CPU_ADD("maincpu", TMS34010, SLOW_MASTER_CLOCK)
1143   MCFG_CPU_CONFIG(yunit_tms_config)
1143   MCFG_TMS340X0_CONFIG(yunit_tms_config)
11441144   MCFG_CPU_PROGRAM_MAP(main_map)
11451145
11461146   MCFG_MACHINE_RESET_OVERRIDE(midyunit_state,midyunit)
trunk/src/mame/drivers/artmagic.c
r31176r31177
475475 *
476476 *************************************/
477477
478static const tms34010_config tms_config =
478static const tms340x0_config tms_config =
479479{
480480   TRUE,                           /* halt on reset */
481481   "screen",                       /* the screen operated on */
r31176r31177
827827   MCFG_CPU_PROGRAM_MAP(main_map)
828828
829829   MCFG_CPU_ADD("tms", TMS34010, MASTER_CLOCK_40MHz)
830   MCFG_CPU_CONFIG(tms_config)
830   MCFG_TMS340X0_CONFIG(tms_config)
831831   MCFG_CPU_PROGRAM_MAP(tms_map)
832832
833833   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
trunk/src/mame/drivers/coolpool.c
r31176r31177
794794 *
795795 *************************************/
796796
797static const tms34010_config tms_config_amerdart =
797static const tms340x0_config tms_config_amerdart =
798798{
799799   FALSE,                          /* halt on reset */
800800   "screen",                       /* the screen operated on */
r31176r31177
808808};
809809
810810
811static const tms34010_config tms_config_coolpool =
811static const tms340x0_config tms_config_coolpool =
812812{
813813   FALSE,                          /* halt on reset */
814814   "screen",                       /* the screen operated on */
r31176r31177
833833
834834   /* basic machine hardware */
835835   MCFG_CPU_ADD("maincpu", TMS34010, XTAL_40MHz)
836   MCFG_CPU_CONFIG(tms_config_amerdart)
836   MCFG_TMS340X0_CONFIG(tms_config_amerdart)
837837   MCFG_CPU_PROGRAM_MAP(amerdart_map)
838838
839839   MCFG_CPU_ADD("dsp", TMS32015, XTAL_40MHz/2)
r31176r31177
864864
865865   /* basic machine hardware */
866866   MCFG_CPU_ADD("maincpu", TMS34010, XTAL_40MHz)
867   MCFG_CPU_CONFIG(tms_config_coolpool)
867   MCFG_TMS340X0_CONFIG(tms_config_coolpool)
868868   MCFG_CPU_PROGRAM_MAP(coolpool_map)
869869
870870   MCFG_CPU_ADD("dsp", TMS32026,XTAL_40MHz)
trunk/src/mame/drivers/midtunit.c
r31176r31177
579579 *
580580 *************************************/
581581
582static const tms34010_config tms_config =
582static const tms340x0_config tms_config =
583583{
584584   FALSE,                          /* halt on reset */
585585   "screen",                       /* the screen operated on */
r31176r31177
604604
605605   /* basic machine hardware */
606606   MCFG_CPU_ADD("maincpu", TMS34010, CPU_CLOCK)
607   MCFG_CPU_CONFIG(tms_config)
607   MCFG_TMS340X0_CONFIG(tms_config)
608608   MCFG_CPU_PROGRAM_MAP(main_map)
609609
610610   MCFG_MACHINE_RESET_OVERRIDE(midtunit_state,midtunit)
trunk/src/mame/drivers/tickee.c
r31176r31177
735735 *
736736 *************************************/
737737
738static const tms34010_config tms_config =
738static const tms340x0_config tms_config =
739739{
740740   FALSE,                          /* halt on reset */
741741   "screen",                       /* the screen operated on */
r31176r31177
749749};
750750
751751
752static const tms34010_config rapidfir_tms_config =
752static const tms340x0_config rapidfir_tms_config =
753753{
754754   FALSE,                          /* halt on reset */
755755   "screen",                       /* the screen operated on */
r31176r31177
774774
775775   /* basic machine hardware */
776776   MCFG_CPU_ADD("maincpu", TMS34010, XTAL_40MHz)
777   MCFG_CPU_CONFIG(tms_config)
777   MCFG_TMS340X0_CONFIG(tms_config)
778778   MCFG_CPU_PROGRAM_MAP(tickee_map)
779779
780780   MCFG_MACHINE_RESET_OVERRIDE(tickee_state,tickee)
r31176r31177
819819
820820   /* basic machine hardware */
821821   MCFG_CPU_ADD("maincpu", TMS34010, XTAL_50MHz)
822   MCFG_CPU_CONFIG(rapidfir_tms_config)
822   MCFG_TMS340X0_CONFIG(rapidfir_tms_config)
823823   MCFG_CPU_PROGRAM_MAP(rapidfir_map)
824824
825825   MCFG_MACHINE_RESET_OVERRIDE(tickee_state,rapidfir)
r31176r31177
846846
847847   /* basic machine hardware */
848848   MCFG_CPU_ADD("maincpu", TMS34010, XTAL_40MHz)
849   MCFG_CPU_CONFIG(tms_config)
849   MCFG_TMS340X0_CONFIG(tms_config)
850850   MCFG_CPU_PROGRAM_MAP(mouseatk_map)
851851
852852   MCFG_MACHINE_RESET_OVERRIDE(tickee_state,tickee)
trunk/src/mame/drivers/micro3d.c
r31176r31177
286286 *
287287 *************************************/
288288
289static const tms34010_config vgb_config =
289static const tms340x0_config vgb_config =
290290{
291291   FALSE,                          /* halt on reset */
292292   "screen",                       /* the screen operated on */
r31176r31177
312312   MCFG_CPU_VBLANK_INT_DRIVER("screen", micro3d_state,  micro3d_vblank)
313313
314314   MCFG_CPU_ADD("vgb", TMS34010, XTAL_40MHz)
315   MCFG_CPU_CONFIG(vgb_config)
315   MCFG_TMS340X0_CONFIG(vgb_config)
316316   MCFG_CPU_PROGRAM_MAP(vgbmem)
317317
318318   MCFG_CPU_ADD("drmath", AM29000, XTAL_32MHz / 2)
trunk/src/mame/drivers/exterm.c
r31176r31177
400400 *
401401 *************************************/
402402
403static const tms34010_config master_config =
403static const tms340x0_config master_config =
404404{
405405   FALSE,                      /* halt on reset */
406406   "screen",                   /* the screen operated on */
r31176r31177
413413   exterm_from_shiftreg_master /* read from shiftreg function */
414414};
415415
416static const tms34010_config slave_config =
416static const tms340x0_config slave_config =
417417{
418418   TRUE,                       /* halt on reset */
419419   "screen",                   /* the screen operated on */
r31176r31177
438438
439439   /* basic machine hardware */
440440   MCFG_CPU_ADD("maincpu", TMS34010, 40000000)
441   MCFG_CPU_CONFIG(master_config)
441   MCFG_TMS340X0_CONFIG(master_config)
442442   MCFG_CPU_PROGRAM_MAP(master_map)
443443
444444   MCFG_CPU_ADD("slave", TMS34010, 40000000)
445   MCFG_CPU_CONFIG(slave_config)
445   MCFG_TMS340X0_CONFIG(slave_config)
446446   MCFG_CPU_PROGRAM_MAP(slave_map)
447447
448448   MCFG_CPU_ADD("audiocpu", M6502, 2000000)
trunk/src/mame/drivers/harddriv.c
r31176r31177
338338 *************************************/
339339
340340/* used on the medium-resolution driver boards */
341static const tms34010_config gsp_config_driver =
341static const tms340x0_config gsp_config_driver =
342342{
343343   TRUE,                           /* halt on reset */
344344   "screen",                       /* the screen operated on */
r31176r31177
353353
354354
355355/* used on the low-resolution multisync boards for harddrivc, racedrivc, steeltal */
356static const tms34010_config gsp_config_multisync =
356static const tms340x0_config gsp_config_multisync =
357357{
358358   TRUE,                           /* halt on reset */
359359   "screen",                       /* the screen operated on */
r31176r31177
368368
369369
370370/* used on the low-resolution multisync board for stunrun */
371static const tms34010_config gsp_config_multisync_stunrun =
371static const tms340x0_config gsp_config_multisync_stunrun =
372372{
373373   TRUE,                           /* halt on reset */
374374   "screen",                       /* the screen operated on */
r31176r31177
382382};
383383
384384
385static const tms34010_config msp_config =
385static const tms340x0_config msp_config =
386386{
387387   TRUE,                           /* halt on reset */
388388   "screen",                       /* the screen operated on */
r31176r31177
12961296
12971297   MCFG_CPU_ADD("gsp", TMS34010, HARDDRIV_GSP_CLOCK)
12981298   MCFG_CPU_PROGRAM_MAP(driver_gsp_map)
1299   MCFG_CPU_CONFIG(gsp_config_driver)
1299   MCFG_TMS340X0_CONFIG(gsp_config_driver)
13001300
13011301   MCFG_QUANTUM_TIME(attotime::from_hz(30000))
13021302
r31176r31177
13281328   /* basic machine hardware */
13291329   MCFG_CPU_ADD("msp", TMS34010, XTAL_50MHz)
13301330   MCFG_CPU_PROGRAM_MAP(driver_msp_map)
1331   MCFG_CPU_CONFIG(msp_config)
1331   MCFG_TMS340X0_CONFIG(msp_config)
13321332MACHINE_CONFIG_END
13331333
13341334
r31176r31177
13401340   MCFG_CPU_PROGRAM_MAP(multisync_68k_map)
13411341
13421342   MCFG_CPU_MODIFY("gsp")
1343   MCFG_CPU_CONFIG(gsp_config_multisync)
1343   MCFG_TMS340X0_CONFIG(gsp_config_multisync)
13441344   MCFG_CPU_PROGRAM_MAP(multisync_gsp_map)
13451345
13461346   /* video hardware */
r31176r31177
13551355   /* basic machine hardware */
13561356   MCFG_CPU_ADD("msp", TMS34010, XTAL_50MHz)
13571357   MCFG_CPU_PROGRAM_MAP(driver_msp_map)
1358   MCFG_CPU_CONFIG(msp_config)
1358   MCFG_TMS340X0_CONFIG(msp_config)
13591359MACHINE_CONFIG_END
13601360
13611361
r31176r31177
15301530
15311531   /* basic machine hardware */        /* multisync board without MSP */
15321532   MCFG_CPU_MODIFY("gsp")
1533   MCFG_CPU_CONFIG(gsp_config_multisync_stunrun)
1533   MCFG_TMS340X0_CONFIG(gsp_config_multisync_stunrun)
15341534   MCFG_FRAGMENT_ADD( adsp )           /* ADSP board */
15351535
15361536   /* video hardware */
trunk/src/mame/drivers/midxunit.c
r31176r31177
239239 *
240240 *************************************/
241241
242static const tms34010_config tms_config =
242static const tms340x0_config tms_config =
243243{
244244   FALSE,                          /* halt on reset */
245245   "screen",                       /* the screen operated on */
r31176r31177
264264
265265   /* basic machine hardware */
266266   MCFG_CPU_ADD("maincpu", TMS34020, 40000000)
267   MCFG_CPU_CONFIG(tms_config)
267   MCFG_TMS340X0_CONFIG(tms_config)
268268   MCFG_CPU_PROGRAM_MAP(main_map)
269269
270270   MCFG_MACHINE_RESET_OVERRIDE(midxunit_state,midxunit)
trunk/src/mame/drivers/potgoldu.c
r31176r31177
6464INPUT_PORTS_END
6565
6666
67static const tms34010_config tms_config =
67static const tms340x0_config tms_config =
6868{
6969   FALSE,                          /* halt on reset */
7070   "screen",                       /* the screen operated on */
r31176r31177
8282
8383   /* basic machine hardware */
8484   MCFG_CPU_ADD("maincpu", TMS34010, XTAL_40MHz)
85   MCFG_CPU_CONFIG(tms_config)
85   MCFG_TMS340X0_CONFIG(tms_config)
8686   MCFG_CPU_PROGRAM_MAP(potgold_map)
8787
8888
trunk/src/mame/drivers/lethalj.c
r31176r31177
629629 *
630630 *************************************/
631631
632static const tms34010_config tms_config =
632static const tms340x0_config tms_config =
633633{
634634   FALSE,                          /* halt on reset */
635635   "screen",                       /* the screen operated on */
r31176r31177
641641   NULL                            /* read from shiftreg function */
642642};
643643
644static const tms34010_config tms_config_lethalj =
644static const tms340x0_config tms_config_lethalj =
645645{
646646   FALSE,                          /* halt on reset */
647647   "screen",                       /* the screen operated on */
r31176r31177
665665
666666   /* basic machine hardware */
667667   MCFG_CPU_ADD("maincpu", TMS34010, MASTER_CLOCK)
668   MCFG_CPU_CONFIG(tms_config)
668   MCFG_TMS340X0_CONFIG(tms_config)
669669   MCFG_CPU_PROGRAM_MAP(lethalj_map)
670670
671671   MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
r31176r31177
695695static MACHINE_CONFIG_DERIVED( lethalj, gameroom )
696696
697697   MCFG_CPU_MODIFY("maincpu")
698   MCFG_CPU_CONFIG(tms_config_lethalj)
698   MCFG_TMS340X0_CONFIG(tms_config_lethalj)
699699
700700   MCFG_SCREEN_MODIFY("screen")
701701   MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK_LETHALJ, 689, 0, 512, 259, 0, 236)
trunk/src/mame/drivers/skeetsht.c
r31176r31177
219219 *
220220 *************************************/
221221
222static const tms34010_config tms_config =
222static const tms340x0_config tms_config =
223223{
224224   TRUE,                       /* halt on reset */
225225   "screen",                   /* the screen operated on */
r31176r31177
248248   MCFG_MC68HC11_CONFIG( 0, 0x100, 0x01 )  // And 512 bytes EEPROM? (68HC11A1)
249249
250250   MCFG_CPU_ADD("tms", TMS34010, 48000000)
251   MCFG_CPU_CONFIG(tms_config)
251   MCFG_TMS340X0_CONFIG(tms_config)
252252   MCFG_CPU_PROGRAM_MAP(tms_program_map)
253253
254254
trunk/src/mame/drivers/xtheball.c
r31176r31177
322322 *
323323 *************************************/
324324
325static const tms34010_config tms_config =
325static const tms340x0_config tms_config =
326326{
327327   FALSE,                          /* halt on reset */
328328   "screen",                       /* the screen operated on */
r31176r31177
346346static MACHINE_CONFIG_START( xtheball, xtheball_state )
347347
348348   MCFG_CPU_ADD("maincpu", TMS34010, 40000000)
349   MCFG_CPU_CONFIG(tms_config)
349   MCFG_TMS340X0_CONFIG(tms_config)
350350   MCFG_CPU_PROGRAM_MAP(main_map)
351351   MCFG_CPU_PERIODIC_INT_DRIVER(xtheball_state, irq1_line_hold,  15000)
352352
trunk/src/mame/drivers/jpmimpct.c
r31176r31177
826826   drvstate->update_irqs();
827827}
828828
829static const tms34010_config tms_config =
829static const tms340x0_config tms_config =
830830{
831831   TRUE,                       /* halt on reset */
832832   "screen",                   /* the screen operated on */
r31176r31177
851851   MCFG_CPU_PROGRAM_MAP(m68k_program_map)
852852
853853   MCFG_CPU_ADD("dsp", TMS34010, 40000000)
854   MCFG_CPU_CONFIG(tms_config)
854   MCFG_TMS340X0_CONFIG(tms_config)
855855   MCFG_CPU_PROGRAM_MAP(tms_program_map)
856856
857857   MCFG_QUANTUM_TIME(attotime::from_hz(30000))
trunk/src/mame/drivers/metalmx.c
r31176r31177
688688 *
689689 *************************************/
690690
691static const tms34010_config gsp_config =
691static const tms340x0_config gsp_config =
692692{
693693   TRUE,                   /* halt on reset */
694694   "screen",               /* the screen operated on */
r31176r31177
715715   MCFG_CPU_DATA_MAP(adsp_data_map)
716716
717717   MCFG_CPU_ADD("gsp", TMS34020, 40000000)         /* Unverified */
718   MCFG_CPU_CONFIG(gsp_config)
718   MCFG_TMS340X0_CONFIG(gsp_config)
719719   MCFG_CPU_PROGRAM_MAP(gsp_map)
720720
721721   MCFG_CPU_ADD("dsp32c_1", DSP32C, 40000000)      /* Unverified */
trunk/src/mame/machine/inder_vid.c
r31176r31177
9090}
9191
9292
93static const tms34010_config tms_config_megaphx =
93static const tms340x0_config tms_config_megaphx =
9494{
9595   TRUE,                          /* halt on reset */
9696   "inder_vid:inder_screen",                       /* the screen operated on */
r31176r31177
110110
111111static MACHINE_CONFIG_FRAGMENT( inder_vid )
112112   MCFG_CPU_ADD("tms", TMS34010, XTAL_40MHz)
113   MCFG_CPU_CONFIG(tms_config_megaphx)
113   MCFG_TMS340X0_CONFIG(tms_config_megaphx)
114114   MCFG_CPU_PROGRAM_MAP(megaphx_tms_map)
115115
116116   MCFG_SCREEN_ADD("inder_screen", RASTER)
trunk/src/mame/video/exterm.c
r31176r31177
7979   int x;
8080
8181   /* get parameters for the slave CPU */
82   tms34010_get_display_params(state->m_slave, &fgparams);
82   state->m_slave->get_display_params(&fgparams);
8383
8484   /* compute info about the slave vram */
8585   if (fgparams.enabled && scanline >= fgparams.veblnk && scanline < fgparams.vsblnk && fgparams.heblnk < fgparams.hsblnk)
trunk/src/emu/cpu/tms34010/34010ops.c
r31176r31177
1616#define ZEXTEND(val,width) if (width) (val) &= ((UINT32)0xffffffff >> (32 - (width)))
1717#define SEXTEND(val,width) if (width) (val) = (INT32)((val) << (32 - (width))) >> (32 - (width))
1818
19#define SXYTOL(T,val)   ((((INT16)(val).y * (T)->convsp) + ((INT16)(val).x << (T)->pixelshift)) + OFFSET(T))
20#define DXYTOL(T,val)   ((((INT16)(val).y * (T)->convdp) + ((INT16)(val).x << (T)->pixelshift)) + OFFSET(T))
21#define MXYTOL(T,val)   ((((INT16)(val).y * (T)->convmp) + ((INT16)(val).x << (T)->pixelshift)) + OFFSET(T))
19#define SXYTOL(val)   ((((INT16)(val).y * m_convsp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
20#define DXYTOL(val)   ((((INT16)(val).y * m_convdp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
21#define MXYTOL(val)   ((((INT16)(val).y * m_convmp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
2222
23#define COUNT_CYCLES(T,x)   (T)->icount -= x
24#define COUNT_UNKNOWN_CYCLES(T,x) COUNT_CYCLES(T,x)
23#define COUNT_CYCLES(x)   m_icount -= x
24#define COUNT_UNKNOWN_CYCLES(x) COUNT_CYCLES(x)
2525
26#define CORRECT_ODD_PC(T,x) do { if ((T)->pc & 0x0f) logerror("%s to PC=%08X\n", x, (T)->pc); (T)->pc &= ~0x0f; } while (0)
26#define CORRECT_ODD_PC(x) do { if (m_pc & 0x0f) logerror("%s to PC=%08X\n", x, m_pc); m_pc &= ~0x0f; } while (0)
2727
2828
2929
r31176r31177
3333
3434#define SIGN(val)           ((val) & 0x80000000)
3535
36#define CLR_Z(T)                (T)->st &= ~STBIT_Z
37#define CLR_V(T)                (T)->st &= ~STBIT_V
38#define CLR_C(T)                (T)->st &= ~STBIT_C
39#define CLR_N(T)                (T)->st &= ~STBIT_N
40#define CLR_NZ(T)               (T)->st &= ~(STBIT_N | STBIT_Z)
41#define CLR_CZ(T)               (T)->st &= ~(STBIT_C | STBIT_Z)
42#define CLR_ZV(T)               (T)->st &= ~(STBIT_Z | STBIT_V)
43#define CLR_NZV(T)              (T)->st &= ~(STBIT_N | STBIT_Z | STBIT_V)
44#define CLR_NCZ(T)              (T)->st &= ~(STBIT_N | STBIT_C | STBIT_Z)
45#define CLR_NCZV(T)             (T)->st &= ~(STBIT_N | STBIT_C | STBIT_Z | STBIT_V)
36#define CLR_Z()                m_st &= ~STBIT_Z
37#define CLR_V()                m_st &= ~STBIT_V
38#define CLR_C()                m_st &= ~STBIT_C
39#define CLR_N()                m_st &= ~STBIT_N
40#define CLR_NZ()               m_st &= ~(STBIT_N | STBIT_Z)
41#define CLR_CZ()               m_st &= ~(STBIT_C | STBIT_Z)
42#define CLR_ZV()               m_st &= ~(STBIT_Z | STBIT_V)
43#define CLR_NZV()              m_st &= ~(STBIT_N | STBIT_Z | STBIT_V)
44#define CLR_NCZ()              m_st &= ~(STBIT_N | STBIT_C | STBIT_Z)
45#define CLR_NCZV()             m_st &= ~(STBIT_N | STBIT_C | STBIT_Z | STBIT_V)
4646
47#define SET_V_BIT_LO(T,val,bit) (T)->st |= ((val) << (28 - (bit))) & STBIT_V
48#define SET_V_BIT_HI(T,val,bit) (T)->st |= ((val) >> ((bit) - 28)) & STBIT_V
49#define SET_V_LOG(T,val)        (T)->st |= (val) << 28
50#define SET_Z_BIT_LO(T,val,bit) (T)->st |= ((val) << (29 - (bit))) & STBIT_Z
51#define SET_Z_BIT_HI(T,val,bit) (T)->st |= ((val) >> ((bit) - 29)) & STBIT_Z
52#define SET_Z_LOG(T,val)        (T)->st |= (val) << 29
53#define SET_C_BIT_LO(T,val,bit) (T)->st |= ((val) << (30 - (bit))) & STBIT_C
54#define SET_C_BIT_HI(T,val,bit) (T)->st |= ((val) >> ((bit) - 30)) & STBIT_C
55#define SET_C_LOG(T,val)        (T)->st |= (val) << 30
56#define SET_N_BIT(T,val,bit)    (T)->st |= ((val) << (31 - (bit))) & STBIT_N
57#define SET_N_LOG(T,val)        (T)->st |= (val) << 31
47#define SET_V_BIT_LO(val,bit) m_st |= ((val) << (28 - (bit))) & STBIT_V
48#define SET_V_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 28)) & STBIT_V
49#define SET_V_LOG(val)        m_st |= (val) << 28
50#define SET_Z_BIT_LO(val,bit) m_st |= ((val) << (29 - (bit))) & STBIT_Z
51#define SET_Z_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 29)) & STBIT_Z
52#define SET_Z_LOG(val)        m_st |= (val) << 29
53#define SET_C_BIT_LO(val,bit) m_st |= ((val) << (30 - (bit))) & STBIT_C
54#define SET_C_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 30)) & STBIT_C
55#define SET_C_LOG(val)        m_st |= (val) << 30
56#define SET_N_BIT(val,bit)    m_st |= ((val) << (31 - (bit))) & STBIT_N
57#define SET_N_LOG(val)        m_st |= (val) << 31
5858
59#define SET_Z_VAL(T,val)        SET_Z_LOG(T, (val) == 0)
60#define SET_N_VAL(T,val)        SET_N_BIT(T, val, 31)
61#define SET_NZ_VAL(T,val)       SET_Z_VAL(T, val); SET_N_VAL(T, val)
62#define SET_V_SUB(T,a,b,r)      SET_V_BIT_HI(T, ((a) ^ (b)) & ((a) ^ (r)), 31)
63#define SET_V_ADD(T,a,b,r)      SET_V_BIT_HI(T, ~((a) ^ (b)) & ((a) ^ (r)), 31)
64#define SET_C_SUB(T,a,b)        SET_C_LOG(T, (UINT32)(b) > (UINT32)(a))
65#define SET_C_ADD(T,a,b)        SET_C_LOG(T, (UINT32)~(a) < (UINT32)(b))
66#define SET_NZV_SUB(T,a,b,r)    SET_NZ_VAL(T,r); SET_V_SUB(T,a,b,r)
67#define SET_NZCV_SUB(T,a,b,r)   SET_NZV_SUB(T,a,b,r); SET_C_SUB(T,a,b)
68#define SET_NZCV_ADD(T,a,b,r)   SET_NZ_VAL(T,r); SET_V_ADD(T,a,b,r); SET_C_ADD(T,a,b)
59#define SET_Z_VAL(val)        SET_Z_LOG((val) == 0)
60#define SET_N_VAL(val)        SET_N_BIT(val, 31)
61#define SET_NZ_VAL(val)       SET_Z_VAL(val); SET_N_VAL(val)
62#define SET_V_SUB(a,b,r)      SET_V_BIT_HI(((a) ^ (b)) & ((a) ^ (r)), 31)
63#define SET_V_ADD(a,b,r)      SET_V_BIT_HI(~((a) ^ (b)) & ((a) ^ (r)), 31)
64#define SET_C_SUB(a,b)        SET_C_LOG((UINT32)(b) > (UINT32)(a))
65#define SET_C_ADD(a,b)        SET_C_LOG((UINT32)~(a) < (UINT32)(b))
66#define SET_NZV_SUB(a,b,r)    SET_NZ_VAL(r); SET_V_SUB(a,b,r)
67#define SET_NZCV_SUB(a,b,r)   SET_NZV_SUB(a,b,r); SET_C_SUB(a,b)
68#define SET_NZCV_ADD(a,b,r)   SET_NZ_VAL(r); SET_V_ADD(a,b,r); SET_C_ADD(a,b)
6969
7070static 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 };
7171
r31176r31177
7474    UNIMPLEMENTED INSTRUCTION
7575***************************************************************************/
7676
77static void unimpl(tms34010_state *tms, UINT16 op)
77void tms340x0_device::unimpl(UINT16 op)
7878{
7979   /* kludge for Super High Impact -- this doesn't seem to cause */
8080   /* an illegal opcode exception */
81   if (tms->direct->read_decrypted_word(TOBYTE(tms->pc - 0x10)) == 0x0007)
81   if (m_direct->read_decrypted_word(TOBYTE(m_pc - 0x10)) == 0x0007)
8282      return;
8383
8484   /* 9 Ball Shootout calls to FFDF7468, expecting it */
8585   /* to execute the next instruction from FFDF7470 */
8686   /* but the instruction at FFDF7460 is an 0x0001 */
87   if (tms->direct->read_decrypted_word(TOBYTE(tms->pc - 0x10)) == 0x0001)
87   if (m_direct->read_decrypted_word(TOBYTE(m_pc - 0x10)) == 0x0001)
8888      return;
8989
90   PUSH(tms, tms->pc);
91   PUSH(tms, tms->st);
92   RESET_ST(tms);
93   tms->pc = RLONG(tms, 0xfffffc20);
94   COUNT_UNKNOWN_CYCLES(tms,16);
90   PUSH(m_pc);
91   PUSH(m_st);
92   RESET_ST();
93   m_pc = RLONG(0xfffffc20);
94   COUNT_UNKNOWN_CYCLES(16);
9595
9696   /* extra check to prevent bad things */
97   if (tms->pc == 0 || opcode_table[tms->direct->read_decrypted_word(TOBYTE(tms->pc)) >> 4] == unimpl)
97   if (m_pc == 0 || s_opcode_table[m_direct->read_decrypted_word(TOBYTE(m_pc)) >> 4] == &tms34010_device::unimpl)
9898   {
99      tms->device->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
100      debugger_break(tms->device->machine());
99      set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
100      debugger_break(machine());
101101   }
102102}
103103
r31176r31177
109109
110110#define ADD_XY(R)                               \
111111{                                               \
112   XY  a =  R##REG_XY(tms,SRCREG(op));                 \
113   XY *b = &R##REG_XY(tms,DSTREG(op));                 \
114   CLR_NCZV(tms);                                  \
112   XY  a =  R##REG_XY(SRCREG(op));                 \
113   XY *b = &R##REG_XY(DSTREG(op));                 \
114   CLR_NCZV();                                  \
115115   b->x += a.x;                                \
116116   b->y += a.y;                                \
117   SET_N_LOG(tms, b->x == 0);                      \
118   SET_C_BIT_LO(tms, b->y, 15);                        \
119   SET_Z_LOG(tms, b->y == 0);                      \
120   SET_V_BIT_LO(tms, b->x, 15);                        \
121   COUNT_CYCLES(tms,1);                            \
117   SET_N_LOG(b->x == 0);                      \
118   SET_C_BIT_LO(b->y, 15);                        \
119   SET_Z_LOG(b->y == 0);                      \
120   SET_V_BIT_LO(b->x, 15);                        \
121   COUNT_CYCLES(1);                            \
122122}
123static void add_xy_a(tms34010_state *tms, UINT16 op) { ADD_XY(A); }
124static void add_xy_b(tms34010_state *tms, UINT16 op) { ADD_XY(B); }
123void tms340x0_device::add_xy_a(UINT16 op) { ADD_XY(A); }
124void tms340x0_device::add_xy_b(UINT16 op) { ADD_XY(B); }
125125
126126#define SUB_XY(R)                               \
127127{                                               \
128   XY  a =  R##REG_XY(tms,SRCREG(op));                 \
129   XY *b = &R##REG_XY(tms,DSTREG(op));                 \
130   CLR_NCZV(tms);                                  \
131   SET_N_LOG(tms, a.x == b->x);                        \
132   SET_C_LOG(tms, a.y > b->y);                     \
133   SET_Z_LOG(tms, a.y == b->y);                        \
134   SET_V_LOG(tms, a.x > b->x);                     \
128   XY  a =  R##REG_XY(SRCREG(op));                 \
129   XY *b = &R##REG_XY(DSTREG(op));                 \
130   CLR_NCZV();                                  \
131   SET_N_LOG(a.x == b->x);                        \
132   SET_C_LOG(a.y > b->y);                     \
133   SET_Z_LOG(a.y == b->y);                        \
134   SET_V_LOG(a.x > b->x);                     \
135135   b->x -= a.x;                                \
136136   b->y -= a.y;                                \
137   COUNT_CYCLES(tms,1);                            \
137   COUNT_CYCLES(1);                            \
138138}
139static void sub_xy_a(tms34010_state *tms, UINT16 op) { SUB_XY(A); }
140static void sub_xy_b(tms34010_state *tms, UINT16 op) { SUB_XY(B); }
139void tms340x0_device::sub_xy_a(UINT16 op) { SUB_XY(A); }
140void tms340x0_device::sub_xy_b(UINT16 op) { SUB_XY(B); }
141141
142142#define CMP_XY(R)                               \
143143{                                               \
144144   INT16 res;                                  \
145   XY a = R##REG_XY(tms,DSTREG(op));                   \
146   XY b = R##REG_XY(tms,SRCREG(op));                   \
147   CLR_NCZV(tms);                                  \
145   XY a = R##REG_XY(DSTREG(op));                   \
146   XY b = R##REG_XY(SRCREG(op));                   \
147   CLR_NCZV();                                  \
148148   res = a.x-b.x;                              \
149   SET_N_LOG(tms, res == 0);                       \
150   SET_V_BIT_LO(tms, res, 15);                     \
149   SET_N_LOG(res == 0);                       \
150   SET_V_BIT_LO(res, 15);                     \
151151   res = a.y-b.y;                              \
152   SET_Z_LOG(tms, res == 0);                       \
153   SET_C_BIT_LO(tms, res, 15);                     \
154   COUNT_CYCLES(tms,1);                            \
152   SET_Z_LOG(res == 0);                       \
153   SET_C_BIT_LO(res, 15);                     \
154   COUNT_CYCLES(1);                            \
155155}
156static void cmp_xy_a(tms34010_state *tms, UINT16 op) { CMP_XY(A); }
157static void cmp_xy_b(tms34010_state *tms, UINT16 op) { CMP_XY(B); }
156void tms340x0_device::cmp_xy_a(UINT16 op) { CMP_XY(A); }
157void tms340x0_device::cmp_xy_b(UINT16 op) { CMP_XY(B); }
158158
159159#define CPW(R)                                  \
160160{                                               \
161161   INT32 res = 0;                              \
162   INT16 x = R##REG_X(tms,SRCREG(op));                 \
163   INT16 y = R##REG_Y(tms,SRCREG(op));                 \
162   INT16 x = R##REG_X(SRCREG(op));                 \
163   INT16 y = R##REG_Y(SRCREG(op));                 \
164164                                    \
165   CLR_V(tms);                                     \
166   res |= ((WSTART_X(tms) > x) ? 0x20  : 0);       \
167   res |= ((x > WEND_X(tms))   ? 0x40  : 0);       \
168   res |= ((WSTART_Y(tms) > y) ? 0x80  : 0);       \
169   res |= ((y > WEND_Y(tms))   ? 0x100 : 0);       \
170   R##REG(tms,DSTREG(op)) = res;                       \
171   SET_V_LOG(tms, res != 0);                       \
172   COUNT_CYCLES(tms,1);                            \
165   CLR_V();                                     \
166   res |= ((WSTART_X() > x) ? 0x20  : 0);       \
167   res |= ((x > WEND_X())   ? 0x40  : 0);       \
168   res |= ((WSTART_Y() > y) ? 0x80  : 0);       \
169   res |= ((y > WEND_Y())   ? 0x100 : 0);       \
170   R##REG(DSTREG(op)) = res;                       \
171   SET_V_LOG(res != 0);                       \
172   COUNT_CYCLES(1);                            \
173173}
174static void cpw_a(tms34010_state *tms, UINT16 op) { CPW(A); }
175static void cpw_b(tms34010_state *tms, UINT16 op) { CPW(B); }
174void tms340x0_device::cpw_a(UINT16 op) { CPW(A); }
175void tms340x0_device::cpw_b(UINT16 op) { CPW(B); }
176176
177177#define CVXYL(R)                                    \
178178{                                                   \
179   R##REG(tms,DSTREG(op)) = DXYTOL(tms,R##REG_XY(tms,SRCREG(op)));     \
180   COUNT_CYCLES(tms,3);                                \
179   R##REG(DSTREG(op)) = DXYTOL(R##REG_XY(SRCREG(op)));     \
180   COUNT_CYCLES(3);                                \
181181}
182static void cvxyl_a(tms34010_state *tms, UINT16 op) { CVXYL(A); }
183static void cvxyl_b(tms34010_state *tms, UINT16 op) { CVXYL(B); }
182void tms340x0_device::cvxyl_a(UINT16 op) { CVXYL(A); }
183void tms340x0_device::cvxyl_b(UINT16 op) { CVXYL(B); }
184184
185185#define MOVX(R)                                     \
186186{                                                   \
187   R##REG(tms,DSTREG(op)) = (R##REG(tms,DSTREG(op)) & 0xffff0000) | (UINT16)R##REG(tms,SRCREG(op));    \
188   COUNT_CYCLES(tms,1);                                                                    \
187   R##REG(DSTREG(op)) = (R##REG(DSTREG(op)) & 0xffff0000) | (UINT16)R##REG(SRCREG(op));    \
188   COUNT_CYCLES(1);                                                                    \
189189}
190static void movx_a(tms34010_state *tms, UINT16 op) { MOVX(A); }
191static void movx_b(tms34010_state *tms, UINT16 op) { MOVX(B); }
190void tms340x0_device::movx_a(UINT16 op) { MOVX(A); }
191void tms340x0_device::movx_b(UINT16 op) { MOVX(B); }
192192
193193#define MOVY(R)                                     \
194194{                                                   \
195   R##REG(tms,DSTREG(op)) = (R##REG(tms,SRCREG(op)) & 0xffff0000) | (UINT16)R##REG(tms,DSTREG(op));    \
196   COUNT_CYCLES(tms,1);                                                                    \
195   R##REG(DSTREG(op)) = (R##REG(SRCREG(op)) & 0xffff0000) | (UINT16)R##REG(DSTREG(op));    \
196   COUNT_CYCLES(1);                                                                    \
197197}
198static void movy_a(tms34010_state *tms, UINT16 op) { MOVY(A); }
199static void movy_b(tms34010_state *tms, UINT16 op) { MOVY(B); }
198void tms340x0_device::movy_a(UINT16 op) { MOVY(A); }
199void tms340x0_device::movy_b(UINT16 op) { MOVY(B); }
200200
201201
202202
r31176r31177
206206
207207#define PIXT_RI(R)                                  \
208208{                                                   \
209   WPIXEL(tms,R##REG(tms,DSTREG(op)),R##REG(tms,SRCREG(op)));  \
210   COUNT_UNKNOWN_CYCLES(tms,2);                        \
209   WPIXEL(R##REG(DSTREG(op)),R##REG(SRCREG(op)));  \
210   COUNT_UNKNOWN_CYCLES(2);                        \
211211}
212static void pixt_ri_a(tms34010_state *tms, UINT16 op) { PIXT_RI(A); }
213static void pixt_ri_b(tms34010_state *tms, UINT16 op) { PIXT_RI(B); }
212void tms340x0_device::pixt_ri_a(UINT16 op) { PIXT_RI(A); }
213void tms340x0_device::pixt_ri_b(UINT16 op) { PIXT_RI(B); }
214214
215215#define PIXT_RIXY(R)                                                                \
216216{                                                                                   \
217   if (WINDOW_CHECKING(tms) != 0)                                                      \
217   if (WINDOW_CHECKING() != 0)                                                      \
218218   {                                                                               \
219      CLR_V(tms);                                                                     \
220      if (R##REG_X(tms,DSTREG(op)) < WSTART_X(tms) || R##REG_X(tms,DSTREG(op)) > WEND_X(tms) ||               \
221         R##REG_Y(tms,DSTREG(op)) < WSTART_Y(tms) || R##REG_Y(tms,DSTREG(op)) > WEND_Y(tms))             \
219      CLR_V();                                                                     \
220      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
221         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
222222      {                                                                           \
223         SET_V_LOG(tms, 1);                                                          \
223         SET_V_LOG(1);                                                          \
224224         goto skip;                                                              \
225225      }                                                                           \
226      if (WINDOW_CHECKING(tms) == 1) goto skip;                                       \
226      if (WINDOW_CHECKING() == 1) goto skip;                                       \
227227   }                                                                               \
228   WPIXEL(tms,DXYTOL(tms,R##REG_XY(tms,DSTREG(op))),R##REG(tms,SRCREG(op)));                               \
228   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),R##REG(SRCREG(op)));                               \
229229skip:                                                                               \
230   COUNT_UNKNOWN_CYCLES(tms,4);                                                        \
230   COUNT_UNKNOWN_CYCLES(4);                                                        \
231231}
232static void pixt_rixy_a(tms34010_state *tms, UINT16 op) { PIXT_RIXY(A); }
233static void pixt_rixy_b(tms34010_state *tms, UINT16 op) { PIXT_RIXY(B); }
232void tms340x0_device::pixt_rixy_a(UINT16 op) { PIXT_RIXY(A); }
233void tms340x0_device::pixt_rixy_b(UINT16 op) { PIXT_RIXY(B); }
234234
235235#define PIXT_IR(R)                                  \
236236{                                                   \
237   INT32 temp = RPIXEL(tms,R##REG(tms,SRCREG(op)));            \
238   CLR_V(tms);                                         \
239   R##REG(tms,DSTREG(op)) = temp;                          \
240   SET_V_LOG(tms, temp != 0);                          \
241   COUNT_CYCLES(tms,4);                                \
237   INT32 temp = RPIXEL(R##REG(SRCREG(op)));            \
238   CLR_V();                                         \
239   R##REG(DSTREG(op)) = temp;                          \
240   SET_V_LOG(temp != 0);                          \
241   COUNT_CYCLES(4);                                \
242242}
243static void pixt_ir_a(tms34010_state *tms, UINT16 op) { PIXT_IR(A); }
244static void pixt_ir_b(tms34010_state *tms, UINT16 op) { PIXT_IR(B); }
243void tms340x0_device::pixt_ir_a(UINT16 op) { PIXT_IR(A); }
244void tms340x0_device::pixt_ir_b(UINT16 op) { PIXT_IR(B); }
245245
246246#define PIXT_II(R)                                  \
247247{                                                   \
248   WPIXEL(tms,R##REG(tms,DSTREG(op)),RPIXEL(tms,R##REG(tms,SRCREG(op))));  \
249   COUNT_UNKNOWN_CYCLES(tms,4);                        \
248   WPIXEL(R##REG(DSTREG(op)),RPIXEL(R##REG(SRCREG(op))));  \
249   COUNT_UNKNOWN_CYCLES(4);                        \
250250}
251static void pixt_ii_a(tms34010_state *tms, UINT16 op) { PIXT_II(A); }
252static void pixt_ii_b(tms34010_state *tms, UINT16 op) { PIXT_II(B); }
251void tms340x0_device::pixt_ii_a(UINT16 op) { PIXT_II(A); }
252void tms340x0_device::pixt_ii_b(UINT16 op) { PIXT_II(B); }
253253
254254#define PIXT_IXYR(R)                                \
255255{                                                   \
256   INT32 temp = RPIXEL(tms,SXYTOL(tms,R##REG_XY(tms,SRCREG(op)))); \
257   CLR_V(tms);                                         \
258   R##REG(tms,DSTREG(op)) = temp;                          \
259   SET_V_LOG(tms, temp != 0);                          \
260   COUNT_CYCLES(tms,6);                                \
256   INT32 temp = RPIXEL(SXYTOL(R##REG_XY(SRCREG(op)))); \
257   CLR_V();                                         \
258   R##REG(DSTREG(op)) = temp;                          \
259   SET_V_LOG(temp != 0);                          \
260   COUNT_CYCLES(6);                                \
261261}
262static void pixt_ixyr_a(tms34010_state *tms, UINT16 op) { PIXT_IXYR(A); }
263static void pixt_ixyr_b(tms34010_state *tms, UINT16 op) { PIXT_IXYR(B); }
262void tms340x0_device::pixt_ixyr_a(UINT16 op) { PIXT_IXYR(A); }
263void tms340x0_device::pixt_ixyr_b(UINT16 op) { PIXT_IXYR(B); }
264264
265265#define PIXT_IXYIXY(R)                                                              \
266266{                                                                                   \
267   if (WINDOW_CHECKING(tms) != 0)                                                      \
267   if (WINDOW_CHECKING() != 0)                                                      \
268268   {                                                                               \
269      CLR_V(tms);                                                                     \
270      if (R##REG_X(tms,DSTREG(op)) < WSTART_X(tms) || R##REG_X(tms,DSTREG(op)) > WEND_X(tms) ||               \
271         R##REG_Y(tms,DSTREG(op)) < WSTART_Y(tms) || R##REG_Y(tms,DSTREG(op)) > WEND_Y(tms))             \
269      CLR_V();                                                                     \
270      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
271         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
272272      {                                                                           \
273         SET_V_LOG(tms, 1);                                                          \
273         SET_V_LOG(1);                                                          \
274274         goto skip;                                                              \
275275      }                                                                           \
276      if (WINDOW_CHECKING(tms) == 1) goto skip;                                       \
276      if (WINDOW_CHECKING() == 1) goto skip;                                       \
277277   }                                                                               \
278   WPIXEL(tms,DXYTOL(tms,R##REG_XY(tms,DSTREG(op))),RPIXEL(tms,SXYTOL(tms,R##REG_XY(tms,SRCREG(op)))));            \
278   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),RPIXEL(SXYTOL(R##REG_XY(SRCREG(op)))));            \
279279skip:                                                                               \
280   COUNT_UNKNOWN_CYCLES(tms,7);                                                        \
280   COUNT_UNKNOWN_CYCLES(7);                                                        \
281281}
282static void pixt_ixyixy_a(tms34010_state *tms, UINT16 op) { PIXT_IXYIXY(A); }
283static void pixt_ixyixy_b(tms34010_state *tms, UINT16 op) { PIXT_IXYIXY(B); }
282void tms340x0_device::pixt_ixyixy_a(UINT16 op) { PIXT_IXYIXY(A); }
283void tms340x0_device::pixt_ixyixy_b(UINT16 op) { PIXT_IXYIXY(B); }
284284
285285#define DRAV(R)                                                                     \
286286{                                                                                   \
287   if (WINDOW_CHECKING(tms) != 0)                                                      \
287   if (WINDOW_CHECKING() != 0)                                                      \
288288   {                                                                               \
289      CLR_V(tms);                                                                     \
290      if (R##REG_X(tms,DSTREG(op)) < WSTART_X(tms) || R##REG_X(tms,DSTREG(op)) > WEND_X(tms) ||               \
291         R##REG_Y(tms,DSTREG(op)) < WSTART_Y(tms) || R##REG_Y(tms,DSTREG(op)) > WEND_Y(tms))             \
289      CLR_V();                                                                     \
290      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
291         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
292292      {                                                                           \
293         SET_V_LOG(tms, 1);                                                          \
293         SET_V_LOG(1);                                                          \
294294         goto skip;                                                              \
295295      }                                                                           \
296      if (WINDOW_CHECKING(tms) == 1) goto skip;                                       \
296      if (WINDOW_CHECKING() == 1) goto skip;                                       \
297297   }                                                                               \
298   WPIXEL(tms,DXYTOL(tms,R##REG_XY(tms,DSTREG(op))),COLOR1(tms));                                      \
298   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),COLOR1());                                      \
299299skip:                                                                               \
300   R##REG_X(tms,DSTREG(op)) += R##REG_X(tms,SRCREG(op));                                           \
301   R##REG_Y(tms,DSTREG(op)) += R##REG_Y(tms,SRCREG(op));                                           \
302   COUNT_UNKNOWN_CYCLES(tms,4);                                                        \
300   R##REG_X(DSTREG(op)) += R##REG_X(SRCREG(op));                                           \
301   R##REG_Y(DSTREG(op)) += R##REG_Y(SRCREG(op));                                           \
302   COUNT_UNKNOWN_CYCLES(4);                                                        \
303303}
304static void drav_a(tms34010_state *tms, UINT16 op) { DRAV(A); }
305static void drav_b(tms34010_state *tms, UINT16 op) { DRAV(B); }
304void tms340x0_device::drav_a(UINT16 op) { DRAV(A); }
305void tms340x0_device::drav_b(UINT16 op) { DRAV(B); }
306306
307307
308308
r31176r31177
312312
313313#define ABS(R)                                              \
314314{                                                           \
315   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
315   INT32 *rd = &R##REG(DSTREG(op));                            \
316316   INT32 r = 0 - *rd;                                      \
317   CLR_NZV(tms);                                               \
317   CLR_NZV();                                               \
318318   if (r > 0) *rd = r;                                     \
319   SET_NZ_VAL(tms, r);                                         \
320   SET_V_LOG(tms, r == (INT32)0x80000000);                     \
321   COUNT_CYCLES(tms,1);                                        \
319   SET_NZ_VAL(r);                                         \
320   SET_V_LOG(r == (INT32)0x80000000);                     \
321   COUNT_CYCLES(1);                                        \
322322}
323static void abs_a(tms34010_state *tms, UINT16 op) { ABS(A); }
324static void abs_b(tms34010_state *tms, UINT16 op) { ABS(B); }
323void tms340x0_device::abs_a(UINT16 op) { ABS(A); }
324void tms340x0_device::abs_b(UINT16 op) { ABS(B); }
325325
326326#define ADD(R)                                              \
327327{                                                           \
328   INT32 a = R##REG(tms,SRCREG(op));                               \
329   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
328   INT32 a = R##REG(SRCREG(op));                               \
329   INT32 *rd = &R##REG(DSTREG(op));                            \
330330   INT32 b = *rd;                                          \
331331   INT32 r = a + b;                                        \
332   CLR_NCZV(tms);                                              \
332   CLR_NCZV();                                              \
333333   *rd = r;                                                \
334   SET_NZCV_ADD(tms,a,b,r);                                    \
335   COUNT_CYCLES(tms,1);                                        \
334   SET_NZCV_ADD(a,b,r);                                    \
335   COUNT_CYCLES(1);                                        \
336336}
337static void add_a(tms34010_state *tms, UINT16 op) { ADD(A); }
338static void add_b(tms34010_state *tms, UINT16 op) { ADD(B); }
337void tms340x0_device::add_a(UINT16 op) { ADD(A); }
338void tms340x0_device::add_b(UINT16 op) { ADD(B); }
339339
340340#define ADDC(R)                                             \
341341{                                                           \
342342   /* I'm not sure to which side the carry is added to, should */  \
343343   /* verify it against the examples */                    \
344   INT32 a = R##REG(tms,SRCREG(op));                               \
345   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
344   INT32 a = R##REG(SRCREG(op));                               \
345   INT32 *rd = &R##REG(DSTREG(op));                            \
346346   INT32 b = *rd;                                          \
347   INT32 r = a + b + (C_FLAG(tms) ? 1 : 0);                        \
348   CLR_NCZV(tms);                                              \
347   INT32 r = a + b + (C_FLAG() ? 1 : 0);                        \
348   CLR_NCZV();                                              \
349349   *rd = r;                                                \
350   SET_NZCV_ADD(tms,a,b,r);                                    \
351   COUNT_CYCLES(tms,1);                                        \
350   SET_NZCV_ADD(a,b,r);                                    \
351   COUNT_CYCLES(1);                                        \
352352}
353static void addc_a(tms34010_state *tms, UINT16 op) { ADDC(A); }
354static void addc_b(tms34010_state *tms, UINT16 op) { ADDC(B); }
353void tms340x0_device::addc_a(UINT16 op) { ADDC(A); }
354void tms340x0_device::addc_b(UINT16 op) { ADDC(B); }
355355
356356#define ADDI_W(R)                                           \
357357{                                                           \
358   INT32 a = PARAM_WORD(tms);                              \
359   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
358   INT32 a = PARAM_WORD();                              \
359   INT32 *rd = &R##REG(DSTREG(op));                            \
360360   INT32 b = *rd;                                          \
361361   INT32 r = a + b;                                        \
362   CLR_NCZV(tms);                                              \
362   CLR_NCZV();                                              \
363363   *rd = r;                                                \
364   SET_NZCV_ADD(tms,a,b,r);                                    \
365   COUNT_CYCLES(tms,2);                                        \
364   SET_NZCV_ADD(a,b,r);                                    \
365   COUNT_CYCLES(2);                                        \
366366}
367static void addi_w_a(tms34010_state *tms, UINT16 op) { ADDI_W(A); }
368static void addi_w_b(tms34010_state *tms, UINT16 op) { ADDI_W(B); }
367void tms340x0_device::addi_w_a(UINT16 op) { ADDI_W(A); }
368void tms340x0_device::addi_w_b(UINT16 op) { ADDI_W(B); }
369369
370370#define ADDI_L(R)                                           \
371371{                                                           \
372   INT32 a = PARAM_LONG(tms);                              \
373   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
372   INT32 a = PARAM_LONG();                              \
373   INT32 *rd = &R##REG(DSTREG(op));                            \
374374   INT32 b = *rd;                                          \
375375   INT32 r = a + b;                                        \
376   CLR_NCZV(tms);                                              \
376   CLR_NCZV();                                              \
377377   *rd = r;                                                \
378   SET_NZCV_ADD(tms,a,b,r);                                    \
379   COUNT_CYCLES(tms,3);                                        \
378   SET_NZCV_ADD(a,b,r);                                    \
379   COUNT_CYCLES(3);                                        \
380380}
381static void addi_l_a(tms34010_state *tms, UINT16 op) { ADDI_L(A); }
382static void addi_l_b(tms34010_state *tms, UINT16 op) { ADDI_L(B); }
381void tms340x0_device::addi_l_a(UINT16 op) { ADDI_L(A); }
382void tms340x0_device::addi_l_b(UINT16 op) { ADDI_L(B); }
383383
384384#define ADDK(R)                                             \
385385{                                                           \
386386   INT32 a = fw_inc[PARAM_K(op)];                              \
387   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
387   INT32 *rd = &R##REG(DSTREG(op));                            \
388388   INT32 b = *rd;                                          \
389389   INT32 r = a + b;                                        \
390   CLR_NCZV(tms);                                              \
390   CLR_NCZV();                                              \
391391   *rd = r;                                                \
392   SET_NZCV_ADD(tms,a,b,r);                                    \
393   COUNT_CYCLES(tms,1);                                        \
392   SET_NZCV_ADD(a,b,r);                                    \
393   COUNT_CYCLES(1);                                        \
394394}
395static void addk_a(tms34010_state *tms, UINT16 op) { ADDK(A); }
396static void addk_b(tms34010_state *tms, UINT16 op) { ADDK(B); }
395void tms340x0_device::addk_a(UINT16 op) { ADDK(A); }
396void tms340x0_device::addk_b(UINT16 op) { ADDK(B); }
397397
398398#define AND(R)                                              \
399399{                                                           \
400   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
401   CLR_Z(tms);                                                 \
402   *rd &= R##REG(tms,SRCREG(op));                                  \
403   SET_Z_VAL(tms, *rd);                                            \
404   COUNT_CYCLES(tms,1);                                        \
400   INT32 *rd = &R##REG(DSTREG(op));                            \
401   CLR_Z();                                                 \
402   *rd &= R##REG(SRCREG(op));                                  \
403   SET_Z_VAL(*rd);                                            \
404   COUNT_CYCLES(1);                                        \
405405}
406static void and_a(tms34010_state *tms, UINT16 op) { AND(A); }
407static void and_b(tms34010_state *tms, UINT16 op) { AND(B); }
406void tms340x0_device::and_a(UINT16 op) { AND(A); }
407void tms340x0_device::and_b(UINT16 op) { AND(B); }
408408
409409#define ANDI(R)                                             \
410410{                                                           \
411   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
412   CLR_Z(tms);                                                 \
413   *rd &= ~PARAM_LONG(tms);                                \
414   SET_Z_VAL(tms, *rd);                                            \
415   COUNT_CYCLES(tms,3);                                        \
411   INT32 *rd = &R##REG(DSTREG(op));                            \
412   CLR_Z();                                                 \
413   *rd &= ~PARAM_LONG();                                \
414   SET_Z_VAL(*rd);                                            \
415   COUNT_CYCLES(3);                                        \
416416}
417static void andi_a(tms34010_state *tms, UINT16 op) { ANDI(A); }
418static void andi_b(tms34010_state *tms, UINT16 op) { ANDI(B); }
417void tms340x0_device::andi_a(UINT16 op) { ANDI(A); }
418void tms340x0_device::andi_b(UINT16 op) { ANDI(B); }
419419
420420#define ANDN(R)                                             \
421421{                                                           \
422   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
423   CLR_Z(tms);                                                 \
424   *rd &= ~R##REG(tms,SRCREG(op));                                 \
425   SET_Z_VAL(tms, *rd);                                            \
426   COUNT_CYCLES(tms,1);                                        \
422   INT32 *rd = &R##REG(DSTREG(op));                            \
423   CLR_Z();                                                 \
424   *rd &= ~R##REG(SRCREG(op));                                 \
425   SET_Z_VAL(*rd);                                            \
426   COUNT_CYCLES(1);                                        \
427427}
428static void andn_a(tms34010_state *tms, UINT16 op) { ANDN(A); }
429static void andn_b(tms34010_state *tms, UINT16 op) { ANDN(B); }
428void tms340x0_device::andn_a(UINT16 op) { ANDN(A); }
429void tms340x0_device::andn_b(UINT16 op) { ANDN(B); }
430430
431431#define BTST_K(R)                                           \
432432{                                                           \
433433   int bit = 31 - PARAM_K(op);                                 \
434   CLR_Z(tms);                                                 \
434   CLR_Z();                                                 \
435435   if (bit <= 29)                                          \
436      SET_Z_BIT_LO(tms, ~R##REG(tms,DSTREG(op)), bit);                    \
436      SET_Z_BIT_LO(~R##REG(DSTREG(op)), bit);                    \
437437   else                                                    \
438      SET_Z_BIT_HI(tms, ~R##REG(tms,DSTREG(op)), bit);                    \
439   COUNT_CYCLES(tms,1);                                        \
438      SET_Z_BIT_HI(~R##REG(DSTREG(op)), bit);                    \
439   COUNT_CYCLES(1);                                        \
440440}
441static void btst_k_a(tms34010_state *tms, UINT16 op) { BTST_K(A); }
442static void btst_k_b(tms34010_state *tms, UINT16 op) { BTST_K(B); }
441void tms340x0_device::btst_k_a(UINT16 op) { BTST_K(A); }
442void tms340x0_device::btst_k_b(UINT16 op) { BTST_K(B); }
443443
444444#define BTST_R(R)                                           \
445445{                                                           \
446   int bit = R##REG(tms,SRCREG(op)) & 0x1f;                        \
447   CLR_Z(tms);                                                 \
446   int bit = R##REG(SRCREG(op)) & 0x1f;                        \
447   CLR_Z();                                                 \
448448   if (bit <= 29)                                          \
449      SET_Z_BIT_LO(tms, ~R##REG(tms,DSTREG(op)), bit);                    \
449      SET_Z_BIT_LO(~R##REG(DSTREG(op)), bit);                    \
450450   else                                                    \
451      SET_Z_BIT_HI(tms, ~R##REG(tms,DSTREG(op)), bit);                    \
452   COUNT_CYCLES(tms,2);                                        \
451      SET_Z_BIT_HI(~R##REG(DSTREG(op)), bit);                    \
452   COUNT_CYCLES(2);                                        \
453453}
454static void btst_r_a(tms34010_state *tms, UINT16 op) { BTST_R(A); }
455static void btst_r_b(tms34010_state *tms, UINT16 op) { BTST_R(B); }
454void tms340x0_device::btst_r_a(UINT16 op) { BTST_R(A); }
455void tms340x0_device::btst_r_b(UINT16 op) { BTST_R(B); }
456456
457static void clrc(tms34010_state *tms, UINT16 op)
457void tms340x0_device::clrc(UINT16 op)
458458{
459   CLR_C(tms);
460   COUNT_CYCLES(tms,1);
459   CLR_C();
460   COUNT_CYCLES(1);
461461}
462462
463463#define CMP(R)                                              \
464464{                                                           \
465   INT32 *rs = &R##REG(tms,SRCREG(op));                            \
466   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
465   INT32 *rs = &R##REG(SRCREG(op));                            \
466   INT32 *rd = &R##REG(DSTREG(op));                            \
467467   INT32 r = *rd - *rs;                                    \
468   CLR_NCZV(tms);                                              \
469   SET_NZCV_SUB(tms,*rd,*rs,r);                                \
470   COUNT_CYCLES(tms,1);                                        \
468   CLR_NCZV();                                              \
469   SET_NZCV_SUB(*rd,*rs,r);                                \
470   COUNT_CYCLES(1);                                        \
471471}
472static void cmp_a(tms34010_state *tms, UINT16 op) { CMP(A); }
473static void cmp_b(tms34010_state *tms, UINT16 op) { CMP(B); }
472void tms340x0_device::cmp_a(UINT16 op) { CMP(A); }
473void tms340x0_device::cmp_b(UINT16 op) { CMP(B); }
474474
475475#define CMPI_W(R)                                           \
476476{                                                           \
477   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
478   INT32 t = (INT16)~PARAM_WORD(tms);                      \
477   INT32 *rd = &R##REG(DSTREG(op));                            \
478   INT32 t = (INT16)~PARAM_WORD();                      \
479479   INT32 r = *rd - t;                                      \
480   CLR_NCZV(tms);                                              \
481   SET_NZCV_SUB(tms,*rd,t,r);                                  \
482   COUNT_CYCLES(tms,2);                                        \
480   CLR_NCZV();                                              \
481   SET_NZCV_SUB(*rd,t,r);                                  \
482   COUNT_CYCLES(2);                                        \
483483}
484static void cmpi_w_a(tms34010_state *tms, UINT16 op) { CMPI_W(A); }
485static void cmpi_w_b(tms34010_state *tms, UINT16 op) { CMPI_W(B); }
484void tms340x0_device::cmpi_w_a(UINT16 op) { CMPI_W(A); }
485void tms340x0_device::cmpi_w_b(UINT16 op) { CMPI_W(B); }
486486
487487#define CMPI_L(R)                                           \
488488{                                                           \
489   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
490   INT32 t = ~PARAM_LONG(tms);                             \
489   INT32 *rd = &R##REG(DSTREG(op));                            \
490   INT32 t = ~PARAM_LONG();                             \
491491   INT32 r = *rd - t;                                      \
492   CLR_NCZV(tms);                                              \
493   SET_NZCV_SUB(tms,*rd,t,r);                                  \
494   COUNT_CYCLES(tms,3);                                        \
492   CLR_NCZV();                                              \
493   SET_NZCV_SUB(*rd,t,r);                                  \
494   COUNT_CYCLES(3);                                        \
495495}
496static void cmpi_l_a(tms34010_state *tms, UINT16 op) { CMPI_L(A); }
497static void cmpi_l_b(tms34010_state *tms, UINT16 op) { CMPI_L(B); }
496void tms340x0_device::cmpi_l_a(UINT16 op) { CMPI_L(A); }
497void tms340x0_device::cmpi_l_b(UINT16 op) { CMPI_L(B); }
498498
499static void dint(tms34010_state *tms, UINT16 op)
499void tms340x0_device::dint(UINT16 op)
500500{
501   tms->st &= ~STBIT_IE;
502   COUNT_CYCLES(tms,3);
501   m_st &= ~STBIT_IE;
502   COUNT_CYCLES(3);
503503}
504504
505505#define DIVS(R)                                             \
506506{                                                           \
507   INT32 *rs  = &R##REG(tms,SRCREG(op));                           \
508   INT32 *rd1 = &R##REG(tms,DSTREG(op));                           \
509   CLR_NZV(tms);                                               \
507   INT32 *rs  = &R##REG(SRCREG(op));                           \
508   INT32 *rd1 = &R##REG(DSTREG(op));                           \
509   CLR_NZV();                                               \
510510   if (!(DSTREG(op) & 1))                                      \
511511   {                                                       \
512512      if (!*rs)                                           \
513513      {                                                   \
514         SET_V_LOG(tms, 1);                                  \
514         SET_V_LOG(1);                                  \
515515      }                                                   \
516516      else                                                \
517517      {                                                   \
518         INT32 *rd2 = &R##REG(tms,DSTREG(op)+1);                 \
518         INT32 *rd2 = &R##REG(DSTREG(op)+1);                 \
519519         INT64 dividend = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \
520520         INT64 quotient = dividend / *rs;                \
521521         INT32 remainder = dividend % *rs;               \
522522         UINT32 signbits = (INT32)quotient >> 31;        \
523523         if (EXTRACT_64HI(quotient) != signbits)         \
524524         {                                               \
525            SET_V_LOG(tms, 1);                              \
525            SET_V_LOG(1);                              \
526526         }                                               \
527527         else                                            \
528528         {                                               \
529529            *rd1 = quotient;                            \
530530            *rd2 = remainder;                           \
531            SET_NZ_VAL(tms, *rd1);                          \
531            SET_NZ_VAL(*rd1);                          \
532532         }                                               \
533533      }                                                   \
534      COUNT_CYCLES(tms,40);                                   \
534      COUNT_CYCLES(40);                                   \
535535   }                                                       \
536536   else                                                    \
537537   {                                                       \
538538      if (!*rs)                                           \
539539      {                                                   \
540         SET_V_LOG(tms, 1);                                  \
540         SET_V_LOG(1);                                  \
541541      }                                                   \
542542      else                                                \
543543      {                                                   \
544544         *rd1 /= *rs;                                    \
545         SET_NZ_VAL(tms, *rd1);                              \
545         SET_NZ_VAL(*rd1);                              \
546546      }                                                   \
547      COUNT_CYCLES(tms,39);                                   \
547      COUNT_CYCLES(39);                                   \
548548   }                                                       \
549549}
550static void divs_a(tms34010_state *tms, UINT16 op) { DIVS(A); }
551static void divs_b(tms34010_state *tms, UINT16 op) { DIVS(B); }
550void tms340x0_device::divs_a(UINT16 op) { DIVS(A); }
551void tms340x0_device::divs_b(UINT16 op) { DIVS(B); }
552552
553553#define DIVU(R)                                             \
554554{                                                           \
555   INT32 *rs  = &R##REG(tms,SRCREG(op));                           \
556   INT32 *rd1 = &R##REG(tms,DSTREG(op));                           \
557   CLR_ZV(tms);                                                    \
555   INT32 *rs  = &R##REG(SRCREG(op));                           \
556   INT32 *rd1 = &R##REG(DSTREG(op));                           \
557   CLR_ZV();                                                    \
558558   if (!(DSTREG(op) & 1))                                      \
559559   {                                                       \
560560      if (!*rs)                                           \
561561      {                                                   \
562         SET_V_LOG(tms, 1);                                  \
562         SET_V_LOG(1);                                  \
563563      }                                                   \
564564      else                                                \
565565      {                                                   \
566         INT32 *rd2 = &R##REG(tms,DSTREG(op)+1);                 \
566         INT32 *rd2 = &R##REG(DSTREG(op)+1);                 \
567567         UINT64 dividend  = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \
568568         UINT64 quotient  = dividend / (UINT32)*rs;      \
569569         UINT32 remainder = dividend % (UINT32)*rs;      \
570570         if (EXTRACT_64HI(quotient) != 0)                \
571571         {                                               \
572            SET_V_LOG(tms, 1);                              \
572            SET_V_LOG(1);                              \
573573         }                                               \
574574         else                                            \
575575         {                                               \
576576            *rd1 = quotient;                            \
577577            *rd2 = remainder;                           \
578            SET_Z_VAL(tms, *rd1);                           \
578            SET_Z_VAL(*rd1);                           \
579579         }                                               \
580580      }                                                   \
581581   }                                                       \
r31176r31177
583583   {                                                       \
584584      if (!*rs)                                           \
585585      {                                                   \
586         SET_V_LOG(tms, 1);                                  \
586         SET_V_LOG(1);                                  \
587587      }                                                   \
588588      else                                                \
589589      {                                                   \
590590         *rd1 = (UINT32)*rd1 / (UINT32)*rs;              \
591         SET_Z_VAL(tms, *rd1);                               \
591         SET_Z_VAL(*rd1);                               \
592592      }                                                   \
593593   }                                                       \
594   COUNT_CYCLES(tms,37);                                       \
594   COUNT_CYCLES(37);                                       \
595595}
596static void divu_a(tms34010_state *tms, UINT16 op) { DIVU(A); }
597static void divu_b(tms34010_state *tms, UINT16 op) { DIVU(B); }
596void tms340x0_device::divu_a(UINT16 op) { DIVU(A); }
597void tms340x0_device::divu_b(UINT16 op) { DIVU(B); }
598598
599static void eint(tms34010_state *tms, UINT16 op)
599void tms340x0_device::eint(UINT16 op)
600600{
601   tms->st |= STBIT_IE;
602   check_interrupt(tms);
603   COUNT_CYCLES(tms,3);
601   m_st |= STBIT_IE;
602   check_interrupt();
603   COUNT_CYCLES(3);
604604}
605605
606606#define EXGF(F,R)                                               \
607607{                                                               \
608608   UINT8 shift = F ? 6 : 0;                                    \
609   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
610   UINT32 temp = (tms->st >> shift) & 0x3f;                    \
611   tms->st &= ~(0x3f << shift);                                \
612   tms->st |= (*rd & 0x3f) << shift;                           \
609   INT32 *rd = &R##REG(DSTREG(op));                                \
610   UINT32 temp = (m_st >> shift) & 0x3f;                    \
611   m_st &= ~(0x3f << shift);                                \
612   m_st |= (*rd & 0x3f) << shift;                           \
613613   *rd = temp;                                                 \
614   COUNT_CYCLES(tms,1);                                            \
614   COUNT_CYCLES(1);                                            \
615615}
616static void exgf0_a(tms34010_state *tms, UINT16 op) { EXGF(0,A); }
617static void exgf0_b(tms34010_state *tms, UINT16 op) { EXGF(0,B); }
618static void exgf1_a(tms34010_state *tms, UINT16 op) { EXGF(1,A); }
619static void exgf1_b(tms34010_state *tms, UINT16 op) { EXGF(1,B); }
616void tms340x0_device::exgf0_a(UINT16 op) { EXGF(0,A); }
617void tms340x0_device::exgf0_b(UINT16 op) { EXGF(0,B); }
618void tms340x0_device::exgf1_a(UINT16 op) { EXGF(1,A); }
619void tms340x0_device::exgf1_b(UINT16 op) { EXGF(1,B); }
620620
621621#define LMO(R)                                                  \
622622{                                                               \
623623   UINT32 res = 0;                                             \
624   UINT32 rs  = R##REG(tms,SRCREG(op));                                \
625      INT32 *rd = &R##REG(tms,DSTREG(op));                                \
626   CLR_Z(tms);                                                     \
627   SET_Z_VAL(tms, rs);                                             \
624   UINT32 rs  = R##REG(SRCREG(op));                                \
625      INT32 *rd = &R##REG(DSTREG(op));                                \
626   CLR_Z();                                                     \
627   SET_Z_VAL(rs);                                             \
628628   if (rs)                                                     \
629629   {                                                           \
630630      while (!(rs & 0x80000000))                              \
r31176r31177
634634      }                                                       \
635635   }                                                           \
636636   *rd = res;                                                  \
637   COUNT_CYCLES(tms,1);                                            \
637   COUNT_CYCLES(1);                                            \
638638}
639static void lmo_a(tms34010_state *tms, UINT16 op) { LMO(A); }
640static void lmo_b(tms34010_state *tms, UINT16 op) { LMO(B); }
639void tms340x0_device::lmo_a(UINT16 op) { LMO(A); }
640void tms340x0_device::lmo_b(UINT16 op) { LMO(B); }
641641
642642#define MMFM(R)                                                 \
643643{                                                               \
644644   INT32 i;                                                    \
645   UINT16 l = (UINT16) PARAM_WORD(tms);                        \
646   COUNT_CYCLES(tms,3);                                            \
645   UINT16 l = (UINT16) PARAM_WORD();                        \
646   COUNT_CYCLES(3);                                            \
647647   {                                                           \
648648      INT32 rd = DSTREG(op);                                      \
649649      for (i = 15; i >= 0 ; i--)                              \
650650      {                                                       \
651651         if (l & 0x8000)                                     \
652652         {                                                   \
653            R##REG(tms,i) = RLONG(tms, R##REG(tms,rd));                 \
654            R##REG(tms,rd) += 0x20;                             \
655            COUNT_CYCLES(tms,4);                                \
653            R##REG(i) = RLONG(R##REG(rd));                 \
654            R##REG(rd) += 0x20;                             \
655            COUNT_CYCLES(4);                                \
656656         }                                                   \
657657         l <<= 1;                                            \
658658      }                                                       \
659659   }                                                           \
660660}
661static void mmfm_a(tms34010_state *tms, UINT16 op) { MMFM(A); }
662static void mmfm_b(tms34010_state *tms, UINT16 op) { MMFM(B); }
661void tms340x0_device::mmfm_a(UINT16 op) { MMFM(A); }
662void tms340x0_device::mmfm_b(UINT16 op) { MMFM(B); }
663663
664664#define MMTM(R)                                                 \
665665{                                                               \
666666   UINT32 i;                                                   \
667   UINT16 l = (UINT16) PARAM_WORD(tms);                        \
668   COUNT_CYCLES(tms,2);                                            \
667   UINT16 l = (UINT16) PARAM_WORD();                        \
668   COUNT_CYCLES(2);                                            \
669669   {                                                           \
670670      INT32 rd = DSTREG(op);                                      \
671      if (tms->is_34020)                                      \
671      if (m_is_34020)                                      \
672672      {                                                       \
673         CLR_N(tms);                                             \
674         SET_N_VAL(tms, R##REG(tms,rd) ^ 0x80000000);                    \
673         CLR_N();                                             \
674         SET_N_VAL(R##REG(rd) ^ 0x80000000);                    \
675675      }                                                       \
676676      for (i = 0; i  < 16; i++)                               \
677677      {                                                       \
678678         if (l & 0x8000)                                     \
679679         {                                                   \
680            R##REG(tms,rd) -= 0x20;                             \
681            WLONG(tms, R##REG(tms,rd),R##REG(tms,i));                   \
682            COUNT_CYCLES(tms,4);                                \
680            R##REG(rd) -= 0x20;                             \
681            WLONG(R##REG(rd),R##REG(i));                   \
682            COUNT_CYCLES(4);                                \
683683         }                                                   \
684684         l <<= 1;                                            \
685685      }                                                       \
686686   }                                                           \
687687}
688static void mmtm_a(tms34010_state *tms, UINT16 op) { MMTM(A); }
689static void mmtm_b(tms34010_state *tms, UINT16 op) { MMTM(B); }
688void tms340x0_device::mmtm_a(UINT16 op) { MMTM(A); }
689void tms340x0_device::mmtm_b(UINT16 op) { MMTM(B); }
690690
691691#define MODS(R)                                                 \
692692{                                                               \
693   INT32 *rs = &R##REG(tms,SRCREG(op));                                \
694   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
695   CLR_NZV(tms);                                                   \
693   INT32 *rs = &R##REG(SRCREG(op));                                \
694   INT32 *rd = &R##REG(DSTREG(op));                                \
695   CLR_NZV();                                                   \
696696   if (*rs != 0)                                               \
697697   {                                                           \
698698      *rd %= *rs;                                             \
699      SET_NZ_VAL(tms, *rd);                                       \
699      SET_NZ_VAL(*rd);                                       \
700700   }                                                           \
701701   else                                                        \
702      SET_V_LOG(tms, 1);                                          \
703   COUNT_CYCLES(tms,40);                                           \
702      SET_V_LOG(1);                                          \
703   COUNT_CYCLES(40);                                           \
704704}
705static void mods_a(tms34010_state *tms, UINT16 op) { MODS(A); }
706static void mods_b(tms34010_state *tms, UINT16 op) { MODS(B); }
705void tms340x0_device::mods_a(UINT16 op) { MODS(A); }
706void tms340x0_device::mods_b(UINT16 op) { MODS(B); }
707707
708708#define MODU(R)                                                 \
709709{                                                               \
710   INT32 *rs = &R##REG(tms,SRCREG(op));                                \
711   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
712   CLR_ZV(tms);                                                        \
710   INT32 *rs = &R##REG(SRCREG(op));                                \
711   INT32 *rd = &R##REG(DSTREG(op));                                \
712   CLR_ZV();                                                        \
713713   if (*rs != 0)                                               \
714714   {                                                           \
715715      *rd = (UINT32)*rd % (UINT32)*rs;                        \
716      SET_Z_VAL(tms, *rd);                                            \
716      SET_Z_VAL(*rd);                                            \
717717   }                                                           \
718718   else                                                        \
719      SET_V_LOG(tms, 1);                                          \
720   COUNT_CYCLES(tms,35);                                           \
719      SET_V_LOG(1);                                          \
720   COUNT_CYCLES(35);                                           \
721721}
722static void modu_a(tms34010_state *tms, UINT16 op) { MODU(A); }
723static void modu_b(tms34010_state *tms, UINT16 op) { MODU(B); }
722void tms340x0_device::modu_a(UINT16 op) { MODU(A); }
723void tms340x0_device::modu_b(UINT16 op) { MODU(B); }
724724
725725#define MPYS(R)                                                 \
726726{                                                               \
727   INT32 *rd1 = &R##REG(tms,DSTREG(op));                               \
728   INT32 m1 = R##REG(tms,SRCREG(op));                                  \
727   INT32 *rd1 = &R##REG(DSTREG(op));                               \
728   INT32 m1 = R##REG(SRCREG(op));                                  \
729729   INT64 product;                                              \
730730                                                \
731   SEXTEND(m1, FW(tms,1));                                         \
732   CLR_NZ(tms);                                                        \
731   SEXTEND(m1, FW(1));                                         \
732   CLR_NZ();                                                        \
733733   product = mul_32x32(m1, *rd1);                          \
734   SET_Z_LOG(tms, product == 0);                                   \
735   SET_N_BIT(tms, product >> 32, 31);                              \
734   SET_Z_LOG(product == 0);                                   \
735   SET_N_BIT(product >> 32, 31);                              \
736736                                                \
737737   *rd1             = EXTRACT_64HI(product);                       \
738   R##REG(tms,DSTREG(op)|1) = EXTRACT_64LO(product);                       \
738   R##REG(DSTREG(op)|1) = EXTRACT_64LO(product);                       \
739739                                                \
740   COUNT_CYCLES(tms,20);                                           \
740   COUNT_CYCLES(20);                                           \
741741}
742static void mpys_a(tms34010_state *tms, UINT16 op) { MPYS(A); }
743static void mpys_b(tms34010_state *tms, UINT16 op) { MPYS(B); }
742void tms340x0_device::mpys_a(UINT16 op) { MPYS(A); }
743void tms340x0_device::mpys_b(UINT16 op) { MPYS(B); }
744744
745745#define MPYU(R)                                                 \
746746{                                                               \
747   INT32 *rd1 = &R##REG(tms,DSTREG(op));                               \
748   UINT32 m1 = R##REG(tms,SRCREG(op));                                 \
747   INT32 *rd1 = &R##REG(DSTREG(op));                               \
748   UINT32 m1 = R##REG(SRCREG(op));                                 \
749749   UINT64 product;                                             \
750750                                                \
751   ZEXTEND(m1, FW(tms,1));                                         \
752   CLR_Z(tms);                                                     \
751   ZEXTEND(m1, FW(1));                                         \
752   CLR_Z();                                                     \
753753   product = mulu_32x32(m1, *rd1);                     \
754   SET_Z_LOG(tms, product == 0);                                   \
754   SET_Z_LOG(product == 0);                                   \
755755                                                \
756756   *rd1             = EXTRACT_64HI(product);                       \
757   R##REG(tms,DSTREG(op)|1) = EXTRACT_64LO(product);                       \
757   R##REG(DSTREG(op)|1) = EXTRACT_64LO(product);                       \
758758                                                \
759   COUNT_CYCLES(tms,21);                                           \
759   COUNT_CYCLES(21);                                           \
760760}
761static void mpyu_a(tms34010_state *tms, UINT16 op) { MPYU(A); }
762static void mpyu_b(tms34010_state *tms, UINT16 op) { MPYU(B); }
761void tms340x0_device::mpyu_a(UINT16 op) { MPYU(A); }
762void tms340x0_device::mpyu_b(UINT16 op) { MPYU(B); }
763763
764764#define NEG(R)                                                  \
765765{                                                               \
766   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
766   INT32 *rd = &R##REG(DSTREG(op));                                \
767767   INT32 r = 0 - *rd;                                          \
768   CLR_NCZV(tms);                                                  \
769   SET_NZCV_SUB(tms,0,*rd,r);                                      \
768   CLR_NCZV();                                                  \
769   SET_NZCV_SUB(0,*rd,r);                                      \
770770   *rd = r;                                                    \
771   COUNT_CYCLES(tms,1);                                            \
771   COUNT_CYCLES(1);                                            \
772772}
773static void neg_a(tms34010_state *tms, UINT16 op) { NEG(A); }
774static void neg_b(tms34010_state *tms, UINT16 op) { NEG(B); }
773void tms340x0_device::neg_a(UINT16 op) { NEG(A); }
774void tms340x0_device::neg_b(UINT16 op) { NEG(B); }
775775
776776#define NEGB(R)                                                 \
777777{                                                               \
778   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
779   INT32 t = *rd + (C_FLAG(tms) ? 1 : 0);                          \
778   INT32 *rd = &R##REG(DSTREG(op));                                \
779   INT32 t = *rd + (C_FLAG() ? 1 : 0);                          \
780780   INT32 r = 0 - t;                                            \
781   CLR_NCZV(tms);                                                  \
782   SET_NZCV_SUB(tms,0,t,r);                                        \
781   CLR_NCZV();                                                  \
782   SET_NZCV_SUB(0,t,r);                                        \
783783   *rd = r;                                                    \
784   COUNT_CYCLES(tms,1);                                            \
784   COUNT_CYCLES(1);                                            \
785785}
786static void negb_a(tms34010_state *tms, UINT16 op) { NEGB(A); }
787static void negb_b(tms34010_state *tms, UINT16 op) { NEGB(B); }
786void tms340x0_device::negb_a(UINT16 op) { NEGB(A); }
787void tms340x0_device::negb_b(UINT16 op) { NEGB(B); }
788788
789static void nop(tms34010_state *tms, UINT16 op)
789void tms340x0_device::nop(UINT16 op)
790790{
791   COUNT_CYCLES(tms,1);
791   COUNT_CYCLES(1);
792792}
793793
794794#define NOT(R)                                                  \
795795{                                                               \
796   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
797   CLR_Z(tms);                                                     \
796   INT32 *rd = &R##REG(DSTREG(op));                                \
797   CLR_Z();                                                     \
798798   *rd = ~(*rd);                                               \
799   SET_Z_VAL(tms, *rd);                                                \
800   COUNT_CYCLES(tms,1);                                            \
799   SET_Z_VAL(*rd);                                                \
800   COUNT_CYCLES(1);                                            \
801801}
802static void not_a(tms34010_state *tms, UINT16 op) { NOT(A); }
803static void not_b(tms34010_state *tms, UINT16 op) { NOT(B); }
802void tms340x0_device::not_a(UINT16 op) { NOT(A); }
803void tms340x0_device::not_b(UINT16 op) { NOT(B); }
804804
805805#define OR(R)                                                   \
806806{                                                               \
807   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
808   CLR_Z(tms);                                                     \
809   *rd |= R##REG(tms,SRCREG(op));                                      \
810   SET_Z_VAL(tms, *rd);                                                \
811   COUNT_CYCLES(tms,1);                                            \
807   INT32 *rd = &R##REG(DSTREG(op));                                \
808   CLR_Z();                                                     \
809   *rd |= R##REG(SRCREG(op));                                      \
810   SET_Z_VAL(*rd);                                                \
811   COUNT_CYCLES(1);                                            \
812812}
813static void or_a(tms34010_state *tms, UINT16 op) { OR(A); }
814static void or_b(tms34010_state *tms, UINT16 op) { OR(B); }
813void tms340x0_device::or_a(UINT16 op) { OR(A); }
814void tms340x0_device::or_b(UINT16 op) { OR(B); }
815815
816816#define ORI(R)                                                  \
817817{                                                               \
818   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
819   CLR_Z(tms);                                                     \
820   *rd |= PARAM_LONG(tms);                                     \
821   SET_Z_VAL(tms, *rd);                                                \
822   COUNT_CYCLES(tms,3);                                            \
818   INT32 *rd = &R##REG(DSTREG(op));                                \
819   CLR_Z();                                                     \
820   *rd |= PARAM_LONG();                                     \
821   SET_Z_VAL(*rd);                                                \
822   COUNT_CYCLES(3);                                            \
823823}
824static void ori_a(tms34010_state *tms, UINT16 op) { ORI(A); }
825static void ori_b(tms34010_state *tms, UINT16 op) { ORI(B); }
824void tms340x0_device::ori_a(UINT16 op) { ORI(A); }
825void tms340x0_device::ori_b(UINT16 op) { ORI(B); }
826826
827static void setc(tms34010_state *tms, UINT16 op)
827void tms340x0_device::setc(UINT16 op)
828828{
829   SET_C_LOG(tms, 1);
830   COUNT_CYCLES(tms,1);
829   SET_C_LOG(1);
830   COUNT_CYCLES(1);
831831}
832832
833833#define SETF(F)                                                 \
834834{                                                               \
835835   UINT8 shift = F ? 6 : 0;                                    \
836   tms->st &= ~(0x3f << shift);                                \
837   tms->st |= (op & 0x3f) << shift;                        \
838   COUNT_CYCLES(tms,1+F);                                          \
836   m_st &= ~(0x3f << shift);                                \
837   m_st |= (op & 0x3f) << shift;                        \
838   COUNT_CYCLES(1+F);                                          \
839839}
840static void setf0(tms34010_state *tms, UINT16 op) { SETF(0); }
841static void setf1(tms34010_state *tms, UINT16 op) { SETF(1); }
840void tms340x0_device::setf0(UINT16 op) { SETF(0); }
841void tms340x0_device::setf1(UINT16 op) { SETF(1); }
842842
843843#define SEXT(F,R)                                               \
844844{                                                               \
845   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
846   CLR_NZ(tms);                                                        \
847   SEXTEND(*rd,FW(tms,F));                                         \
848   SET_NZ_VAL(tms, *rd);                                           \
849   COUNT_CYCLES(tms,3);                                            \
845   INT32 *rd = &R##REG(DSTREG(op));                                \
846   CLR_NZ();                                                        \
847   SEXTEND(*rd,FW(F));                                         \
848   SET_NZ_VAL(*rd);                                           \
849   COUNT_CYCLES(3);                                            \
850850}
851static void sext0_a(tms34010_state *tms, UINT16 op) { SEXT(0,A); }
852static void sext0_b(tms34010_state *tms, UINT16 op) { SEXT(0,B); }
853static void sext1_a(tms34010_state *tms, UINT16 op) { SEXT(1,A); }
854static void sext1_b(tms34010_state *tms, UINT16 op) { SEXT(1,B); }
851void tms340x0_device::sext0_a(UINT16 op) { SEXT(0,A); }
852void tms340x0_device::sext0_b(UINT16 op) { SEXT(0,B); }
853void tms340x0_device::sext1_a(UINT16 op) { SEXT(1,A); }
854void tms340x0_device::sext1_b(UINT16 op) { SEXT(1,B); }
855855
856856#define RL(R,K)                                                 \
857857{                                                               \
858   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
858   INT32 *rd = &R##REG(DSTREG(op));                                \
859859   INT32 res = *rd;                                            \
860860   INT32 k = (K);                                              \
861   CLR_CZ(tms);                                                        \
861   CLR_CZ();                                                        \
862862   if (k)                                                      \
863863   {                                                           \
864864      res<<=(k-1);                                            \
865      SET_C_BIT_HI(tms, res, 31);                                 \
865      SET_C_BIT_HI(res, 31);                                 \
866866      res<<=1;                                                \
867867      res |= (((UINT32)*rd)>>((-k)&0x1f));                    \
868868      *rd = res;                                              \
869869   }                                                           \
870   SET_Z_VAL(tms, res);                                                \
871   COUNT_CYCLES(tms,1);                                            \
870   SET_Z_VAL(res);                                                \
871   COUNT_CYCLES(1);                                            \
872872}
873static void rl_k_a(tms34010_state *tms, UINT16 op) { RL(A,PARAM_K(op)); }
874static void rl_k_b(tms34010_state *tms, UINT16 op) { RL(B,PARAM_K(op)); }
875static void rl_r_a(tms34010_state *tms, UINT16 op) { RL(A,AREG(tms,SRCREG(op))&0x1f); }
876static void rl_r_b(tms34010_state *tms, UINT16 op) { RL(B,BREG(tms,SRCREG(op))&0x1f); }
873void tms340x0_device::rl_k_a(UINT16 op) { RL(A,PARAM_K(op)); }
874void tms340x0_device::rl_k_b(UINT16 op) { RL(B,PARAM_K(op)); }
875void tms340x0_device::rl_r_a(UINT16 op) { RL(A,AREG(SRCREG(op))&0x1f); }
876void tms340x0_device::rl_r_b(UINT16 op) { RL(B,BREG(SRCREG(op))&0x1f); }
877877
878878#define SLA(R,K)                                                \
879879{                                                               \
880      INT32 *rd = &R##REG(tms,DSTREG(op));                                \
880      INT32 *rd = &R##REG(DSTREG(op));                                \
881881   UINT32 res = *rd;                                           \
882882      INT32 k = K;                                                \
883   CLR_NCZV(tms);                                                  \
883   CLR_NCZV();                                                  \
884884   if (k)                                                      \
885885   {                                                           \
886886      UINT32 mask = (0xffffffff<<(31-k))&0x7fffffff;          \
887887      UINT32 res2 = SIGN(res) ? res^mask : res;               \
888      SET_V_LOG(tms, (res2 & mask) != 0);                         \
888      SET_V_LOG((res2 & mask) != 0);                         \
889889                                                \
890890      res<<=(k-1);                                            \
891      SET_C_BIT_HI(tms, res, 31);                                 \
891      SET_C_BIT_HI(res, 31);                                 \
892892      res<<=1;                                                \
893893      *rd = res;                                              \
894894   }                                                           \
895   SET_NZ_VAL(tms, res);                                           \
896   COUNT_CYCLES(tms,3);                                            \
895   SET_NZ_VAL(res);                                           \
896   COUNT_CYCLES(3);                                            \
897897}
898static void sla_k_a(tms34010_state *tms, UINT16 op) { SLA(A,PARAM_K(op)); }
899static void sla_k_b(tms34010_state *tms, UINT16 op) { SLA(B,PARAM_K(op)); }
900static void sla_r_a(tms34010_state *tms, UINT16 op) { SLA(A,AREG(tms,SRCREG(op))&0x1f); }
901static void sla_r_b(tms34010_state *tms, UINT16 op) { SLA(B,BREG(tms,SRCREG(op))&0x1f); }
898void tms340x0_device::sla_k_a(UINT16 op) { SLA(A,PARAM_K(op)); }
899void tms340x0_device::sla_k_b(UINT16 op) { SLA(B,PARAM_K(op)); }
900void tms340x0_device::sla_r_a(UINT16 op) { SLA(A,AREG(SRCREG(op))&0x1f); }
901void tms340x0_device::sla_r_b(UINT16 op) { SLA(B,BREG(SRCREG(op))&0x1f); }
902902
903903#define SLL(R,K)                                                \
904904{                                                               \
905      INT32 *rd = &R##REG(tms,DSTREG(op));                                \
905      INT32 *rd = &R##REG(DSTREG(op));                                \
906906   UINT32 res = *rd;                                           \
907907      INT32 k = K;                                                \
908   CLR_CZ(tms);                                                        \
908   CLR_CZ();                                                        \
909909   if (k)                                                      \
910910   {                                                           \
911911      res<<=(k-1);                                            \
912      SET_C_BIT_HI(tms, res, 31);                                 \
912      SET_C_BIT_HI(res, 31);                                 \
913913      res<<=1;                                                \
914914      *rd = res;                                              \
915915   }                                                           \
916   SET_Z_VAL(tms, res);                                                \
917   COUNT_CYCLES(tms,1);                                            \
916   SET_Z_VAL(res);                                                \
917   COUNT_CYCLES(1);                                            \
918918}
919static void sll_k_a(tms34010_state *tms, UINT16 op) { SLL(A,PARAM_K(op)); }
920static void sll_k_b(tms34010_state *tms, UINT16 op) { SLL(B,PARAM_K(op)); }
921static void sll_r_a(tms34010_state *tms, UINT16 op) { SLL(A,AREG(tms,SRCREG(op))&0x1f); }
922static void sll_r_b(tms34010_state *tms, UINT16 op) { SLL(B,BREG(tms,SRCREG(op))&0x1f); }
919void tms340x0_device::sll_k_a(UINT16 op) { SLL(A,PARAM_K(op)); }
920void tms340x0_device::sll_k_b(UINT16 op) { SLL(B,PARAM_K(op)); }
921void tms340x0_device::sll_r_a(UINT16 op) { SLL(A,AREG(SRCREG(op))&0x1f); }
922void tms340x0_device::sll_r_b(UINT16 op) { SLL(B,BREG(SRCREG(op))&0x1f); }
923923
924924#define SRA(R,K)                                                \
925925{                                                               \
926   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
926   INT32 *rd = &R##REG(DSTREG(op));                                \
927927   INT32 res = *rd;                                            \
928928   INT32 k = (-(K)) & 0x1f;                                    \
929   CLR_NCZ(tms);                                                   \
929   CLR_NCZ();                                                   \
930930   if (k)                                                      \
931931   {                                                           \
932932      res>>=(k-1);                                            \
933      SET_C_BIT_LO(tms, res, 0);                                  \
933      SET_C_BIT_LO(res, 0);                                  \
934934      res>>=1;                                                \
935935      *rd = res;                                              \
936936   }                                                           \
937   SET_NZ_VAL(tms, res);                                           \
938   COUNT_CYCLES(tms,1);                                            \
937   SET_NZ_VAL(res);                                           \
938   COUNT_CYCLES(1);                                            \
939939}
940static void sra_k_a(tms34010_state *tms, UINT16 op) { SRA(A,PARAM_K(op)); }
941static void sra_k_b(tms34010_state *tms, UINT16 op) { SRA(B,PARAM_K(op)); }
942static void sra_r_a(tms34010_state *tms, UINT16 op) { SRA(A,AREG(tms,SRCREG(op))); }
943static void sra_r_b(tms34010_state *tms, UINT16 op) { SRA(B,BREG(tms,SRCREG(op))); }
940void tms340x0_device::sra_k_a(UINT16 op) { SRA(A,PARAM_K(op)); }
941void tms340x0_device::sra_k_b(UINT16 op) { SRA(B,PARAM_K(op)); }
942void tms340x0_device::sra_r_a(UINT16 op) { SRA(A,AREG(SRCREG(op))); }
943void tms340x0_device::sra_r_b(UINT16 op) { SRA(B,BREG(SRCREG(op))); }
944944
945945#define SRL(R,K)                                                \
946946{                                                               \
947      INT32 *rd = &R##REG(tms,DSTREG(op));                                \
947      INT32 *rd = &R##REG(DSTREG(op));                                \
948948   UINT32 res = *rd;                                           \
949949      INT32 k = (-(K)) & 0x1f;                                    \
950   CLR_CZ(tms);                                                        \
950   CLR_CZ();                                                        \
951951   if (k)                                                      \
952952   {                                                           \
953953      res>>=(k-1);                                            \
954      SET_C_BIT_LO(tms, res, 0);                                  \
954      SET_C_BIT_LO(res, 0);                                  \
955955      res>>=1;                                                \
956956      *rd = res;                                              \
957957   }                                                           \
958   SET_Z_VAL(tms, res);                                                \
959   COUNT_CYCLES(tms,1);                                            \
958   SET_Z_VAL(res);                                                \
959   COUNT_CYCLES(1);                                            \
960960}
961static void srl_k_a(tms34010_state *tms, UINT16 op) { SRL(A,PARAM_K(op)); }
962static void srl_k_b(tms34010_state *tms, UINT16 op) { SRL(B,PARAM_K(op)); }
963static void srl_r_a(tms34010_state *tms, UINT16 op) { SRL(A,AREG(tms,SRCREG(op))); }
964static void srl_r_b(tms34010_state *tms, UINT16 op) { SRL(B,BREG(tms,SRCREG(op))); }
961void tms340x0_device::srl_k_a(UINT16 op) { SRL(A,PARAM_K(op)); }
962void tms340x0_device::srl_k_b(UINT16 op) { SRL(B,PARAM_K(op)); }
963void tms340x0_device::srl_r_a(UINT16 op) { SRL(A,AREG(SRCREG(op))); }
964void tms340x0_device::srl_r_b(UINT16 op) { SRL(B,BREG(SRCREG(op))); }
965965
966966#define SUB(R)                                                  \
967967{                                                               \
968   INT32 *rs = &R##REG(tms,SRCREG(op));                                \
969   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
968   INT32 *rs = &R##REG(SRCREG(op));                                \
969   INT32 *rd = &R##REG(DSTREG(op));                                \
970970   INT32 r = *rd - *rs;                                        \
971   CLR_NCZV(tms);                                                  \
972   SET_NZCV_SUB(tms,*rd,*rs,r);                                    \
971   CLR_NCZV();                                                  \
972   SET_NZCV_SUB(*rd,*rs,r);                                    \
973973   *rd = r;                                                    \
974   COUNT_CYCLES(tms,1);                                            \
974   COUNT_CYCLES(1);                                            \
975975}
976static void sub_a(tms34010_state *tms, UINT16 op) { SUB(A); }
977static void sub_b(tms34010_state *tms, UINT16 op) { SUB(B); }
976void tms340x0_device::sub_a(UINT16 op) { SUB(A); }
977void tms340x0_device::sub_b(UINT16 op) { SUB(B); }
978978
979979#define SUBB(R)                                                 \
980980{                                                               \
981   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
982   INT32 t = R##REG(tms,SRCREG(op));                                   \
983   INT32 r = *rd - t - (C_FLAG(tms) ? 1 : 0);                      \
984   CLR_NCZV(tms);                                                  \
985   SET_NZCV_SUB(tms,*rd,t,r);                                      \
981   INT32 *rd = &R##REG(DSTREG(op));                                \
982   INT32 t = R##REG(SRCREG(op));                                   \
983   INT32 r = *rd - t - (C_FLAG() ? 1 : 0);                      \
984   CLR_NCZV();                                                  \
985   SET_NZCV_SUB(*rd,t,r);                                      \
986986   *rd = r;                                                    \
987   COUNT_CYCLES(tms,1);                                            \
987   COUNT_CYCLES(1);                                            \
988988}
989static void subb_a(tms34010_state *tms, UINT16 op) { SUBB(A); }
990static void subb_b(tms34010_state *tms, UINT16 op) { SUBB(B); }
989void tms340x0_device::subb_a(UINT16 op) { SUBB(A); }
990void tms340x0_device::subb_b(UINT16 op) { SUBB(B); }
991991
992992#define SUBI_W(R)                                               \
993993{                                                               \
994   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
994   INT32 *rd = &R##REG(DSTREG(op));                                \
995995   INT32 r;                                                    \
996   INT32 t = ~PARAM_WORD(tms);                                 \
997   CLR_NCZV(tms);                                                  \
996   INT32 t = ~PARAM_WORD();                                 \
997   CLR_NCZV();                                                  \
998998   r = *rd - t;                                                \
999   SET_NZCV_SUB(tms,*rd,t,r);                                      \
999   SET_NZCV_SUB(*rd,t,r);                                      \
10001000   *rd = r;                                                    \
1001   COUNT_CYCLES(tms,2);                                            \
1001   COUNT_CYCLES(2);                                            \
10021002}
1003static void subi_w_a(tms34010_state *tms, UINT16 op) { SUBI_W(A); }
1004static void subi_w_b(tms34010_state *tms, UINT16 op) { SUBI_W(B); }
1003void tms340x0_device::subi_w_a(UINT16 op) { SUBI_W(A); }
1004void tms340x0_device::subi_w_b(UINT16 op) { SUBI_W(B); }
10051005
10061006#define SUBI_L(R)                                               \
10071007{                                                               \
1008   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1009   INT32 t = ~PARAM_LONG(tms);                                 \
1008   INT32 *rd = &R##REG(DSTREG(op));                                \
1009   INT32 t = ~PARAM_LONG();                                 \
10101010   INT32 r = *rd - t;                                          \
1011   CLR_NCZV(tms);                                                  \
1012   SET_NZCV_SUB(tms,*rd,t,r);                                      \
1011   CLR_NCZV();                                                  \
1012   SET_NZCV_SUB(*rd,t,r);                                      \
10131013   *rd = r;                                                    \
1014   COUNT_CYCLES(tms,3);                                            \
1014   COUNT_CYCLES(3);                                            \
10151015}
1016static void subi_l_a(tms34010_state *tms, UINT16 op) { SUBI_L(A); }
1017static void subi_l_b(tms34010_state *tms, UINT16 op) { SUBI_L(B); }
1016void tms340x0_device::subi_l_a(UINT16 op) { SUBI_L(A); }
1017void tms340x0_device::subi_l_b(UINT16 op) { SUBI_L(B); }
10181018
10191019#define SUBK(R)                                                 \
10201020{                                                               \
1021   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1021   INT32 *rd = &R##REG(DSTREG(op));                                \
10221022   INT32 t = fw_inc[PARAM_K(op)];                                  \
10231023   INT32 r = *rd - t;                                          \
1024   CLR_NCZV(tms);                                                  \
1025   SET_NZCV_SUB(tms,*rd,t,r);                                      \
1024   CLR_NCZV();                                                  \
1025   SET_NZCV_SUB(*rd,t,r);                                      \
10261026   *rd = r;                                                    \
1027   COUNT_CYCLES(tms,1);                                            \
1027   COUNT_CYCLES(1);                                            \
10281028}
1029static void subk_a(tms34010_state *tms, UINT16 op) { SUBK(A); }
1030static void subk_b(tms34010_state *tms, UINT16 op) { SUBK(B); }
1029void tms340x0_device::subk_a(UINT16 op) { SUBK(A); }
1030void tms340x0_device::subk_b(UINT16 op) { SUBK(B); }
10311031
10321032#define XOR(R)                                                  \
10331033{                                                               \
1034   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1035   CLR_Z(tms);                                                     \
1036   *rd ^= R##REG(tms,SRCREG(op));                                      \
1037   SET_Z_VAL(tms, *rd);                                                \
1038   COUNT_CYCLES(tms,1);                                            \
1034   INT32 *rd = &R##REG(DSTREG(op));                                \
1035   CLR_Z();                                                     \
1036   *rd ^= R##REG(SRCREG(op));                                      \
1037   SET_Z_VAL(*rd);                                                \
1038   COUNT_CYCLES(1);                                            \
10391039}
1040static void xor_a(tms34010_state *tms, UINT16 op) { XOR(A); }
1041static void xor_b(tms34010_state *tms, UINT16 op) { XOR(B); }
1040void tms340x0_device::xor_a(UINT16 op) { XOR(A); }
1041void tms340x0_device::xor_b(UINT16 op) { XOR(B); }
10421042
10431043#define XORI(R)                                                 \
10441044{                                                               \
1045   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1046   CLR_Z(tms);                                                     \
1047   *rd ^= PARAM_LONG(tms);                                     \
1048   SET_Z_VAL(tms, *rd);                                                \
1049   COUNT_CYCLES(tms,3);                                            \
1045   INT32 *rd = &R##REG(DSTREG(op));                                \
1046   CLR_Z();                                                     \
1047   *rd ^= PARAM_LONG();                                     \
1048   SET_Z_VAL(*rd);                                                \
1049   COUNT_CYCLES(3);                                            \
10501050}
1051static void xori_a(tms34010_state *tms, UINT16 op) { XORI(A); }
1052static void xori_b(tms34010_state *tms, UINT16 op) { XORI(B); }
1051void tms340x0_device::xori_a(UINT16 op) { XORI(A); }
1052void tms340x0_device::xori_b(UINT16 op) { XORI(B); }
10531053
10541054#define ZEXT(F,R)                                               \
10551055{                                                               \
1056   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1057   CLR_Z(tms);                                                     \
1058   ZEXTEND(*rd,FW(tms,F));                                         \
1059   SET_Z_VAL(tms, *rd);                                                \
1060   COUNT_CYCLES(tms,1);                                            \
1056   INT32 *rd = &R##REG(DSTREG(op));                                \
1057   CLR_Z();                                                     \
1058   ZEXTEND(*rd,FW(F));                                         \
1059   SET_Z_VAL(*rd);                                                \
1060   COUNT_CYCLES(1);                                            \
10611061}
1062static void zext0_a(tms34010_state *tms, UINT16 op) { ZEXT(0,A); }
1063static void zext0_b(tms34010_state *tms, UINT16 op) { ZEXT(0,B); }
1064static void zext1_a(tms34010_state *tms, UINT16 op) { ZEXT(1,A); }
1065static void zext1_b(tms34010_state *tms, UINT16 op) { ZEXT(1,B); }
1062void tms340x0_device::zext0_a(UINT16 op) { ZEXT(0,A); }
1063void tms340x0_device::zext0_b(UINT16 op) { ZEXT(0,B); }
1064void tms340x0_device::zext1_a(UINT16 op) { ZEXT(1,A); }
1065void tms340x0_device::zext1_b(UINT16 op) { ZEXT(1,B); }
10661066
10671067
10681068
r31176r31177
10721072
10731073#define MOVI_W(R)                                               \
10741074{                                                               \
1075   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1076   CLR_NZV(tms);                                                   \
1077   *rd=PARAM_WORD(tms);                                        \
1078   SET_NZ_VAL(tms, *rd);                                           \
1079   COUNT_CYCLES(tms,2);                                            \
1075   INT32 *rd = &R##REG(DSTREG(op));                                \
1076   CLR_NZV();                                                   \
1077   *rd=PARAM_WORD();                                        \
1078   SET_NZ_VAL(*rd);                                           \
1079   COUNT_CYCLES(2);                                            \
10801080}
1081static void movi_w_a(tms34010_state *tms, UINT16 op) { MOVI_W(A); }
1082static void movi_w_b(tms34010_state *tms, UINT16 op) { MOVI_W(B); }
1081void tms340x0_device::movi_w_a(UINT16 op) { MOVI_W(A); }
1082void tms340x0_device::movi_w_b(UINT16 op) { MOVI_W(B); }
10831083
10841084#define MOVI_L(R)                                               \
10851085{                                                               \
1086   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1087   CLR_NZV(tms);                                                   \
1088   *rd=PARAM_LONG(tms);                                        \
1089   SET_NZ_VAL(tms, *rd);                                           \
1090   COUNT_CYCLES(tms,3);                                            \
1086   INT32 *rd = &R##REG(DSTREG(op));                                \
1087   CLR_NZV();                                                   \
1088   *rd=PARAM_LONG();                                        \
1089   SET_NZ_VAL(*rd);                                           \
1090   COUNT_CYCLES(3);                                            \
10911091}
1092static void movi_l_a(tms34010_state *tms, UINT16 op) { MOVI_L(A); }
1093static void movi_l_b(tms34010_state *tms, UINT16 op) { MOVI_L(B); }
1092void tms340x0_device::movi_l_a(UINT16 op) { MOVI_L(A); }
1093void tms340x0_device::movi_l_b(UINT16 op) { MOVI_L(B); }
10941094
10951095#define MOVK(R)                                                 \
10961096{                                                               \
10971097   INT32 k = PARAM_K(op); if (!k) k = 32;                          \
1098   R##REG(tms,DSTREG(op)) = k;                                         \
1099   COUNT_CYCLES(tms,1);                                            \
1098   R##REG(DSTREG(op)) = k;                                         \
1099   COUNT_CYCLES(1);                                            \
11001100}
1101static void movk_a(tms34010_state *tms, UINT16 op) { MOVK(A); }
1102static void movk_b(tms34010_state *tms, UINT16 op) { MOVK(B); }
1101void tms340x0_device::movk_a(UINT16 op) { MOVK(A); }
1102void tms340x0_device::movk_b(UINT16 op) { MOVK(B); }
11031103
11041104#define MOVB_RN(R)                                              \
11051105{                                                               \
1106   WBYTE(tms, R##REG(tms,DSTREG(op)),R##REG(tms,SRCREG(op)));                      \
1107   COUNT_CYCLES(tms,1);                                            \
1106   WBYTE(R##REG(DSTREG(op)),R##REG(SRCREG(op)));                      \
1107   COUNT_CYCLES(1);                                            \
11081108}
1109static void movb_rn_a(tms34010_state *tms, UINT16 op) { MOVB_RN(A); }
1110static void movb_rn_b(tms34010_state *tms, UINT16 op) { MOVB_RN(B); }
1109void tms340x0_device::movb_rn_a(UINT16 op) { MOVB_RN(A); }
1110void tms340x0_device::movb_rn_b(UINT16 op) { MOVB_RN(B); }
11111111
11121112#define MOVB_NR(R)                                              \
11131113{                                                               \
1114   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1115   CLR_NZV(tms);                                                   \
1116   *rd = (INT8)RBYTE(tms, R##REG(tms,SRCREG(op)));                     \
1117   SET_NZ_VAL(tms, *rd);                                           \
1118   COUNT_CYCLES(tms,3);                                            \
1114   INT32 *rd = &R##REG(DSTREG(op));                                \
1115   CLR_NZV();                                                   \
1116   *rd = (INT8)RBYTE(R##REG(SRCREG(op)));                     \
1117   SET_NZ_VAL(*rd);                                           \
1118   COUNT_CYCLES(3);                                            \
11191119}
1120static void movb_nr_a(tms34010_state *tms, UINT16 op) { MOVB_NR(A); }
1121static void movb_nr_b(tms34010_state *tms, UINT16 op) { MOVB_NR(B); }
1120void tms340x0_device::movb_nr_a(UINT16 op) { MOVB_NR(A); }
1121void tms340x0_device::movb_nr_b(UINT16 op) { MOVB_NR(B); }
11221122
11231123#define MOVB_NN(R)                                              \
11241124{                                                               \
1125   WBYTE(tms, R##REG(tms,DSTREG(op)),(UINT32)(UINT8)RBYTE(tms, R##REG(tms,SRCREG(op))));\
1126   COUNT_CYCLES(tms,3);                                            \
1125   WBYTE(R##REG(DSTREG(op)),(UINT32)(UINT8)RBYTE(R##REG(SRCREG(op))));\
1126   COUNT_CYCLES(3);                                            \
11271127}
1128static void movb_nn_a(tms34010_state *tms, UINT16 op) { MOVB_NN(A); }
1129static void movb_nn_b(tms34010_state *tms, UINT16 op) { MOVB_NN(B); }
1128void tms340x0_device::movb_nn_a(UINT16 op) { MOVB_NN(A); }
1129void tms340x0_device::movb_nn_b(UINT16 op) { MOVB_NN(B); }
11301130
11311131#define MOVB_R_NO(R)                                            \
11321132{                                                               \
1133   INT32 o = PARAM_WORD(tms);                                  \
1134   WBYTE(tms, R##REG(tms,DSTREG(op))+o,R##REG(tms,SRCREG(op)));                        \
1135   COUNT_CYCLES(tms,3);                                            \
1133   INT32 o = PARAM_WORD();                                  \
1134   WBYTE(R##REG(DSTREG(op))+o,R##REG(SRCREG(op)));                        \
1135   COUNT_CYCLES(3);                                            \
11361136}
1137static void movb_r_no_a(tms34010_state *tms, UINT16 op) { MOVB_R_NO(A); }
1138static void movb_r_no_b(tms34010_state *tms, UINT16 op) { MOVB_R_NO(B); }
1137void tms340x0_device::movb_r_no_a(UINT16 op) { MOVB_R_NO(A); }
1138void tms340x0_device::movb_r_no_b(UINT16 op) { MOVB_R_NO(B); }
11391139
11401140#define MOVB_NO_R(R)                                            \
11411141{                                                               \
1142   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1143   INT32 o = PARAM_WORD(tms);                                  \
1144   CLR_NZV(tms);                                                   \
1145   *rd = (INT8)RBYTE(tms, R##REG(tms,SRCREG(op))+o);                   \
1146   SET_NZ_VAL(tms, *rd);                                           \
1147   COUNT_CYCLES(tms,5);                                            \
1142   INT32 *rd = &R##REG(DSTREG(op));                                \
1143   INT32 o = PARAM_WORD();                                  \
1144   CLR_NZV();                                                   \
1145   *rd = (INT8)RBYTE(R##REG(SRCREG(op))+o);                   \
1146   SET_NZ_VAL(*rd);                                           \
1147   COUNT_CYCLES(5);                                            \
11481148}
1149static void movb_no_r_a(tms34010_state *tms, UINT16 op) { MOVB_NO_R(A); }
1150static void movb_no_r_b(tms34010_state *tms, UINT16 op) { MOVB_NO_R(B); }
1149void tms340x0_device::movb_no_r_a(UINT16 op) { MOVB_NO_R(A); }
1150void tms340x0_device::movb_no_r_b(UINT16 op) { MOVB_NO_R(B); }
11511151
11521152#define MOVB_NO_NO(R)                                           \
11531153{                                                               \
1154   INT32 o1 = PARAM_WORD(tms);                                 \
1155   INT32 o2 = PARAM_WORD(tms);                                 \
1156   WBYTE(tms, R##REG(tms,DSTREG(op))+o2,(UINT32)(UINT8)RBYTE(tms, R##REG(tms,SRCREG(op))+o1)); \
1157   COUNT_CYCLES(tms,5);                                            \
1154   INT32 o1 = PARAM_WORD();                                 \
1155   INT32 o2 = PARAM_WORD();                                 \
1156   WBYTE(R##REG(DSTREG(op))+o2,(UINT32)(UINT8)RBYTE(R##REG(SRCREG(op))+o1)); \
1157   COUNT_CYCLES(5);                                            \
11581158}
1159static void movb_no_no_a(tms34010_state *tms, UINT16 op) { MOVB_NO_NO(A); }
1160static void movb_no_no_b(tms34010_state *tms, UINT16 op) { MOVB_NO_NO(B); }
1159void tms340x0_device::movb_no_no_a(UINT16 op) { MOVB_NO_NO(A); }
1160void tms340x0_device::movb_no_no_b(UINT16 op) { MOVB_NO_NO(B); }
11611161
11621162#define MOVB_RA(R)                                              \
11631163{                                                               \
1164   WBYTE(tms, PARAM_LONG(tms),R##REG(tms,DSTREG(op)));                     \
1165   COUNT_CYCLES(tms,1);                                            \
1164   WBYTE(PARAM_LONG(),R##REG(DSTREG(op)));                     \
1165   COUNT_CYCLES(1);                                            \
11661166}
1167static void movb_ra_a(tms34010_state *tms, UINT16 op) { MOVB_RA(A); }
1168static void movb_ra_b(tms34010_state *tms, UINT16 op) { MOVB_RA(B); }
1167void tms340x0_device::movb_ra_a(UINT16 op) { MOVB_RA(A); }
1168void tms340x0_device::movb_ra_b(UINT16 op) { MOVB_RA(B); }
11691169
11701170#define MOVB_AR(R)                                              \
11711171{                                                               \
1172   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1173   CLR_NZV(tms);                                                   \
1174   *rd = (INT8)RBYTE(tms, PARAM_LONG(tms));                    \
1175   SET_NZ_VAL(tms, *rd);                                           \
1176   COUNT_CYCLES(tms,5);                                            \
1172   INT32 *rd = &R##REG(DSTREG(op));                                \
1173   CLR_NZV();                                                   \
1174   *rd = (INT8)RBYTE(PARAM_LONG());                    \
1175   SET_NZ_VAL(*rd);                                           \
1176   COUNT_CYCLES(5);                                            \
11771177}
1178static void movb_ar_a(tms34010_state *tms, UINT16 op) { MOVB_AR(A); }
1179static void movb_ar_b(tms34010_state *tms, UINT16 op) { MOVB_AR(B); }
1178void tms340x0_device::movb_ar_a(UINT16 op) { MOVB_AR(A); }
1179void tms340x0_device::movb_ar_b(UINT16 op) { MOVB_AR(B); }
11801180
1181static void movb_aa(tms34010_state *tms, UINT16 op)
1181void tms340x0_device::movb_aa(UINT16 op)
11821182{
1183   UINT32 bitaddrs=PARAM_LONG(tms);
1184   WBYTE(tms, PARAM_LONG(tms),(UINT32)(UINT8)RBYTE(tms, bitaddrs));
1185   COUNT_CYCLES(tms,6);
1183   UINT32 bitaddrs=PARAM_LONG();
1184   WBYTE(PARAM_LONG(),(UINT32)(UINT8)RBYTE(bitaddrs));
1185   COUNT_CYCLES(6);
11861186}
11871187
11881188#define MOVE_RR(RS,RD)                                          \
11891189{                                                               \
1190   INT32 *rd = &RD##REG(tms,DSTREG(op));                               \
1191   CLR_NZV(tms);                                                   \
1192   *rd = RS##REG(tms,SRCREG(op));                                      \
1193   SET_NZ_VAL(tms, *rd);                                           \
1194   COUNT_CYCLES(tms,1);                                            \
1190   INT32 *rd = &RD##REG(DSTREG(op));                               \
1191   CLR_NZV();                                                   \
1192   *rd = RS##REG(SRCREG(op));                                      \
1193   SET_NZ_VAL(*rd);                                           \
1194   COUNT_CYCLES(1);                                            \
11951195}
1196static void move_rr_a (tms34010_state *tms, UINT16 op) { MOVE_RR(A,A); }
1197static void move_rr_b (tms34010_state *tms, UINT16 op) { MOVE_RR(B,B); }
1198static void move_rr_ax(tms34010_state *tms, UINT16 op) { MOVE_RR(A,B); }
1199static void move_rr_bx(tms34010_state *tms, UINT16 op) { MOVE_RR(B,A); }
1196void tms340x0_device::move_rr_a (UINT16 op) { MOVE_RR(A,A); }
1197void tms340x0_device::move_rr_b (UINT16 op) { MOVE_RR(B,B); }
1198void tms340x0_device::move_rr_ax(UINT16 op) { MOVE_RR(A,B); }
1199void tms340x0_device::move_rr_bx(UINT16 op) { MOVE_RR(B,A); }
12001200
12011201#define MOVE_RN(F,R)                                            \
12021202{                                                               \
1203   WFIELD##F(tms,R##REG(tms,DSTREG(op)),R##REG(tms,SRCREG(op)));                   \
1204   COUNT_CYCLES(tms,1);                                            \
1203   WFIELD##F(R##REG(DSTREG(op)),R##REG(SRCREG(op)));                   \
1204   COUNT_CYCLES(1);                                            \
12051205}
1206static void move0_rn_a (tms34010_state *tms, UINT16 op) { MOVE_RN(0,A); }
1207static void move0_rn_b (tms34010_state *tms, UINT16 op) { MOVE_RN(0,B); }
1208static void move1_rn_a (tms34010_state *tms, UINT16 op) { MOVE_RN(1,A); }
1209static void move1_rn_b (tms34010_state *tms, UINT16 op) { MOVE_RN(1,B); }
1206void tms340x0_device::move0_rn_a (UINT16 op) { MOVE_RN(0,A); }
1207void tms340x0_device::move0_rn_b (UINT16 op) { MOVE_RN(0,B); }
1208void tms340x0_device::move1_rn_a (UINT16 op) { MOVE_RN(1,A); }
1209void tms340x0_device::move1_rn_b (UINT16 op) { MOVE_RN(1,B); }
12101210
12111211#define MOVE_R_DN(F,R)                                          \
12121212{                                                               \
1213   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1214   *rd-=fw_inc[FW(tms,F)];                                         \
1215   WFIELD##F(tms,*rd,R##REG(tms,SRCREG(op)));                              \
1216   COUNT_CYCLES(tms,2);                                            \
1213   INT32 *rd = &R##REG(DSTREG(op));                                \
1214   *rd-=fw_inc[FW(F)];                                         \
1215   WFIELD##F(*rd,R##REG(SRCREG(op)));                              \
1216   COUNT_CYCLES(2);                                            \
12171217}
1218static void move0_r_dn_a (tms34010_state *tms, UINT16 op) { MOVE_R_DN(0,A); }
1219static void move0_r_dn_b (tms34010_state *tms, UINT16 op) { MOVE_R_DN(0,B); }
1220static void move1_r_dn_a (tms34010_state *tms, UINT16 op) { MOVE_R_DN(1,A); }
1221static void move1_r_dn_b (tms34010_state *tms, UINT16 op) { MOVE_R_DN(1,B); }
1218void tms340x0_device::move0_r_dn_a (UINT16 op) { MOVE_R_DN(0,A); }
1219void tms340x0_device::move0_r_dn_b (UINT16 op) { MOVE_R_DN(0,B); }
1220void tms340x0_device::move1_r_dn_a (UINT16 op) { MOVE_R_DN(1,A); }
1221void tms340x0_device::move1_r_dn_b (UINT16 op) { MOVE_R_DN(1,B); }
12221222
12231223#define MOVE_R_NI(F,R)                                          \
12241224{                                                               \
1225   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1226   WFIELD##F(tms,*rd,R##REG(tms,SRCREG(op)));                              \
1227   *rd+=fw_inc[FW(tms,F)];                                         \
1228   COUNT_CYCLES(tms,1);                                            \
1225   INT32 *rd = &R##REG(DSTREG(op));                                \
1226   WFIELD##F(*rd,R##REG(SRCREG(op)));                              \
1227   *rd+=fw_inc[FW(F)];                                         \
1228   COUNT_CYCLES(1);                                            \
12291229}
1230static void move0_r_ni_a (tms34010_state *tms, UINT16 op) { MOVE_R_NI(0,A); }
1231static void move0_r_ni_b (tms34010_state *tms, UINT16 op) { MOVE_R_NI(0,B); }
1232static void move1_r_ni_a (tms34010_state *tms, UINT16 op) { MOVE_R_NI(1,A); }
1233static void move1_r_ni_b (tms34010_state *tms, UINT16 op) { MOVE_R_NI(1,B); }
1230void tms340x0_device::move0_r_ni_a (UINT16 op) { MOVE_R_NI(0,A); }
1231void tms340x0_device::move0_r_ni_b (UINT16 op) { MOVE_R_NI(0,B); }
1232void tms340x0_device::move1_r_ni_a (UINT16 op) { MOVE_R_NI(1,A); }
1233void tms340x0_device::move1_r_ni_b (UINT16 op) { MOVE_R_NI(1,B); }
12341234
12351235#define MOVE_NR(F,R)                                            \
12361236{                                                               \
1237   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1238   CLR_NZV(tms);                                                   \
1239   *rd = RFIELD##F(tms,R##REG(tms,SRCREG(op)));                            \
1240   SET_NZ_VAL(tms, *rd);                                           \
1241   COUNT_CYCLES(tms,3);                                            \
1237   INT32 *rd = &R##REG(DSTREG(op));                                \
1238   CLR_NZV();                                                   \
1239   *rd = RFIELD##F(R##REG(SRCREG(op)));                            \
1240   SET_NZ_VAL(*rd);                                           \
1241   COUNT_CYCLES(3);                                            \
12421242}
1243static void move0_nr_a (tms34010_state *tms, UINT16 op) { MOVE_NR(0,A); }
1244static void move0_nr_b (tms34010_state *tms, UINT16 op) { MOVE_NR(0,B); }
1245static void move1_nr_a (tms34010_state *tms, UINT16 op) { MOVE_NR(1,A); }
1246static void move1_nr_b (tms34010_state *tms, UINT16 op) { MOVE_NR(1,B); }
1243void tms340x0_device::move0_nr_a (UINT16 op) { MOVE_NR(0,A); }
1244void tms340x0_device::move0_nr_b (UINT16 op) { MOVE_NR(0,B); }
1245void tms340x0_device::move1_nr_a (UINT16 op) { MOVE_NR(1,A); }
1246void tms340x0_device::move1_nr_b (UINT16 op) { MOVE_NR(1,B); }
12471247
12481248#define MOVE_DN_R(F,R)                                          \
12491249{                                                               \
1250   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1251   INT32 *rs = &R##REG(tms,SRCREG(op));                                \
1252   CLR_NZV(tms);                                                   \
1253   *rs-=fw_inc[FW(tms,F)];                                         \
1254   *rd = RFIELD##F(tms,*rs);                                       \
1255   SET_NZ_VAL(tms, *rd);                                           \
1256   COUNT_CYCLES(tms,4);                                            \
1250   INT32 *rd = &R##REG(DSTREG(op));                                \
1251   INT32 *rs = &R##REG(SRCREG(op));                                \
1252   CLR_NZV();                                                   \
1253   *rs-=fw_inc[FW(F)];                                         \
1254   *rd = RFIELD##F(*rs);                                       \
1255   SET_NZ_VAL(*rd);                                           \
1256   COUNT_CYCLES(4);                                            \
12571257}
1258static void move0_dn_r_a (tms34010_state *tms, UINT16 op) { MOVE_DN_R(0,A); }
1259static void move0_dn_r_b (tms34010_state *tms, UINT16 op) { MOVE_DN_R(0,B); }
1260static void move1_dn_r_a (tms34010_state *tms, UINT16 op) { MOVE_DN_R(1,A); }
1261static void move1_dn_r_b (tms34010_state *tms, UINT16 op) { MOVE_DN_R(1,B); }
1258void tms340x0_device::move0_dn_r_a (UINT16 op) { MOVE_DN_R(0,A); }
1259void tms340x0_device::move0_dn_r_b (UINT16 op) { MOVE_DN_R(0,B); }
1260void tms340x0_device::move1_dn_r_a (UINT16 op) { MOVE_DN_R(1,A); }
1261void tms340x0_device::move1_dn_r_b (UINT16 op) { MOVE_DN_R(1,B); }
12621262
12631263#define MOVE_NI_R(F,R)                                          \
12641264{                                                               \
1265   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1266   INT32 *rs = &R##REG(tms,SRCREG(op));                                \
1267   INT32 data = RFIELD##F(tms,*rs);                                \
1268   CLR_NZV(tms);                                                   \
1269   *rs+=fw_inc[FW(tms,F)];                                         \
1265   INT32 *rd = &R##REG(DSTREG(op));                                \
1266   INT32 *rs = &R##REG(SRCREG(op));                                \
1267   INT32 data = RFIELD##F(*rs);                                \
1268   CLR_NZV();                                                   \
1269   *rs+=fw_inc[FW(F)];                                         \
12701270   *rd = data;                                                 \
1271   SET_NZ_VAL(tms, *rd);                                           \
1272   COUNT_CYCLES(tms,3);                                            \
1271   SET_NZ_VAL(*rd);                                           \
1272   COUNT_CYCLES(3);                                            \
12731273}
1274static void move0_ni_r_a (tms34010_state *tms, UINT16 op) { MOVE_NI_R(0,A); }
1275static void move0_ni_r_b (tms34010_state *tms, UINT16 op) { MOVE_NI_R(0,B); }
1276static void move1_ni_r_a (tms34010_state *tms, UINT16 op) { MOVE_NI_R(1,A); }
1277static void move1_ni_r_b (tms34010_state *tms, UINT16 op) { MOVE_NI_R(1,B); }
1274void tms340x0_device::move0_ni_r_a (UINT16 op) { MOVE_NI_R(0,A); }
1275void tms340x0_device::move0_ni_r_b (UINT16 op) { MOVE_NI_R(0,B); }
1276void tms340x0_device::move1_ni_r_a (UINT16 op) { MOVE_NI_R(1,A); }
1277void tms340x0_device::move1_ni_r_b (UINT16 op) { MOVE_NI_R(1,B); }
12781278
12791279#define MOVE_NN(F,R)                                            \
12801280{                                                               \
1281   WFIELD##F(tms,R##REG(tms,DSTREG(op)),RFIELD##F(tms,R##REG(tms,SRCREG(op))));        \
1282   COUNT_CYCLES(tms,3);                                            \
1281   WFIELD##F(R##REG(DSTREG(op)),RFIELD##F(R##REG(SRCREG(op))));        \
1282   COUNT_CYCLES(3);                                            \
12831283}
1284static void move0_nn_a (tms34010_state *tms, UINT16 op) { MOVE_NN(0,A); }
1285static void move0_nn_b (tms34010_state *tms, UINT16 op) { MOVE_NN(0,B); }
1286static void move1_nn_a (tms34010_state *tms, UINT16 op) { MOVE_NN(1,A); }
1287static void move1_nn_b (tms34010_state *tms, UINT16 op) { MOVE_NN(1,B); }
1284void tms340x0_device::move0_nn_a (UINT16 op) { MOVE_NN(0,A); }
1285void tms340x0_device::move0_nn_b (UINT16 op) { MOVE_NN(0,B); }
1286void tms340x0_device::move1_nn_a (UINT16 op) { MOVE_NN(1,A); }
1287void tms340x0_device::move1_nn_b (UINT16 op) { MOVE_NN(1,B); }
12881288
12891289#define MOVE_DN_DN(F,R)                                         \
12901290{                                                               \
1291   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1292   INT32 *rs = &R##REG(tms,SRCREG(op));                                \
1291   INT32 *rd = &R##REG(DSTREG(op));                                \
1292   INT32 *rs = &R##REG(SRCREG(op));                                \
12931293   INT32 data;                                                 \
1294   *rs-=fw_inc[FW(tms,F)];                                         \
1295   data = RFIELD##F(tms,*rs);                                      \
1296   *rd-=fw_inc[FW(tms,F)];                                         \
1297   WFIELD##F(tms,*rd,data);                                        \
1298   COUNT_CYCLES(tms,4);                                            \
1294   *rs-=fw_inc[FW(F)];                                         \
1295   data = RFIELD##F(*rs);                                      \
1296   *rd-=fw_inc[FW(F)];                                         \
1297   WFIELD##F(*rd,data);                                        \
1298   COUNT_CYCLES(4);                                            \
12991299}
1300static void move0_dn_dn_a (tms34010_state *tms, UINT16 op) { MOVE_DN_DN(0,A); }
1301static void move0_dn_dn_b (tms34010_state *tms, UINT16 op) { MOVE_DN_DN(0,B); }
1302static void move1_dn_dn_a (tms34010_state *tms, UINT16 op) { MOVE_DN_DN(1,A); }
1303static void move1_dn_dn_b (tms34010_state *tms, UINT16 op) { MOVE_DN_DN(1,B); }
1300void tms340x0_device::move0_dn_dn_a (UINT16 op) { MOVE_DN_DN(0,A); }
1301void tms340x0_device::move0_dn_dn_b (UINT16 op) { MOVE_DN_DN(0,B); }
1302void tms340x0_device::move1_dn_dn_a (UINT16 op) { MOVE_DN_DN(1,A); }
1303void tms340x0_device::move1_dn_dn_b (UINT16 op) { MOVE_DN_DN(1,B); }
13041304
13051305#define MOVE_NI_NI(F,R)                                         \
13061306{                                                               \
1307   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1308   INT32 *rs = &R##REG(tms,SRCREG(op));                                \
1309   INT32 data = RFIELD##F(tms,*rs);                                \
1310   *rs+=fw_inc[FW(tms,F)];                                         \
1311   WFIELD##F(tms,*rd,data);                                        \
1312   *rd+=fw_inc[FW(tms,F)];                                         \
1313   COUNT_CYCLES(tms,4);                                            \
1307   INT32 *rd = &R##REG(DSTREG(op));                                \
1308   INT32 *rs = &R##REG(SRCREG(op));                                \
1309   INT32 data = RFIELD##F(*rs);                                \
1310   *rs+=fw_inc[FW(F)];                                         \
1311   WFIELD##F(*rd,data);                                        \
1312   *rd+=fw_inc[FW(F)];                                         \
1313   COUNT_CYCLES(4);                                            \
13141314}
1315static void move0_ni_ni_a (tms34010_state *tms, UINT16 op) { MOVE_NI_NI(0,A); }
1316static void move0_ni_ni_b (tms34010_state *tms, UINT16 op) { MOVE_NI_NI(0,B); }
1317static void move1_ni_ni_a (tms34010_state *tms, UINT16 op) { MOVE_NI_NI(1,A); }
1318static void move1_ni_ni_b (tms34010_state *tms, UINT16 op) { MOVE_NI_NI(1,B); }
1315void tms340x0_device::move0_ni_ni_a (UINT16 op) { MOVE_NI_NI(0,A); }
1316void tms340x0_device::move0_ni_ni_b (UINT16 op) { MOVE_NI_NI(0,B); }
1317void tms340x0_device::move1_ni_ni_a (UINT16 op) { MOVE_NI_NI(1,A); }
1318void tms340x0_device::move1_ni_ni_b (UINT16 op) { MOVE_NI_NI(1,B); }
13191319
13201320#define MOVE_R_NO(F,R)                                          \
13211321{                                                               \
1322   INT32 o = PARAM_WORD(tms);                                  \
1323   WFIELD##F(tms,R##REG(tms,DSTREG(op))+o,R##REG(tms,SRCREG(op)));                 \
1324   COUNT_CYCLES(tms,3);                                            \
1322   INT32 o = PARAM_WORD();                                  \
1323   WFIELD##F(R##REG(DSTREG(op))+o,R##REG(SRCREG(op)));                 \
1324   COUNT_CYCLES(3);                                            \
13251325}
1326static void move0_r_no_a (tms34010_state *tms, UINT16 op) { MOVE_R_NO(0,A); }
1327static void move0_r_no_b (tms34010_state *tms, UINT16 op) { MOVE_R_NO(0,B); }
1328static void move1_r_no_a (tms34010_state *tms, UINT16 op) { MOVE_R_NO(1,A); }
1329static void move1_r_no_b (tms34010_state *tms, UINT16 op) { MOVE_R_NO(1,B); }
1326void tms340x0_device::move0_r_no_a (UINT16 op) { MOVE_R_NO(0,A); }
1327void tms340x0_device::move0_r_no_b (UINT16 op) { MOVE_R_NO(0,B); }
1328void tms340x0_device::move1_r_no_a (UINT16 op) { MOVE_R_NO(1,A); }
1329void tms340x0_device::move1_r_no_b (UINT16 op) { MOVE_R_NO(1,B); }
13301330
13311331#define MOVE_NO_R(F,R)                                          \
13321332{                                                               \
1333   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1334   INT32 o = PARAM_WORD(tms);                                  \
1335   CLR_NZV(tms);                                                   \
1336   *rd = RFIELD##F(tms,R##REG(tms,SRCREG(op))+o);                          \
1337   SET_NZ_VAL(tms, *rd);                                           \
1338   COUNT_CYCLES(tms,5);                                            \
1333   INT32 *rd = &R##REG(DSTREG(op));                                \
1334   INT32 o = PARAM_WORD();                                  \
1335   CLR_NZV();                                                   \
1336   *rd = RFIELD##F(R##REG(SRCREG(op))+o);                          \
1337   SET_NZ_VAL(*rd);                                           \
1338   COUNT_CYCLES(5);                                            \
13391339}
1340static void move0_no_r_a (tms34010_state *tms, UINT16 op) { MOVE_NO_R(0,A); }
1341static void move0_no_r_b (tms34010_state *tms, UINT16 op) { MOVE_NO_R(0,B); }
1342static void move1_no_r_a (tms34010_state *tms, UINT16 op) { MOVE_NO_R(1,A); }
1343static void move1_no_r_b (tms34010_state *tms, UINT16 op) { MOVE_NO_R(1,B); }
1340void tms340x0_device::move0_no_r_a (UINT16 op) { MOVE_NO_R(0,A); }
1341void tms340x0_device::move0_no_r_b (UINT16 op) { MOVE_NO_R(0,B); }
1342void tms340x0_device::move1_no_r_a (UINT16 op) { MOVE_NO_R(1,A); }
1343void tms340x0_device::move1_no_r_b (UINT16 op) { MOVE_NO_R(1,B); }
13441344
13451345#define MOVE_NO_NI(F,R)                                         \
13461346{                                                               \
1347   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1348   INT32 o = PARAM_WORD(tms);                                  \
1349   INT32 data = RFIELD##F(tms,R##REG(tms,SRCREG(op))+o);                   \
1350   WFIELD##F(tms,*rd,data);                                        \
1351   *rd+=fw_inc[FW(tms,F)];                                         \
1352   COUNT_CYCLES(tms,5);                                            \
1347   INT32 *rd = &R##REG(DSTREG(op));                                \
1348   INT32 o = PARAM_WORD();                                  \
1349   INT32 data = RFIELD##F(R##REG(SRCREG(op))+o);                   \
1350   WFIELD##F(*rd,data);                                        \
1351   *rd+=fw_inc[FW(F)];                                         \
1352   COUNT_CYCLES(5);                                            \
13531353}
1354static void move0_no_ni_a (tms34010_state *tms, UINT16 op) { MOVE_NO_NI(0,A); }
1355static void move0_no_ni_b (tms34010_state *tms, UINT16 op) { MOVE_NO_NI(0,B); }
1356static void move1_no_ni_a (tms34010_state *tms, UINT16 op) { MOVE_NO_NI(1,A); }
1357static void move1_no_ni_b (tms34010_state *tms, UINT16 op) { MOVE_NO_NI(1,B); }
1354void tms340x0_device::move0_no_ni_a (UINT16 op) { MOVE_NO_NI(0,A); }
1355void tms340x0_device::move0_no_ni_b (UINT16 op) { MOVE_NO_NI(0,B); }
1356void tms340x0_device::move1_no_ni_a (UINT16 op) { MOVE_NO_NI(1,A); }
1357void tms340x0_device::move1_no_ni_b (UINT16 op) { MOVE_NO_NI(1,B); }
13581358
13591359#define MOVE_NO_NO(F,R)                                         \
13601360{                                                               \
1361   INT32 o1 = PARAM_WORD(tms);                                 \
1362   INT32 o2 = PARAM_WORD(tms);                                 \
1363   INT32 data = RFIELD##F(tms,R##REG(tms,SRCREG(op))+o1);                  \
1364   WFIELD##F(tms,R##REG(tms,DSTREG(op))+o2,data);                          \
1365   COUNT_CYCLES(tms,5);                                            \
1361   INT32 o1 = PARAM_WORD();                                 \
1362   INT32 o2 = PARAM_WORD();                                 \
1363   INT32 data = RFIELD##F(R##REG(SRCREG(op))+o1);                  \
1364   WFIELD##F(R##REG(DSTREG(op))+o2,data);                          \
1365   COUNT_CYCLES(5);                                            \
13661366}
1367static void move0_no_no_a (tms34010_state *tms, UINT16 op) { MOVE_NO_NO(0,A); }
1368static void move0_no_no_b (tms34010_state *tms, UINT16 op) { MOVE_NO_NO(0,B); }
1369static void move1_no_no_a (tms34010_state *tms, UINT16 op) { MOVE_NO_NO(1,A); }
1370static void move1_no_no_b (tms34010_state *tms, UINT16 op) { MOVE_NO_NO(1,B); }
1367void tms340x0_device::move0_no_no_a (UINT16 op) { MOVE_NO_NO(0,A); }
1368void tms340x0_device::move0_no_no_b (UINT16 op) { MOVE_NO_NO(0,B); }
1369void tms340x0_device::move1_no_no_a (UINT16 op) { MOVE_NO_NO(1,A); }
1370void tms340x0_device::move1_no_no_b (UINT16 op) { MOVE_NO_NO(1,B); }
13711371
13721372#define MOVE_RA(F,R)                                            \
13731373{                                                               \
1374   WFIELD##F(tms,PARAM_LONG(tms),R##REG(tms,DSTREG(op)));                  \
1375   COUNT_CYCLES(tms,3);                                            \
1374   WFIELD##F(PARAM_LONG(),R##REG(DSTREG(op)));                  \
1375   COUNT_CYCLES(3);                                            \
13761376}
1377static void move0_ra_a (tms34010_state *tms, UINT16 op) { MOVE_RA(0,A); }
1378static void move0_ra_b (tms34010_state *tms, UINT16 op) { MOVE_RA(0,B); }
1379static void move1_ra_a (tms34010_state *tms, UINT16 op) { MOVE_RA(1,A); }
1380static void move1_ra_b (tms34010_state *tms, UINT16 op) { MOVE_RA(1,B); }
1377void tms340x0_device::move0_ra_a (UINT16 op) { MOVE_RA(0,A); }
1378void tms340x0_device::move0_ra_b (UINT16 op) { MOVE_RA(0,B); }
1379void tms340x0_device::move1_ra_a (UINT16 op) { MOVE_RA(1,A); }
1380void tms340x0_device::move1_ra_b (UINT16 op) { MOVE_RA(1,B); }
13811381
13821382#define MOVE_AR(F,R)                                            \
13831383{                                                               \
1384   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1385   CLR_NZV(tms);                                                   \
1386   *rd = RFIELD##F(tms,PARAM_LONG(tms));                           \
1387   SET_NZ_VAL(tms, *rd);                                           \
1388   COUNT_CYCLES(tms,5);                                            \
1384   INT32 *rd = &R##REG(DSTREG(op));                                \
1385   CLR_NZV();                                                   \
1386   *rd = RFIELD##F(PARAM_LONG());                           \
1387   SET_NZ_VAL(*rd);                                           \
1388   COUNT_CYCLES(5);                                            \
13891389}
1390static void move0_ar_a (tms34010_state *tms, UINT16 op) { MOVE_AR(0,A); }
1391static void move0_ar_b (tms34010_state *tms, UINT16 op) { MOVE_AR(0,B); }
1392static void move1_ar_a (tms34010_state *tms, UINT16 op) { MOVE_AR(1,A); }
1393static void move1_ar_b (tms34010_state *tms, UINT16 op) { MOVE_AR(1,B); }
1390void tms340x0_device::move0_ar_a (UINT16 op) { MOVE_AR(0,A); }
1391void tms340x0_device::move0_ar_b (UINT16 op) { MOVE_AR(0,B); }
1392void tms340x0_device::move1_ar_a (UINT16 op) { MOVE_AR(1,A); }
1393void tms340x0_device::move1_ar_b (UINT16 op) { MOVE_AR(1,B); }
13941394
13951395#define MOVE_A_NI(F,R)                                          \
13961396{                                                               \
1397   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1398   WFIELD##F(tms,*rd,RFIELD##F(tms,PARAM_LONG(tms)));                  \
1399   *rd+=fw_inc[FW(tms,F)];                                         \
1400   COUNT_CYCLES(tms,5);                                            \
1397   INT32 *rd = &R##REG(DSTREG(op));                                \
1398   WFIELD##F(*rd,RFIELD##F(PARAM_LONG()));                  \
1399   *rd+=fw_inc[FW(F)];                                         \
1400   COUNT_CYCLES(5);                                            \
14011401}
1402static void move0_a_ni_a (tms34010_state *tms, UINT16 op) { MOVE_A_NI(0,A); }
1403static void move0_a_ni_b (tms34010_state *tms, UINT16 op) { MOVE_A_NI(0,B); }
1404static void move1_a_ni_a (tms34010_state *tms, UINT16 op) { MOVE_A_NI(1,A); }
1405static void move1_a_ni_b (tms34010_state *tms, UINT16 op) { MOVE_A_NI(1,B); }
1402void tms340x0_device::move0_a_ni_a (UINT16 op) { MOVE_A_NI(0,A); }
1403void tms340x0_device::move0_a_ni_b (UINT16 op) { MOVE_A_NI(0,B); }
1404void tms340x0_device::move1_a_ni_a (UINT16 op) { MOVE_A_NI(1,A); }
1405void tms340x0_device::move1_a_ni_b (UINT16 op) { MOVE_A_NI(1,B); }
14061406
14071407#define MOVE_AA(F)                                              \
14081408{                                                               \
1409   UINT32 bitaddrs=PARAM_LONG(tms);                            \
1410   WFIELD##F(tms,PARAM_LONG(tms),RFIELD##F(tms,bitaddrs));             \
1411   COUNT_CYCLES(tms,7);                                            \
1409   UINT32 bitaddrs=PARAM_LONG();                            \
1410   WFIELD##F(PARAM_LONG(),RFIELD##F(bitaddrs));             \
1411   COUNT_CYCLES(7);                                            \
14121412}
1413static void move0_aa (tms34010_state *tms, UINT16 op) { MOVE_AA(0); }
1414static void move1_aa (tms34010_state *tms, UINT16 op) { MOVE_AA(1); }
1413void tms340x0_device::move0_aa (UINT16 op) { MOVE_AA(0); }
1414void tms340x0_device::move1_aa (UINT16 op) { MOVE_AA(1); }
14151415
14161416
14171417
r31176r31177
14211421
14221422#define CALL(R)                                                 \
14231423{                                                               \
1424   PUSH(tms, tms->pc);                                                 \
1425   tms->pc = R##REG(tms,DSTREG(op));                                       \
1426   CORRECT_ODD_PC(tms,"CALL");                                     \
1427   COUNT_CYCLES(tms,3);                                            \
1424   PUSH(m_pc);                                                 \
1425   m_pc = R##REG(DSTREG(op));                                       \
1426   CORRECT_ODD_PC("CALL");                                     \
1427   COUNT_CYCLES(3);                                            \
14281428}
1429static void call_a (tms34010_state *tms, UINT16 op) { CALL(A); }
1430static void call_b (tms34010_state *tms, UINT16 op) { CALL(B); }
1429void tms340x0_device::call_a (UINT16 op) { CALL(A); }
1430void tms340x0_device::call_b (UINT16 op) { CALL(B); }
14311431
1432static void callr(tms34010_state *tms, UINT16 op)
1432void tms340x0_device::callr(UINT16 op)
14331433{
1434   PUSH(tms, tms->pc+0x10);
1435   tms->pc += (PARAM_WORD_NO_INC(tms)<<4)+0x10;
1436   COUNT_CYCLES(tms,3);
1434   PUSH(m_pc+0x10);
1435   m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;
1436   COUNT_CYCLES(3);
14371437}
14381438
1439static void calla(tms34010_state *tms, UINT16 op)
1439void tms340x0_device::calla(UINT16 op)
14401440{
1441   PUSH(tms, tms->pc+0x20);
1442   tms->pc = PARAM_LONG_NO_INC(tms);
1443   CORRECT_ODD_PC(tms,"CALLA");
1444   COUNT_CYCLES(tms,4);
1441   PUSH(m_pc+0x20);
1442   m_pc = PARAM_LONG_NO_INC();
1443   CORRECT_ODD_PC("CALLA");
1444   COUNT_CYCLES(4);
14451445}
14461446
14471447#define DSJ(R)                                                  \
14481448{                                                               \
1449   if (--R##REG(tms,DSTREG(op)))                                       \
1449   if (--R##REG(DSTREG(op)))                                       \
14501450   {                                                           \
1451      tms->pc += (PARAM_WORD_NO_INC(tms)<<4)+0x10;                    \
1452      COUNT_CYCLES(tms,3);                                        \
1451      m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                    \
1452      COUNT_CYCLES(3);                                        \
14531453   }                                                           \
14541454   else                                                        \
14551455   {                                                           \
1456      SKIP_WORD(tms);                                             \
1457      COUNT_CYCLES(tms,2);                                        \
1456      SKIP_WORD();                                             \
1457      COUNT_CYCLES(2);                                        \
14581458   }                                                           \
14591459}
1460static void dsj_a (tms34010_state *tms, UINT16 op) { DSJ(A); }
1461static void dsj_b (tms34010_state *tms, UINT16 op) { DSJ(B); }
1460void tms340x0_device::dsj_a (UINT16 op) { DSJ(A); }
1461void tms340x0_device::dsj_b (UINT16 op) { DSJ(B); }
14621462
14631463#define DSJEQ(R)                                                \
14641464{                                                               \
1465   if (Z_FLAG(tms))                                                    \
1465   if (Z_FLAG())                                                    \
14661466   {                                                           \
1467      if (--R##REG(tms,DSTREG(op)))                                   \
1467      if (--R##REG(DSTREG(op)))                                   \
14681468      {                                                       \
1469         tms->pc += (PARAM_WORD_NO_INC(tms)<<4)+0x10;                \
1470         COUNT_CYCLES(tms,3);                                    \
1469         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1470         COUNT_CYCLES(3);                                    \
14711471      }                                                       \
14721472      else                                                    \
14731473      {                                                       \
1474         SKIP_WORD(tms);                                         \
1475         COUNT_CYCLES(tms,2);                                    \
1474         SKIP_WORD();                                         \
1475         COUNT_CYCLES(2);                                    \
14761476      }                                                       \
14771477   }                                                           \
14781478   else                                                        \
14791479   {                                                           \
1480      SKIP_WORD(tms);                                             \
1481      COUNT_CYCLES(tms,2);                                        \
1480      SKIP_WORD();                                             \
1481      COUNT_CYCLES(2);                                        \
14821482   }                                                           \
14831483}
1484static void dsjeq_a (tms34010_state *tms, UINT16 op) { DSJEQ(A); }
1485static void dsjeq_b (tms34010_state *tms, UINT16 op) { DSJEQ(B); }
1484void tms340x0_device::dsjeq_a (UINT16 op) { DSJEQ(A); }
1485void tms340x0_device::dsjeq_b (UINT16 op) { DSJEQ(B); }
14861486
14871487#define DSJNE(R)                                                \
14881488{                                                               \
1489   if (!Z_FLAG(tms))                                               \
1489   if (!Z_FLAG())                                               \
14901490   {                                                           \
1491      if (--R##REG(tms,DSTREG(op)))                                   \
1491      if (--R##REG(DSTREG(op)))                                   \
14921492      {                                                       \
1493         tms->pc += (PARAM_WORD_NO_INC(tms)<<4)+0x10;                \
1494         COUNT_CYCLES(tms,3);                                    \
1493         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1494         COUNT_CYCLES(3);                                    \
14951495      }                                                       \
14961496      else                                                    \
14971497      {                                                       \
1498         SKIP_WORD(tms);                                         \
1499         COUNT_CYCLES(tms,2);                                    \
1498         SKIP_WORD();                                         \
1499         COUNT_CYCLES(2);                                    \
15001500      }                                                       \
15011501   }                                                           \
15021502   else                                                        \
15031503   {                                                           \
1504      SKIP_WORD(tms);                                             \
1505      COUNT_CYCLES(tms,2);                                        \
1504      SKIP_WORD();                                             \
1505      COUNT_CYCLES(2);                                        \
15061506   }                                                           \
15071507}
1508static void dsjne_a (tms34010_state *tms, UINT16 op) { DSJNE(A); }
1509static void dsjne_b (tms34010_state *tms, UINT16 op) { DSJNE(B); }
1508void tms340x0_device::dsjne_a (UINT16 op) { DSJNE(A); }
1509void tms340x0_device::dsjne_b (UINT16 op) { DSJNE(B); }
15101510
15111511#define DSJS(R)                                                 \
15121512{                                                               \
15131513   if (op & 0x0400)                                        \
15141514   {                                                           \
1515      if (--R##REG(tms,DSTREG(op)))                                   \
1515      if (--R##REG(DSTREG(op)))                                   \
15161516      {                                                       \
1517         tms->pc -= ((PARAM_K(op))<<4);                              \
1518         COUNT_CYCLES(tms,2);                                    \
1517         m_pc -= ((PARAM_K(op))<<4);                              \
1518         COUNT_CYCLES(2);                                    \
15191519      }                                                       \
15201520      else                                                    \
1521         COUNT_CYCLES(tms,3);                                    \
1521         COUNT_CYCLES(3);                                    \
15221522   }                                                           \
15231523   else                                                        \
15241524   {                                                           \
1525      if (--R##REG(tms,DSTREG(op)))                                   \
1525      if (--R##REG(DSTREG(op)))                                   \
15261526      {                                                       \
1527         tms->pc += ((PARAM_K(op))<<4);                              \
1528         COUNT_CYCLES(tms,2);                                    \
1527         m_pc += ((PARAM_K(op))<<4);                              \
1528         COUNT_CYCLES(2);                                    \
15291529      }                                                       \
15301530      else                                                    \
1531         COUNT_CYCLES(tms,3);                                    \
1531         COUNT_CYCLES(3);                                    \
15321532   }                                                           \
15331533}
1534static void dsjs_a (tms34010_state *tms, UINT16 op) { DSJS(A); }
1535static void dsjs_b (tms34010_state *tms, UINT16 op) { DSJS(B); }
1534void tms340x0_device::dsjs_a (UINT16 op) { DSJS(A); }
1535void tms340x0_device::dsjs_b (UINT16 op) { DSJS(B); }
15361536
1537static void emu(tms34010_state *tms, UINT16 op)
1537void tms340x0_device::emu(UINT16 op)
15381538{
15391539   /* in RUN state, this instruction is a NOP */
1540   COUNT_CYCLES(tms,6);
1540   COUNT_CYCLES(6);
15411541}
15421542
15431543#define EXGPC(R)                                                \
15441544{                                                               \
1545   INT32 *rd = &R##REG(tms,DSTREG(op));                                \
1545   INT32 *rd = &R##REG(DSTREG(op));                                \
15461546   INT32 temppc = *rd;                                         \
1547   *rd = tms->pc;                                                  \
1548   tms->pc = temppc;                                               \
1549   CORRECT_ODD_PC(tms,"EXGPC");                                    \
1550   COUNT_CYCLES(tms,2);                                            \
1547   *rd = m_pc;                                                  \
1548   m_pc = temppc;                                               \
1549   CORRECT_ODD_PC("EXGPC");                                    \
1550   COUNT_CYCLES(2);                                            \
15511551}
1552static void exgpc_a (tms34010_state *tms, UINT16 op) { EXGPC(A); }
1553static void exgpc_b (tms34010_state *tms, UINT16 op) { EXGPC(B); }
1552void tms340x0_device::exgpc_a (UINT16 op) { EXGPC(A); }
1553void tms340x0_device::exgpc_b (UINT16 op) { EXGPC(B); }
15541554
15551555#define GETPC(R)                                                \
15561556{                                                               \
1557   R##REG(tms,DSTREG(op)) = tms->pc;                                       \
1558   COUNT_CYCLES(tms,1);                                            \
1557   R##REG(DSTREG(op)) = m_pc;                                       \
1558   COUNT_CYCLES(1);                                            \
15591559}
1560static void getpc_a (tms34010_state *tms, UINT16 op) { GETPC(A); }
1561static void getpc_b (tms34010_state *tms, UINT16 op) { GETPC(B); }
1560void tms340x0_device::getpc_a (UINT16 op) { GETPC(A); }
1561void tms340x0_device::getpc_b (UINT16 op) { GETPC(B); }
15621562
15631563#define GETST(R)                                                \
15641564{                                                               \
1565   R##REG(tms,DSTREG(op)) = tms->st;                               \
1566   COUNT_CYCLES(tms,1);                                            \
1565   R##REG(DSTREG(op)) = m_st;                               \
1566   COUNT_CYCLES(1);                                            \
15671567}
1568static void getst_a (tms34010_state *tms, UINT16 op) { GETST(A); }
1569static void getst_b (tms34010_state *tms, UINT16 op) { GETST(B); }
1568void tms340x0_device::getst_a (UINT16 op) { GETST(A); }
1569void tms340x0_device::getst_b (UINT16 op) { GETST(B); }
15701570
15711571#define j_xx_8(TAKE)                                            \
15721572{                                                               \
r31176r31177
15741574   {                                                           \
15751575      if (TAKE)                                               \
15761576      {                                                       \
1577         tms->pc += (PARAM_REL8(op) << 4);                           \
1578         COUNT_CYCLES(tms,2);                                    \
1577         m_pc += (PARAM_REL8(op) << 4);                           \
1578         COUNT_CYCLES(2);                                    \
15791579      }                                                       \
15801580      else                                                    \
1581         COUNT_CYCLES(tms,1);                                    \
1581         COUNT_CYCLES(1);                                    \
15821582   }                                                           \
15831583   else                                                        \
15841584   {                                                           \
15851585      if (TAKE)                                               \
15861586      {                                                       \
1587         tms->pc = PARAM_LONG_NO_INC(tms);                       \
1588         CORRECT_ODD_PC(tms,"J_XX_8");                           \
1589         COUNT_CYCLES(tms,3);                                    \
1587         m_pc = PARAM_LONG_NO_INC();                       \
1588         CORRECT_ODD_PC("J_XX_8");                           \
1589         COUNT_CYCLES(3);                                    \
15901590      }                                                       \
15911591      else                                                    \
15921592      {                                                       \
1593         SKIP_LONG(tms);                                         \
1594         COUNT_CYCLES(tms,4);                                    \
1593         SKIP_LONG();                                         \
1594         COUNT_CYCLES(4);                                    \
15951595      }                                                       \
15961596   }                                                           \
15971597}
r31176r31177
16021602   {                                                           \
16031603      if (TAKE)                                               \
16041604      {                                                       \
1605         tms->pc += (PARAM_REL8(op) << 4);                           \
1606         COUNT_CYCLES(tms,2);                                    \
1605         m_pc += (PARAM_REL8(op) << 4);                           \
1606         COUNT_CYCLES(2);                                    \
16071607      }                                                       \
16081608      else                                                    \
1609         COUNT_CYCLES(tms,1);                                    \
1609         COUNT_CYCLES(1);                                    \
16101610   }                                                           \
16111611   else                                                        \
16121612   {                                                           \
16131613      if (TAKE)                                               \
16141614      {                                                       \
1615         tms->pc += (PARAM_WORD_NO_INC(tms)<<4)+0x10;                \
1616         COUNT_CYCLES(tms,3);                                    \
1615         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1616         COUNT_CYCLES(3);                                    \
16171617      }                                                       \
16181618      else                                                    \
16191619      {                                                       \
1620         SKIP_WORD(tms);                                         \
1621         COUNT_CYCLES(tms,2);                                    \
1620         SKIP_WORD();                                         \
1621         COUNT_CYCLES(2);                                    \
16221622      }                                                       \
16231623   }                                                           \
16241624}
r31176r31177
16271627{                                                               \
16281628   if (TAKE)                                                   \
16291629   {                                                           \
1630      tms->pc += (PARAM_REL8(op) << 4);                               \
1631      COUNT_CYCLES(tms,2);                                        \
1630      m_pc += (PARAM_REL8(op) << 4);                               \
1631      COUNT_CYCLES(2);                                        \
16321632   }                                                           \
16331633   else                                                        \
1634      COUNT_CYCLES(tms,1);                                        \
1634      COUNT_CYCLES(1);                                        \
16351635}
16361636
1637static void j_UC_0(tms34010_state *tms, UINT16 op)
1637void tms340x0_device::j_UC_0(UINT16 op)
16381638{
16391639   j_xx_0(1);
16401640}
1641static void j_UC_8(tms34010_state *tms, UINT16 op)
1641void tms340x0_device::j_UC_8(UINT16 op)
16421642{
16431643   j_xx_8(1);
16441644}
1645static void j_UC_x(tms34010_state *tms, UINT16 op)
1645void tms340x0_device::j_UC_x(UINT16 op)
16461646{
16471647   j_xx_x(1);
16481648}
1649static void j_P_0(tms34010_state *tms, UINT16 op)
1649void tms340x0_device::j_P_0(UINT16 op)
16501650{
1651   j_xx_0(!N_FLAG(tms) && !Z_FLAG(tms));
1651   j_xx_0(!N_FLAG() && !Z_FLAG());
16521652}
1653static void j_P_8(tms34010_state *tms, UINT16 op)
1653void tms340x0_device::j_P_8(UINT16 op)
16541654{
1655   j_xx_8(!N_FLAG(tms) && !Z_FLAG(tms));
1655   j_xx_8(!N_FLAG() && !Z_FLAG());
16561656}
1657static void j_P_x(tms34010_state *tms, UINT16 op)
1657void tms340x0_device::j_P_x(UINT16 op)
16581658{
1659   j_xx_x(!N_FLAG(tms) && !Z_FLAG(tms));
1659   j_xx_x(!N_FLAG() && !Z_FLAG());
16601660}
1661static void j_LS_0(tms34010_state *tms, UINT16 op)
1661void tms340x0_device::j_LS_0(UINT16 op)
16621662{
1663   j_xx_0(C_FLAG(tms) || Z_FLAG(tms));
1663   j_xx_0(C_FLAG() || Z_FLAG());
16641664}
1665static void j_LS_8(tms34010_state *tms, UINT16 op)
1665void tms340x0_device::j_LS_8(UINT16 op)
16661666{
1667   j_xx_8(C_FLAG(tms) || Z_FLAG(tms));
1667   j_xx_8(C_FLAG() || Z_FLAG());
16681668}
1669static void j_LS_x(tms34010_state *tms, UINT16 op)
1669void tms340x0_device::j_LS_x(UINT16 op)
16701670{
1671   j_xx_x(C_FLAG(tms) || Z_FLAG(tms));
1671   j_xx_x(C_FLAG() || Z_FLAG());
16721672}
1673static void j_HI_0(tms34010_state *tms, UINT16 op)
1673void tms340x0_device::j_HI_0(UINT16 op)
16741674{
1675   j_xx_0(!C_FLAG(tms) && !Z_FLAG(tms));
1675   j_xx_0(!C_FLAG() && !Z_FLAG());
16761676}
1677static void j_HI_8(tms34010_state *tms, UINT16 op)
1677void tms340x0_device::j_HI_8(UINT16 op)
16781678{
1679   j_xx_8(!C_FLAG(tms) && !Z_FLAG(tms));
1679   j_xx_8(!C_FLAG() && !Z_FLAG());
16801680}
1681static void j_HI_x(tms34010_state *tms, UINT16 op)
1681void tms340x0_device::j_HI_x(UINT16 op)
16821682{
1683   j_xx_x(!C_FLAG(tms) && !Z_FLAG(tms));
1683   j_xx_x(!C_FLAG() && !Z_FLAG());
16841684}
1685static void j_LT_0(tms34010_state *tms, UINT16 op)
1685void tms340x0_device::j_LT_0(UINT16 op)
16861686{
1687   j_xx_0((N_FLAG(tms) && !V_FLAG(tms)) || (!N_FLAG(tms) && V_FLAG(tms)));
1687   j_xx_0((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
16881688}
1689static void j_LT_8(tms34010_state *tms, UINT16 op)
1689void tms340x0_device::j_LT_8(UINT16 op)
16901690{
1691   j_xx_8((N_FLAG(tms) && !V_FLAG(tms)) || (!N_FLAG(tms) && V_FLAG(tms)));
1691   j_xx_8((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
16921692}
1693static void j_LT_x(tms34010_state *tms, UINT16 op)
1693void tms340x0_device::j_LT_x(UINT16 op)
16941694{
1695   j_xx_x((N_FLAG(tms) && !V_FLAG(tms)) || (!N_FLAG(tms) && V_FLAG(tms)));
1695   j_xx_x((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
16961696}
1697static void j_GE_0(tms34010_state *tms, UINT16 op)
1697void tms340x0_device::j_GE_0(UINT16 op)
16981698{
1699   j_xx_0((N_FLAG(tms) && V_FLAG(tms)) || (!N_FLAG(tms) && !V_FLAG(tms)));
1699   j_xx_0((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
17001700}
1701static void j_GE_8(tms34010_state *tms, UINT16 op)
1701void tms340x0_device::j_GE_8(UINT16 op)
17021702{
1703   j_xx_8((N_FLAG(tms) && V_FLAG(tms)) || (!N_FLAG(tms) && !V_FLAG(tms)));
1703   j_xx_8((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
17041704}
1705static void j_GE_x(tms34010_state *tms, UINT16 op)
1705void tms340x0_device::j_GE_x(UINT16 op)
17061706{
1707   j_xx_x((N_FLAG(tms) && V_FLAG(tms)) || (!N_FLAG(tms) && !V_FLAG(tms)));
1707   j_xx_x((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
17081708}
1709static void j_LE_0(tms34010_state *tms, UINT16 op)
1709void tms340x0_device::j_LE_0(UINT16 op)
17101710{
1711   j_xx_0((N_FLAG(tms) && !V_FLAG(tms)) || (!N_FLAG(tms) && V_FLAG(tms)) || Z_FLAG(tms));
1711   j_xx_0((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
17121712}
1713static void j_LE_8(tms34010_state *tms, UINT16 op)
1713void tms340x0_device::j_LE_8(UINT16 op)
17141714{
1715   j_xx_8((N_FLAG(tms) && !V_FLAG(tms)) || (!N_FLAG(tms) && V_FLAG(tms)) || Z_FLAG(tms));
1715   j_xx_8((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
17161716}
1717static void j_LE_x(tms34010_state *tms, UINT16 op)
1717void tms340x0_device::j_LE_x(UINT16 op)
17181718{
1719   j_xx_x((N_FLAG(tms) && !V_FLAG(tms)) || (!N_FLAG(tms) && V_FLAG(tms)) || Z_FLAG(tms));
1719   j_xx_x((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
17201720}
1721static void j_GT_0(tms34010_state *tms, UINT16 op)
1721void tms340x0_device::j_GT_0(UINT16 op)
17221722{
1723   j_xx_0((N_FLAG(tms) && V_FLAG(tms) && !Z_FLAG(tms)) || (!N_FLAG(tms) && !V_FLAG(tms) && !Z_FLAG(tms)));
1723   j_xx_0((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
17241724}
1725static void j_GT_8(tms34010_state *tms, UINT16 op)
1725void tms340x0_device::j_GT_8(UINT16 op)
17261726{
1727   j_xx_8((N_FLAG(tms) && V_FLAG(tms) && !Z_FLAG(tms)) || (!N_FLAG(tms) && !V_FLAG(tms) && !Z_FLAG(tms)));
1727   j_xx_8((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
17281728}
1729static void j_GT_x(tms34010_state *tms, UINT16 op)
1729void tms340x0_device::j_GT_x(UINT16 op)
17301730{
1731   j_xx_x((N_FLAG(tms) && V_FLAG(tms) && !Z_FLAG(tms)) || (!N_FLAG(tms) && !V_FLAG(tms) && !Z_FLAG(tms)));
1731   j_xx_x((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
17321732}
1733static void j_C_0(tms34010_state *tms, UINT16 op)
1733void tms340x0_device::j_C_0(UINT16 op)
17341734{
1735   j_xx_0(C_FLAG(tms));
1735   j_xx_0(C_FLAG());
17361736}
1737static void j_C_8(tms34010_state *tms, UINT16 op)
1737void tms340x0_device::j_C_8(UINT16 op)
17381738{
1739   j_xx_8(C_FLAG(tms));
1739   j_xx_8(C_FLAG());
17401740}
1741static void j_C_x(tms34010_state *tms, UINT16 op)
1741void tms340x0_device::j_C_x(UINT16 op)
17421742{
1743   j_xx_x(C_FLAG(tms));
1743   j_xx_x(C_FLAG());
17441744}
1745static void j_NC_0(tms34010_state *tms, UINT16 op)
1745void tms340x0_device::j_NC_0(UINT16 op)
17461746{
1747   j_xx_0(!C_FLAG(tms));
1747   j_xx_0(!C_FLAG());
17481748}
1749static void j_NC_8(tms34010_state *tms, UINT16 op)
1749void tms340x0_device::j_NC_8(UINT16 op)
17501750{
1751   j_xx_8(!C_FLAG(tms));
1751   j_xx_8(!C_FLAG());
17521752}
1753static void j_NC_x(tms34010_state *tms, UINT16 op)
1753void tms340x0_device::j_NC_x(UINT16 op)
17541754{
1755   j_xx_x(!C_FLAG(tms));
1755   j_xx_x(!C_FLAG());
17561756}
1757static void j_EQ_0(tms34010_state *tms, UINT16 op)
1757void tms340x0_device::j_EQ_0(UINT16 op)
17581758{
1759   j_xx_0(Z_FLAG(tms));
1759   j_xx_0(Z_FLAG());
17601760}
1761static void j_EQ_8(tms34010_state *tms, UINT16 op)
1761void tms340x0_device::j_EQ_8(UINT16 op)
17621762{
1763   j_xx_8(Z_FLAG(tms));
1763   j_xx_8(Z_FLAG());
17641764}
1765static void j_EQ_x(tms34010_state *tms, UINT16 op)
1765void tms340x0_device::j_EQ_x(UINT16 op)
17661766{
1767   j_xx_x(Z_FLAG(tms));
1767   j_xx_x(Z_FLAG());
17681768}
1769static void j_NE_0(tms34010_state *tms, UINT16 op)
1769void tms340x0_device::j_NE_0(UINT16 op)
17701770{
1771   j_xx_0(!Z_FLAG(tms));
1771   j_xx_0(!Z_FLAG());
17721772}
1773static void j_NE_8(tms34010_state *tms, UINT16 op)
1773void tms340x0_device::j_NE_8(UINT16 op)
17741774{
1775   j_xx_8(!Z_FLAG(tms));
1775   j_xx_8(!Z_FLAG());
17761776}
1777static void j_NE_x(tms34010_state *tms, UINT16 op)
1777void tms340x0_device::j_NE_x(UINT16 op)
17781778{
1779   j_xx_x(!Z_FLAG(tms));
1779   j_xx_x(!Z_FLAG());
17801780}
1781static void j_V_0(tms34010_state *tms, UINT16 op)
1781void tms340x0_device::j_V_0(UINT16 op)
17821782{
1783   j_xx_0(V_FLAG(tms));
1783   j_xx_0(V_FLAG());
17841784}
1785static void j_V_8(tms34010_state *tms, UINT16 op)
1785void tms340x0_device::j_V_8(UINT16 op)
17861786{
1787   j_xx_8(V_FLAG(tms));
1787   j_xx_8(V_FLAG());
17881788}
1789static void j_V_x(tms34010_state *tms, UINT16 op)
1789void tms340x0_device::j_V_x(UINT16 op)
17901790{
1791   j_xx_x(V_FLAG(tms));
1791   j_xx_x(V_FLAG());
17921792}
1793static void j_NV_0(tms34010_state *tms, UINT16 op)
1793void tms340x0_device::j_NV_0(UINT16 op)
17941794{
1795   j_xx_0(!V_FLAG(tms));
1795   j_xx_0(!V_FLAG());
17961796}
1797static void j_NV_8(tms34010_state *tms, UINT16 op)
1797void tms340x0_device::j_NV_8(UINT16 op)
17981798{
1799   j_xx_8(!V_FLAG(tms));
1799   j_xx_8(!V_FLAG());
18001800}
1801static void j_NV_x(tms34010_state *tms, UINT16 op)
1801void tms340x0_device::j_NV_x(UINT16 op)
18021802{
1803   j_xx_x(!V_FLAG(tms));
1803   j_xx_x(!V_FLAG());
18041804}
1805static void j_N_0(tms34010_state *tms, UINT16 op)
1805void tms340x0_device::j_N_0(UINT16 op)
18061806{
1807   j_xx_0(N_FLAG(tms));
1807   j_xx_0(N_FLAG());
18081808}
1809static void j_N_8(tms34010_state *tms, UINT16 op)
1809void tms340x0_device::j_N_8(UINT16 op)
18101810{
1811   j_xx_8(N_FLAG(tms));
1811   j_xx_8(N_FLAG());
18121812}
1813static void j_N_x(tms34010_state *tms, UINT16 op)
1813void tms340x0_device::j_N_x(UINT16 op)
18141814{
1815   j_xx_x(N_FLAG(tms));
1815   j_xx_x(N_FLAG());
18161816}
1817static void j_NN_0(tms34010_state *tms, UINT16 op)
1817void tms340x0_device::j_NN_0(UINT16 op)
18181818{
1819   j_xx_0(!N_FLAG(tms));
1819   j_xx_0(!N_FLAG());
18201820}
1821static void j_NN_8(tms34010_state *tms, UINT16 op)
1821void tms340x0_device::j_NN_8(UINT16 op)
18221822{
1823   j_xx_8(!N_FLAG(tms));
1823   j_xx_8(!N_FLAG());
18241824}
1825static void j_NN_x(tms34010_state *tms, UINT16 op)
1825void tms340x0_device::j_NN_x(UINT16 op)
18261826{
1827   j_xx_x(!N_FLAG(tms));
1827   j_xx_x(!N_FLAG());
18281828}
18291829
18301830#define JUMP(R)                                                 \
18311831{                                                               \
1832   tms->pc = R##REG(tms,DSTREG(op));                                       \
1833   CORRECT_ODD_PC(tms,"JUMP");                                     \
1834   COUNT_CYCLES(tms,2);                                            \
1832   m_pc = R##REG(DSTREG(op));                                       \
1833   CORRECT_ODD_PC("JUMP");                                     \
1834   COUNT_CYCLES(2);                                            \
18351835}
1836static void jump_a (tms34010_state *tms, UINT16 op) { JUMP(A); }
1837static void jump_b (tms34010_state *tms, UINT16 op) { JUMP(B); }
1836void tms340x0_device::jump_a (UINT16 op) { JUMP(A); }
1837void tms340x0_device::jump_b (UINT16 op) { JUMP(B); }
18381838
1839static void popst(tms34010_state *tms, UINT16 op)
1839void tms340x0_device::popst(UINT16 op)
18401840{
1841   SET_ST(tms, POP(tms));
1842   COUNT_CYCLES(tms,8);
1841   SET_ST(POP());
1842   COUNT_CYCLES(8);
18431843}
18441844
1845static void pushst(tms34010_state *tms, UINT16 op)
1845void tms340x0_device::pushst(UINT16 op)
18461846{
1847   PUSH(tms, tms->st);
1848   COUNT_CYCLES(tms,2);
1847   PUSH(m_st);
1848   COUNT_CYCLES(2);
18491849}
18501850
18511851#define PUTST(R)                                                \
18521852{                                                               \
1853   SET_ST(tms, R##REG(tms,DSTREG(op)));                                \
1854   COUNT_CYCLES(tms,3);                                            \
1853   SET_ST(R##REG(DSTREG(op)));                                \
1854   COUNT_CYCLES(3);                                            \
18551855}
1856static void putst_a (tms34010_state *tms, UINT16 op) { PUTST(A); }
1857static void putst_b (tms34010_state *tms, UINT16 op) { PUTST(B); }
1856void tms340x0_device::putst_a (UINT16 op) { PUTST(A); }
1857void tms340x0_device::putst_b (UINT16 op) { PUTST(B); }
18581858
1859static void reti(tms34010_state *tms, UINT16 op)
1859void tms340x0_device::reti(UINT16 op)
18601860{
1861   INT32 st = POP(tms);
1862   tms->pc = POP(tms);
1863   CORRECT_ODD_PC(tms,"RETI");
1864   SET_ST(tms, st);
1865   COUNT_CYCLES(tms,11);
1861   INT32 st = POP();
1862   m_pc = POP();
1863   CORRECT_ODD_PC("RETI");
1864   SET_ST(st);
1865   COUNT_CYCLES(11);
18661866}
18671867
1868static void rets(tms34010_state *tms, UINT16 op)
1868void tms340x0_device::rets(UINT16 op)
18691869{
18701870   UINT32 offs;
1871   tms->pc = POP(tms);
1872   CORRECT_ODD_PC(tms,"RETS");
1871   m_pc = POP();
1872   CORRECT_ODD_PC("RETS");
18731873   offs = PARAM_N(op);
18741874   if (offs)
18751875   {
1876      SP(tms)+=(offs<<4);
1876      SP()+=(offs<<4);
18771877   }
1878   COUNT_CYCLES(tms,7);
1878   COUNT_CYCLES(7);
18791879}
18801880
18811881#define REV(R)                                                  \
18821882{                                                               \
1883   R##REG(tms,DSTREG(op)) = 0x0008;                                    \
1884   COUNT_CYCLES(tms,1);                                            \
1883   R##REG(DSTREG(op)) = 0x0008;                                    \
1884   COUNT_CYCLES(1);                                            \
18851885}
1886static void rev_a (tms34010_state *tms, UINT16 op) { REV(A); }
1887static void rev_b (tms34010_state *tms, UINT16 op) { REV(B); }
1886void tms340x0_device::rev_a (UINT16 op) { REV(A); }
1887void tms340x0_device::rev_b (UINT16 op) { REV(B); }
18881888
1889static void trap(tms34010_state *tms, UINT16 op)
1889void tms340x0_device::trap(UINT16 op)
18901890{
18911891   UINT32 t = PARAM_N(op);
18921892   if (t)
18931893   {
1894      PUSH(tms, tms->pc);
1895      PUSH(tms, tms->st);
1894      PUSH(m_pc);
1895      PUSH(m_st);
18961896   }
1897   RESET_ST(tms);
1898   tms->pc = RLONG(tms, 0xffffffe0-(t<<5));
1899   CORRECT_ODD_PC(tms,"TRAP");
1900   COUNT_CYCLES(tms,16);
1897   RESET_ST();
1898   m_pc = RLONG(0xffffffe0-(t<<5));
1899   CORRECT_ODD_PC("TRAP");
1900   COUNT_CYCLES(16);
19011901}
19021902
19031903
r31176r31177
20182018
20192019#define ADD_XYI(R)                              \
20202020{                                               \
2021   UINT32 a = PARAM_LONG(tms);                 \
2022   XY *b = &R##REG_XY(tms,DSTREG(op));                 \
2023   CLR_NCZV(tms);                                  \
2021   UINT32 a = PARAM_LONG();                 \
2022   XY *b = &R##REG_XY(DSTREG(op));                 \
2023   CLR_NCZV();                                  \
20242024   b->x += (INT16)(a & 0xffff);                \
20252025   b->y += ((INT32)a >> 16);                   \
2026   SET_N_LOG(tms, b->x == 0);                      \
2027   SET_C_BIT_LO(tms, b->y, 15);                        \
2028   SET_Z_LOG(tms, b->y == 0);                      \
2029   SET_V_BIT_LO(tms, b->x, 15);                        \
2030   COUNT_CYCLES(tms,1);                            \
2026   SET_N_LOG(b->x == 0);                      \
2027   SET_C_BIT_LO(b->y, 15);                        \
2028   SET_Z_LOG(b->y == 0);                      \
2029   SET_V_BIT_LO(b->x, 15);                        \
2030   COUNT_CYCLES(1);                            \
20312031}
2032static void addxyi_a(tms34010_state *tms, UINT16 op)
2032void tms340x0_device::addxyi_a(UINT16 op)
20332033{
2034   if (!tms->is_34020) { unimpl(tms, op); return; }
2034   if (!m_is_34020) { unimpl(op); return; }
20352035   ADD_XYI(A);
20362036}
2037static void addxyi_b(tms34010_state *tms, UINT16 op)
2037void tms340x0_device::addxyi_b(UINT16 op)
20382038{
2039   if (!tms->is_34020) { unimpl(tms, op); return; }
2039   if (!m_is_34020) { unimpl(op); return; }
20402040   ADD_XYI(B);
20412041}
20422042
2043static void blmove(tms34010_state *tms, UINT16 op)
2043void tms340x0_device::blmove(UINT16 op)
20442044{
2045   offs_t src = BREG(tms,0);
2046   offs_t dst = BREG(tms,2);
2047   offs_t bits = BREG(tms,7);
2045   offs_t src = BREG(0);
2046   offs_t dst = BREG(2);
2047   offs_t bits = BREG(7);
20482048
2049   if (!tms->is_34020) { unimpl(tms, op); return; }
2049   if (!m_is_34020) { unimpl(op); return; }
20502050
20512051   /* src and dst are aligned */
20522052   if (!(src & 0x0f) && !(dst & 0x0f))
20532053   {
2054      while (bits >= 16 && tms->icount > 0)
2054      while (bits >= 16 && m_icount > 0)
20552055      {
2056         TMS34010_WRMEM_WORD(tms, TOBYTE(dst), TMS34010_RDMEM_WORD(tms, TOBYTE(src)));
2056         TMS34010_WRMEM_WORD(TOBYTE(dst), TMS34010_RDMEM_WORD(TOBYTE(src)));
20572057         src += 0x10;
20582058         dst += 0x10;
20592059         bits -= 0x10;
2060         tms->icount -= 2;
2060         m_icount -= 2;
20612061      }
2062      if (bits != 0 && tms->icount > 0)
2062      if (bits != 0 && m_icount > 0)
20632063      {
2064         (*tms34010_wfield_functions[bits])(tms, dst, (*tms34010_rfield_functions[bits])(tms, src));
2064         (this->*s_wfield_functions[bits])(dst, (this->*s_rfield_functions[bits])(src));
20652065         dst += bits;
20662066         src += bits;
20672067         bits = 0;
2068         tms->icount -= 2;
2068         m_icount -= 2;
20692069      }
20702070   }
20712071
r31176r31177
20882088   }
20892089
20902090   /* update the final results */
2091   BREG(tms,0) = src;
2092   BREG(tms,2) = dst;
2093   BREG(tms,7) = bits;
2091   BREG(0) = src;
2092   BREG(2) = dst;
2093   BREG(7) = bits;
20942094
20952095   /* if we're not done yet, back up the PC */
20962096   if (bits != 0)
2097      tms->pc -= 0x10;
2097      m_pc -= 0x10;
20982098}
20992099
2100static void cexec_l(tms34010_state *tms, UINT16 op)
2100void tms340x0_device::cexec_l(UINT16 op)
21012101{
2102   if (!tms->is_34020) { unimpl(tms, op); return; }
2102   if (!m_is_34020) { unimpl(op); return; }
21032103   logerror("020:cexec_l\n");
21042104}
21052105
2106static void cexec_s(tms34010_state *tms, UINT16 op)
2106void tms340x0_device::cexec_s(UINT16 op)
21072107{
2108   if (!tms->is_34020) { unimpl(tms, op); return; }
2108   if (!m_is_34020) { unimpl(op); return; }
21092109   logerror("020:cexec_s\n");
21102110}
21112111
2112static void clip(tms34010_state *tms, UINT16 op)
2112void tms340x0_device::clip(UINT16 op)
21132113{
2114   if (!tms->is_34020) { unimpl(tms, op); return; }
2114   if (!m_is_34020) { unimpl(op); return; }
21152115   logerror("020:clip\n");
21162116}
21172117
2118static void cmovcg_a(tms34010_state *tms, UINT16 op)
2118void tms340x0_device::cmovcg_a(UINT16 op)
21192119{
2120   if (!tms->is_34020) { unimpl(tms, op); return; }
2120   if (!m_is_34020) { unimpl(op); return; }
21212121   logerror("020:cmovcg_a\n");
21222122}
21232123
2124static void cmovcg_b(tms34010_state *tms, UINT16 op)
2124void tms340x0_device::cmovcg_b(UINT16 op)
21252125{
2126   if (!tms->is_34020) { unimpl(tms, op); return; }
2126   if (!m_is_34020) { unimpl(op); return; }
21272127   logerror("020:cmovcg_b\n");
21282128}
21292129
2130static void cmovcm_f(tms34010_state *tms, UINT16 op)
2130void tms340x0_device::cmovcm_f(UINT16 op)
21312131{
2132   if (!tms->is_34020) { unimpl(tms, op); return; }
2132   if (!m_is_34020) { unimpl(op); return; }
21332133   logerror("020:cmovcm_f\n");
21342134}
21352135
2136static void cmovcm_b(tms34010_state *tms, UINT16 op)
2136void tms340x0_device::cmovcm_b(UINT16 op)
21372137{
2138   if (!tms->is_34020) { unimpl(tms, op); return; }
2138   if (!m_is_34020) { unimpl(op); return; }
21392139   logerror("020:cmovcm_b\n");
21402140}
21412141
2142static void cmovgc_a(tms34010_state *tms, UINT16 op)
2142void tms340x0_device::cmovgc_a(UINT16 op)
21432143{
2144   if (!tms->is_34020) { unimpl(tms, op); return; }
2144   if (!m_is_34020) { unimpl(op); return; }
21452145   logerror("020:cmovgc_a\n");
21462146}
21472147
2148static void cmovgc_b(tms34010_state *tms, UINT16 op)
2148void tms340x0_device::cmovgc_b(UINT16 op)
21492149{
2150   if (!tms->is_34020) { unimpl(tms, op); return; }
2150   if (!m_is_34020) { unimpl(op); return; }
21512151   logerror("020:cmovgc_b\n");
21522152}
21532153
2154static void cmovgc_a_s(tms34010_state *tms, UINT16 op)
2154void tms340x0_device::cmovgc_a_s(UINT16 op)
21552155{
2156   if (!tms->is_34020) { unimpl(tms, op); return; }
2156   if (!m_is_34020) { unimpl(op); return; }
21572157   logerror("020:cmovgc_a_s\n");
21582158}
21592159
2160static void cmovgc_b_s(tms34010_state *tms, UINT16 op)
2160void tms340x0_device::cmovgc_b_s(UINT16 op)
21612161{
2162   if (!tms->is_34020) { unimpl(tms, op); return; }
2162   if (!m_is_34020) { unimpl(op); return; }
21632163   logerror("020:cmovgc_b_s\n");
21642164}
21652165
2166static void cmovmc_f(tms34010_state *tms, UINT16 op)
2166void tms340x0_device::cmovmc_f(UINT16 op)
21672167{
2168   if (!tms->is_34020) { unimpl(tms, op); return; }
2168   if (!m_is_34020) { unimpl(op); return; }
21692169   logerror("020:cmovmc_f\n");
21702170}
21712171
2172static void cmovmc_f_va(tms34010_state *tms, UINT16 op)
2172void tms340x0_device::cmovmc_f_va(UINT16 op)
21732173{
2174   if (!tms->is_34020) { unimpl(tms, op); return; }
2174   if (!m_is_34020) { unimpl(op); return; }
21752175   logerror("020:cmovmc_f_va\n");
21762176}
21772177
2178static void cmovmc_f_vb(tms34010_state *tms, UINT16 op)
2178void tms340x0_device::cmovmc_f_vb(UINT16 op)
21792179{
2180   if (!tms->is_34020) { unimpl(tms, op); return; }
2180   if (!m_is_34020) { unimpl(op); return; }
21812181   logerror("020:cmovmc_f_vb\n");
21822182}
21832183
2184static void cmovmc_b(tms34010_state *tms, UINT16 op)
2184void tms340x0_device::cmovmc_b(UINT16 op)
21852185{
2186   if (!tms->is_34020) { unimpl(tms, op); return; }
2186   if (!m_is_34020) { unimpl(op); return; }
21872187   logerror("020:cmovmc_b\n");
21882188}
21892189
21902190#define CMPK(R)                                             \
21912191{                                                           \
21922192   INT32 r;                                                \
2193   INT32 *rd = &R##REG(tms,DSTREG(op));                            \
2193   INT32 *rd = &R##REG(DSTREG(op));                            \
21942194   INT32 t = PARAM_K(op); if (!t) t = 32;                      \
2195   CLR_NCZV(tms);                                              \
2195   CLR_NCZV();                                              \
21962196   r = *rd - t;                                            \
2197   SET_NZCV_SUB(tms,*rd,t,r);                                  \
2198   COUNT_CYCLES(tms,1);                                        \
2197   SET_NZCV_SUB(*rd,t,r);                                  \
2198   COUNT_CYCLES(1);                                        \
21992199}
2200static void cmp_k_a(tms34010_state *tms, UINT16 op)
2200void tms340x0_device::cmp_k_a(UINT16 op)
22012201{
2202   if (!tms->is_34020) { unimpl(tms, op); return; }
2202   if (!m_is_34020) { unimpl(op); return; }
22032203   CMPK(A);
22042204}
2205static void cmp_k_b(tms34010_state *tms, UINT16 op)
2205void tms340x0_device::cmp_k_b(UINT16 op)
22062206{
2207   if (!tms->is_34020) { unimpl(tms, op); return; }
2207   if (!m_is_34020) { unimpl(op); return; }
22082208   CMPK(B);
22092209}
22102210
2211static void cvdxyl_a(tms34010_state *tms, UINT16 op)
2211void tms340x0_device::cvdxyl_a(UINT16 op)
22122212{
2213   if (!tms->is_34020) { unimpl(tms, op); return; }
2213   if (!m_is_34020) { unimpl(op); return; }
22142214   logerror("020:cvdxyl_a\n");
22152215}
22162216
2217static void cvdxyl_b(tms34010_state *tms, UINT16 op)
2217void tms340x0_device::cvdxyl_b(UINT16 op)
22182218{
2219   if (!tms->is_34020) { unimpl(tms, op); return; }
2219   if (!m_is_34020) { unimpl(op); return; }
22202220   logerror("020:cvdxyl_b\n");
22212221}
22222222
2223static void cvmxyl_a(tms34010_state *tms, UINT16 op)
2223void tms340x0_device::cvmxyl_a(UINT16 op)
22242224{
2225   if (!tms->is_34020) { unimpl(tms, op); return; }
2225   if (!m_is_34020) { unimpl(op); return; }
22262226   logerror("020:cvmxyl_a\n");
22272227}
22282228
2229static void cvmxyl_b(tms34010_state *tms, UINT16 op)
2229void tms340x0_device::cvmxyl_b(UINT16 op)
22302230{
2231   if (!tms->is_34020) { unimpl(tms, op); return; }
2231   if (!m_is_34020) { unimpl(op); return; }
22322232   logerror("020:cvmxyl_b\n");
22332233}
22342234
2235static void cvsxyl_a(tms34010_state *tms, UINT16 op)
2235void tms340x0_device::cvsxyl_a(UINT16 op)
22362236{
2237   if (!tms->is_34020) { unimpl(tms, op); return; }
2237   if (!m_is_34020) { unimpl(op); return; }
22382238   logerror("020:cvsxyl_a\n");
22392239}
22402240
2241static void cvsxyl_b(tms34010_state *tms, UINT16 op)
2241void tms340x0_device::cvsxyl_b(UINT16 op)
22422242{
2243   if (!tms->is_34020) { unimpl(tms, op); return; }
2243   if (!m_is_34020) { unimpl(op); return; }
22442244   logerror("020:cvsxyl_b\n");
22452245}
22462246
2247static void exgps_a(tms34010_state *tms, UINT16 op)
2247void tms340x0_device::exgps_a(UINT16 op)
22482248{
2249   if (!tms->is_34020) { unimpl(tms, op); return; }
2249   if (!m_is_34020) { unimpl(op); return; }
22502250   logerror("020:exgps_a\n");
22512251}
22522252
2253static void exgps_b(tms34010_state *tms, UINT16 op)
2253void tms340x0_device::exgps_b(UINT16 op)
22542254{
2255   if (!tms->is_34020) { unimpl(tms, op); return; }
2255   if (!m_is_34020) { unimpl(op); return; }
22562256   logerror("020:exgps_b\n");
22572257}
22582258
2259static void fline(tms34010_state *tms, UINT16 op)
2259void tms340x0_device::fline(UINT16 op)
22602260{
2261   if (!tms->is_34020) { unimpl(tms, op); return; }
2261   if (!m_is_34020) { unimpl(op); return; }
22622262   logerror("020:fline\n");
22632263}
22642264
2265static void fpixeq(tms34010_state *tms, UINT16 op)
2265void tms340x0_device::fpixeq(UINT16 op)
22662266{
2267   if (!tms->is_34020) { unimpl(tms, op); return; }
2267   if (!m_is_34020) { unimpl(op); return; }
22682268   logerror("020:fpixeq\n");
22692269}
22702270
2271static void fpixne(tms34010_state *tms, UINT16 op)
2271void tms340x0_device::fpixne(UINT16 op)
22722272{
2273   if (!tms->is_34020) { unimpl(tms, op); return; }
2273   if (!m_is_34020) { unimpl(op); return; }
22742274   logerror("020:fpixne\n");
22752275}
22762276
2277static void getps_a(tms34010_state *tms, UINT16 op)
2277void tms340x0_device::getps_a(UINT16 op)
22782278{
2279   if (!tms->is_34020) { unimpl(tms, op); return; }
2279   if (!m_is_34020) { unimpl(op); return; }
22802280   logerror("020:getps_a\n");
22812281}
22822282
2283static void getps_b(tms34010_state *tms, UINT16 op)
2283void tms340x0_device::getps_b(UINT16 op)
22842284{
2285   if (!tms->is_34020) { unimpl(tms, op); return; }
2285   if (!m_is_34020) { unimpl(op); return; }
22862286   logerror("020:getps_b\n");
22872287}
22882288
2289static void idle(tms34010_state *tms, UINT16 op)
2289void tms340x0_device::idle(UINT16 op)
22902290{
2291   if (!tms->is_34020) { unimpl(tms, op); return; }
2291   if (!m_is_34020) { unimpl(op); return; }
22922292   logerror("020:idle\n");
22932293}
22942294
2295static void linit(tms34010_state *tms, UINT16 op)
2295void tms340x0_device::linit(UINT16 op)
22962296{
2297   if (!tms->is_34020) { unimpl(tms, op); return; }
2297   if (!m_is_34020) { unimpl(op); return; }
22982298   logerror("020:linit\n");
22992299}
23002300
2301static void mwait(tms34010_state *tms, UINT16 op)
2301void tms340x0_device::mwait(UINT16 op)
23022302{
2303   if (!tms->is_34020) { unimpl(tms, op); return; }
2303   if (!m_is_34020) { unimpl(op); return; }
23042304}
23052305
2306static void pfill_xy(tms34010_state *tms, UINT16 op)
2306void tms340x0_device::pfill_xy(UINT16 op)
23072307{
2308   if (!tms->is_34020) { unimpl(tms, op); return; }
2308   if (!m_is_34020) { unimpl(op); return; }
23092309   logerror("020:pfill_xy\n");
23102310}
23112311
2312static void pixblt_l_m_l(tms34010_state *tms, UINT16 op)
2312void tms340x0_device::pixblt_l_m_l(UINT16 op)
23132313{
2314   if (!tms->is_34020) { unimpl(tms, op); return; }
2314   if (!m_is_34020) { unimpl(op); return; }
23152315   logerror("020:pixblt_l_m_l\n");
23162316}
23172317
2318static void retm(tms34010_state *tms, UINT16 op)
2318void tms340x0_device::retm(UINT16 op)
23192319{
2320   if (!tms->is_34020) { unimpl(tms, op); return; }
2320   if (!m_is_34020) { unimpl(op); return; }
23212321   logerror("020:retm\n");
23222322}
23232323
23242324#define RMO(R)                                                  \
23252325{                                                               \
23262326   UINT32 res = 0;                                             \
2327   UINT32 rs  = R##REG(tms,SRCREG(op));                                \
2328      INT32 *rd = &R##REG(tms,DSTREG(op));                                \
2329   CLR_Z(tms);                                                     \
2330   SET_Z_VAL(tms, rs);                                             \
2327   UINT32 rs  = R##REG(SRCREG(op));                                \
2328      INT32 *rd = &R##REG(DSTREG(op));                                \
2329   CLR_Z();                                                     \
2330   SET_Z_VAL(rs);                                             \
23312331   if (rs)                                                     \
23322332   {                                                           \
23332333      while (!(rs & 0x00000001))                              \
r31176r31177
23372337      }                                                       \
23382338   }                                                           \
23392339   *rd = res;                                                  \
2340   COUNT_CYCLES(tms,1);                                            \
2340   COUNT_CYCLES(1);                                            \
23412341}
23422342
2343static void rmo_a(tms34010_state *tms, UINT16 op) { RMO(A); }
2344static void rmo_b(tms34010_state *tms, UINT16 op) { RMO(B); }
2343void tms340x0_device::rmo_a(UINT16 op) { RMO(A); }
2344void tms340x0_device::rmo_b(UINT16 op) { RMO(B); }
23452345
23462346#define RPIX(R)                                 \
23472347{                                               \
2348   UINT32 v = R##REG(tms,DSTREG(op));                  \
2349   switch (tms->pixelshift)                    \
2348   UINT32 v = R##REG(DSTREG(op));                  \
2349   switch (m_pixelshift)                    \
23502350   {                                           \
23512351      case 0:                                 \
23522352         v = (v & 1) ? 0xffffffff : 0x00000000;\
2353         COUNT_CYCLES(tms,8);                    \
2353         COUNT_CYCLES(8);                    \
23542354         break;                              \
23552355      case 1:                                 \
23562356         v &= 3;                             \
r31176r31177
23582358         v |= v << 4;                        \
23592359         v |= v << 8;                        \
23602360         v |= v << 16;                       \
2361         COUNT_CYCLES(tms,7);                    \
2361         COUNT_CYCLES(7);                    \
23622362         break;                              \
23632363      case 2:                                 \
23642364         v &= 0x0f;                          \
23652365         v |= v << 4;                        \
23662366         v |= v << 8;                        \
23672367         v |= v << 16;                       \
2368         COUNT_CYCLES(tms,6);                    \
2368         COUNT_CYCLES(6);                    \
23692369         break;                              \
23702370      case 3:                                 \
23712371         v &= 0xff;                          \
23722372         v |= v << 8;                        \
23732373         v |= v << 16;                       \
2374         COUNT_CYCLES(tms,5);                    \
2374         COUNT_CYCLES(5);                    \
23752375         break;                              \
23762376      case 4:                                 \
23772377         v &= 0xffff;                        \
23782378         v |= v << 16;                       \
2379         COUNT_CYCLES(tms,4);                    \
2379         COUNT_CYCLES(4);                    \
23802380         break;                              \
23812381      case 5:                                 \
2382         COUNT_CYCLES(tms,2);                    \
2382         COUNT_CYCLES(2);                    \
23832383         break;                              \
23842384   }                                           \
2385   R##REG(tms,DSTREG(op)) = v;                         \
2385   R##REG(DSTREG(op)) = v;                         \
23862386}
23872387
2388static void rpix_a(tms34010_state *tms, UINT16 op)
2388void tms340x0_device::rpix_a(UINT16 op)
23892389{
2390   if (!tms->is_34020) { unimpl(tms, op); return; }
2390   if (!m_is_34020) { unimpl(op); return; }
23912391   RPIX(A);
23922392}
23932393
2394static void rpix_b(tms34010_state *tms, UINT16 op)
2394void tms340x0_device::rpix_b(UINT16 op)
23952395{
2396   if (!tms->is_34020) { unimpl(tms, op); return; }
2396   if (!m_is_34020) { unimpl(op); return; }
23972397   RPIX(B);
23982398}
23992399
2400static void setcdp(tms34010_state *tms, UINT16 op)
2400void tms340x0_device::setcdp(UINT16 op)
24012401{
2402   if (!tms->is_34020) { unimpl(tms, op); return; }
2402   if (!m_is_34020) { unimpl(op); return; }
24032403   logerror("020:setcdp\n");
24042404}
24052405
2406static void setcmp(tms34010_state *tms, UINT16 op)
2406void tms340x0_device::setcmp(UINT16 op)
24072407{
2408   if (!tms->is_34020) { unimpl(tms, op); return; }
2408   if (!m_is_34020) { unimpl(op); return; }
24092409   logerror("020:setcmp\n");
24102410}
24112411
2412static void setcsp(tms34010_state *tms, UINT16 op)
2412void tms340x0_device::setcsp(UINT16 op)
24132413{
2414   if (!tms->is_34020) { unimpl(tms, op); return; }
2414   if (!m_is_34020) { unimpl(op); return; }
24152415   logerror("020:setcsp\n");
24162416}
24172417
2418static void swapf_a(tms34010_state *tms, UINT16 op)
2418void tms340x0_device::swapf_a(UINT16 op)
24192419{
2420   if (!tms->is_34020) { unimpl(tms, op); return; }
2420   if (!m_is_34020) { unimpl(op); return; }
24212421   logerror("020:swapf_a\n");
24222422}
24232423
2424static void swapf_b(tms34010_state *tms, UINT16 op)
2424void tms340x0_device::swapf_b(UINT16 op)
24252425{
2426   if (!tms->is_34020) { unimpl(tms, op); return; }
2426   if (!m_is_34020) { unimpl(op); return; }
24272427   logerror("020:swapf_b\n");
24282428}
24292429
2430static void tfill_xy(tms34010_state *tms, UINT16 op)
2430void tms340x0_device::tfill_xy(UINT16 op)
24312431{
2432   if (!tms->is_34020) { unimpl(tms, op); return; }
2432   if (!m_is_34020) { unimpl(op); return; }
24332433   logerror("020:tfill_xy\n");
24342434}
24352435
2436static void trapl(tms34010_state *tms, UINT16 op)
2436void tms340x0_device::trapl(UINT16 op)
24372437{
2438   if (!tms->is_34020) { unimpl(tms, op); return; }
2438   if (!m_is_34020) { unimpl(op); return; }
24392439   logerror("020:trapl\n");
24402440}
24412441
2442static void vblt_b_l(tms34010_state *tms, UINT16 op)
2442void tms340x0_device::vblt_b_l(UINT16 op)
24432443{
2444   if (!tms->is_34020) { unimpl(tms, op); return; }
2444   if (!m_is_34020) { unimpl(op); return; }
24452445   logerror("020:vblt_b_l\n");
24462446}
24472447
2448static void vfill_l(tms34010_state *tms, UINT16 op)
2448void tms340x0_device::vfill_l(UINT16 op)
24492449{
2450   if (!tms->is_34020) { unimpl(tms, op); return; }
2450   if (!m_is_34020) { unimpl(op); return; }
24512451   logerror("020:vfill_l\n");
24522452}
24532453
2454static void vlcol(tms34010_state *tms, UINT16 op)
2454void tms340x0_device::vlcol(UINT16 op)
24552455{
2456   if (!tms->is_34020) { unimpl(tms, op); return; }
2456   if (!m_is_34020) { unimpl(op); return; }
24572457   logerror("020:vlcol\n");
24582458}
trunk/src/emu/cpu/tms34010/34010tbl.c
r31176r31177
66
77*****************************************************************************/
88
9static void unimpl(tms34010_state *tms, UINT16 op);
10
11/* Graphics Instructions */
12
13static void pixblt_l_l(tms34010_state *tms, UINT16 op); /* 0f00 */
14static void pixblt_l_xy(tms34010_state *tms, UINT16 op); /* 0f20 */
15static void pixblt_xy_l(tms34010_state *tms, UINT16 op); /* 0f40 */
16static void pixblt_xy_xy(tms34010_state *tms, UINT16 op); /* 0f60 */
17static void pixblt_b_l(tms34010_state *tms, UINT16 op); /* 0f80 */
18static void pixblt_b_xy(tms34010_state *tms, UINT16 op); /* 0fa0 */
19static void fill_l(tms34010_state *tms, UINT16 op);   /* 0fc0 */
20static void fill_xy(tms34010_state *tms, UINT16 op);  /* 0fe0 */
21static void line(tms34010_state *tms, UINT16 op);     /* df10/df90 */
22static void add_xy_a(tms34010_state *tms, UINT16 op); /* e000/e100 */
23static void add_xy_b(tms34010_state *tms, UINT16 op); /* e000/e100 */
24static void sub_xy_a(tms34010_state *tms, UINT16 op); /* e200/e300 */
25static void sub_xy_b(tms34010_state *tms, UINT16 op); /* e200/e300 */
26static void cmp_xy_a(tms34010_state *tms, UINT16 op); /* e400/e500 */
27static void cmp_xy_b(tms34010_state *tms, UINT16 op); /* e400/e500 */
28static void cpw_a(tms34010_state *tms, UINT16 op);    /* e600/e700 */
29static void cpw_b(tms34010_state *tms, UINT16 op);    /* e600/e700 */
30static void cvxyl_a(tms34010_state *tms, UINT16 op);  /* e800/e900 */
31static void cvxyl_b(tms34010_state *tms, UINT16 op);  /* e800/e900 */
32static void movx_a(tms34010_state *tms, UINT16 op);   /* ec00/ed00 */
33static void movx_b(tms34010_state *tms, UINT16 op);   /* ec00/ed00 */
34static void movy_a(tms34010_state *tms, UINT16 op);   /* ee00/ef00 */
35static void movy_b(tms34010_state *tms, UINT16 op);   /* ee00/ef00 */
36static void pixt_ri_a(tms34010_state *tms, UINT16 op); /* f800/f900 */
37static void pixt_ri_b(tms34010_state *tms, UINT16 op); /* f800/f900 */
38static void pixt_rixy_a(tms34010_state *tms, UINT16 op); /* f000/f100 */
39static void pixt_rixy_b(tms34010_state *tms, UINT16 op); /* f000/f100 */
40static void pixt_ir_a(tms34010_state *tms, UINT16 op); /* fa00/fb00 */
41static void pixt_ir_b(tms34010_state *tms, UINT16 op); /* fa00/fb00 */
42static void pixt_ii_a(tms34010_state *tms, UINT16 op); /* fc00/fd00 */
43static void pixt_ii_b(tms34010_state *tms, UINT16 op); /* fc00/fd00 */
44static void pixt_ixyr_a(tms34010_state *tms, UINT16 op); /* f200/f300 */
45static void pixt_ixyr_b(tms34010_state *tms, UINT16 op); /* f200/f300 */
46static void pixt_ixyixy_a(tms34010_state *tms, UINT16 op); /* f400/f500 */
47static void pixt_ixyixy_b(tms34010_state *tms, UINT16 op); /* f400/f500 */
48static void drav_a(tms34010_state *tms, UINT16 op); /* f600/f700 */
49static void drav_b(tms34010_state *tms, UINT16 op); /* f600/f700 */
50
51/* General Instructions */
52static void abs_a(tms34010_state *tms, UINT16 op); /* 0380 */
53static void abs_b(tms34010_state *tms, UINT16 op); /* 0390 */
54static void add_a(tms34010_state *tms, UINT16 op); /* 4000/4100 */
55static void add_b(tms34010_state *tms, UINT16 op); /* 4000/4100 */
56static void addc_a(tms34010_state *tms, UINT16 op); /* 4200/4200 */
57static void addc_b(tms34010_state *tms, UINT16 op); /* 4200/4200 */
58static void addi_w_a(tms34010_state *tms, UINT16 op); /* 0b00 */
59static void addi_w_b(tms34010_state *tms, UINT16 op); /* 0b10 */
60static void addi_l_a(tms34010_state *tms, UINT16 op); /* 0b20 */
61static void addi_l_b(tms34010_state *tms, UINT16 op); /* 0b30 */
62static void addk_a(tms34010_state *tms, UINT16 op); /* 1000-1300 */
63static void addk_b(tms34010_state *tms, UINT16 op); /* 1000-1300 */
64static void and_a(tms34010_state *tms, UINT16 op); /* 5000/5100 */
65static void and_b(tms34010_state *tms, UINT16 op); /* 5000/5100 */
66static void andi_a(tms34010_state *tms, UINT16 op); /* 0b80 */
67static void andi_b(tms34010_state *tms, UINT16 op); /* 0b90 */
68static void andn_a(tms34010_state *tms, UINT16 op); /* 5200-5300 */
69static void andn_b(tms34010_state *tms, UINT16 op); /* 5200-5300 */
70static void btst_k_a(tms34010_state *tms, UINT16 op); /* 1c00-1f00 */
71static void btst_k_b(tms34010_state *tms, UINT16 op); /* 1c00-1f00 */
72static void btst_r_a(tms34010_state *tms, UINT16 op); /* 4a00-4b00 */
73static void btst_r_b(tms34010_state *tms, UINT16 op); /* 4a00-4b00 */
74static void clrc(tms34010_state *tms, UINT16 op); /* 0320 */
75static void cmp_a(tms34010_state *tms, UINT16 op); /* 4800/4900 */
76static void cmp_b(tms34010_state *tms, UINT16 op); /* 4800/4900 */
77static void cmpi_w_a(tms34010_state *tms, UINT16 op); /* 0b40 */
78static void cmpi_w_b(tms34010_state *tms, UINT16 op); /* 0b50 */
79static void cmpi_l_a(tms34010_state *tms, UINT16 op); /* 0b60 */
80static void cmpi_l_b(tms34010_state *tms, UINT16 op); /* 0b70 */
81static void dint(tms34010_state *tms, UINT16 op);
82static void divs_a(tms34010_state *tms, UINT16 op); /* 5800/5900 */
83static void divs_b(tms34010_state *tms, UINT16 op); /* 5800/5900 */
84static void divu_a(tms34010_state *tms, UINT16 op); /* 5a00/5b00 */
85static void divu_b(tms34010_state *tms, UINT16 op); /* 5a00/5b00 */
86static void eint(tms34010_state *tms, UINT16 op);
87static void exgf0_a(tms34010_state *tms, UINT16 op);  /* d500 */
88static void exgf0_b(tms34010_state *tms, UINT16 op);    /* d510 */
89static void exgf1_a(tms34010_state *tms, UINT16 op);    /* d700 */
90static void exgf1_b(tms34010_state *tms, UINT16 op);    /* d710 */
91static void lmo_a(tms34010_state *tms, UINT16 op);  /* 6a00/6b00 */
92static void lmo_b(tms34010_state *tms, UINT16 op);  /* 6a00/6b00 */
93static void mmfm_a(tms34010_state *tms, UINT16 op); /* 09a0 */
94static void mmfm_b(tms34010_state *tms, UINT16 op); /* 09b0 */
95static void mmtm_a(tms34010_state *tms, UINT16 op); /* 0980 */
96static void mmtm_b(tms34010_state *tms, UINT16 op); /* 0990 */
97static void mods_a(tms34010_state *tms, UINT16 op); /* 6c00/6d00 */
98static void mods_b(tms34010_state *tms, UINT16 op); /* 6c00/6d00 */
99static void modu_a(tms34010_state *tms, UINT16 op); /* 6e00/6f00 */
100static void modu_b(tms34010_state *tms, UINT16 op); /* 6e00/6f00 */
101static void mpys_a(tms34010_state *tms, UINT16 op); /* 5c00/5d00 */
102static void mpys_b(tms34010_state *tms, UINT16 op); /* 5c00/5d00 */
103static void mpyu_a(tms34010_state *tms, UINT16 op); /* 5e00/5e00 */
104static void mpyu_b(tms34010_state *tms, UINT16 op); /* 5e00/5f00 */
105static void neg_a(tms34010_state *tms, UINT16 op); /* 03a0 */
106static void neg_b(tms34010_state *tms, UINT16 op); /* 03b0 */
107static void negb_a(tms34010_state *tms, UINT16 op); /* 03c0 */
108static void negb_b(tms34010_state *tms, UINT16 op); /* 03d0 */
109static void nop(tms34010_state *tms, UINT16 op); /* 0300 */
110static void not_a(tms34010_state *tms, UINT16 op); /* 03e0 */
111static void not_b(tms34010_state *tms, UINT16 op); /* 03f0 */
112static void or_a(tms34010_state *tms, UINT16 op); /* 5400-5500 */
113static void or_b(tms34010_state *tms, UINT16 op); /* 5400-5500 */
114static void ori_a(tms34010_state *tms, UINT16 op); /* 0ba0 */
115static void ori_b(tms34010_state *tms, UINT16 op); /* 0bb0 */
116static void rl_k_a(tms34010_state *tms, UINT16 op); /* 3000-3300 */
117static void rl_k_b(tms34010_state *tms, UINT16 op); /* 3000-3300 */
118static void rl_r_a(tms34010_state *tms, UINT16 op); /* 6800/6900 */
119static void rl_r_b(tms34010_state *tms, UINT16 op); /* 6800/6900 */
120static void setc(tms34010_state *tms, UINT16 op); /* 0de0 */
121static void setf0(tms34010_state *tms, UINT16 op);
122static void setf1(tms34010_state *tms, UINT16 op);
123static void sext0_a(tms34010_state *tms, UINT16 op); /* 0500 */
124static void sext0_b(tms34010_state *tms, UINT16 op); /* 0510 */
125static void sext1_a(tms34010_state *tms, UINT16 op); /* 0700 */
126static void sext1_b(tms34010_state *tms, UINT16 op); /* 0710 */
127static void sla_k_a(tms34010_state *tms, UINT16 op); /* 2000-2300 */
128static void sla_k_b(tms34010_state *tms, UINT16 op); /* 2000-2300 */
129static void sla_r_a(tms34010_state *tms, UINT16 op); /* 6000/6100 */
130static void sla_r_b(tms34010_state *tms, UINT16 op); /* 6000/6100 */
131static void sll_k_a(tms34010_state *tms, UINT16 op); /* 2400-2700 */
132static void sll_k_b(tms34010_state *tms, UINT16 op); /* 2400-2700 */
133static void sll_r_a(tms34010_state *tms, UINT16 op); /* 6200/6300 */
134static void sll_r_b(tms34010_state *tms, UINT16 op); /* 6200/6300 */
135static void sra_k_a(tms34010_state *tms, UINT16 op); /* 2800-2b00 */
136static void sra_k_b(tms34010_state *tms, UINT16 op); /* 2800-2b00 */
137static void sra_r_a(tms34010_state *tms, UINT16 op); /* 6400/6500 */
138static void sra_r_b(tms34010_state *tms, UINT16 op); /* 6400/6500 */
139static void srl_k_a(tms34010_state *tms, UINT16 op); /* 2c00-2f00 */
140static void srl_k_b(tms34010_state *tms, UINT16 op); /* 2c00-2f00 */
141static void srl_r_a(tms34010_state *tms, UINT16 op); /* 6600/6700 */
142static void srl_r_b(tms34010_state *tms, UINT16 op); /* 6600/6700 */
143static void sub_a(tms34010_state *tms, UINT16 op); /* 4400/4500 */
144static void sub_b(tms34010_state *tms, UINT16 op); /* 4400/4500 */
145static void subb_a(tms34010_state *tms, UINT16 op); /* 4600/4700 */
146static void subb_b(tms34010_state *tms, UINT16 op); /* 4600/4700 */
147static void subi_w_a(tms34010_state *tms, UINT16 op); /* 0be0 */
148static void subi_w_b(tms34010_state *tms, UINT16 op); /* 0bf0 */
149static void subi_l_a(tms34010_state *tms, UINT16 op); /* 0d00 */
150static void subi_l_b(tms34010_state *tms, UINT16 op); /* 0d10 */
151static void subk_a(tms34010_state *tms, UINT16 op); /* 1400-1700 */
152static void subk_b(tms34010_state *tms, UINT16 op); /* 1400-1700 */
153static void xor_a(tms34010_state *tms, UINT16 op); /* 5600-5700 */
154static void xor_b(tms34010_state *tms, UINT16 op); /* 5600-5700 */
155static void xori_a(tms34010_state *tms, UINT16 op); /* 0bc0 */
156static void xori_b(tms34010_state *tms, UINT16 op); /* 0bd0 */
157static void zext0_a(tms34010_state *tms, UINT16 op); /* 0520 */
158static void zext0_b(tms34010_state *tms, UINT16 op); /* 0530 */
159static void zext1_a(tms34010_state *tms, UINT16 op); /* 0720 */
160static void zext1_b(tms34010_state *tms, UINT16 op); /* 0720 */
161
162
163/* Move Instructions */
164static void movi_w_a(tms34010_state *tms, UINT16 op);
165static void movi_w_b(tms34010_state *tms, UINT16 op);
166static void movi_l_a(tms34010_state *tms, UINT16 op);
167static void movi_l_b(tms34010_state *tms, UINT16 op);
168static void movk_a(tms34010_state *tms, UINT16 op);
169static void movk_b(tms34010_state *tms, UINT16 op);
170static void movb_rn_a(tms34010_state *tms, UINT16 op); /* 8c00-8d00 */
171static void movb_rn_b(tms34010_state *tms, UINT16 op); /* 8c00-8d00 */
172static void movb_nr_a(tms34010_state *tms, UINT16 op); /* 8e00-8f00 */
173static void movb_nr_b(tms34010_state *tms, UINT16 op); /* 8e00-8f00 */
174static void movb_nn_a(tms34010_state *tms, UINT16 op); /* 9c00-9d00 */
175static void movb_nn_b(tms34010_state *tms, UINT16 op); /* 9c00-9d00 */
176static void movb_r_no_a(tms34010_state *tms, UINT16 op); /* ac00-ad00 */
177static void movb_r_no_b(tms34010_state *tms, UINT16 op); /* ac00-ad00 */
178static void movb_no_r_a(tms34010_state *tms, UINT16 op); /* ae00-af00 */
179static void movb_no_r_b(tms34010_state *tms, UINT16 op); /* ae00-af00 */
180static void movb_no_no_a(tms34010_state *tms, UINT16 op); /* bc00-bd00 */
181static void movb_no_no_b(tms34010_state *tms, UINT16 op); /* bc00-bd00 */
182static void movb_ra_a(tms34010_state *tms, UINT16 op);
183static void movb_ra_b(tms34010_state *tms, UINT16 op);
184static void movb_ar_a(tms34010_state *tms, UINT16 op);
185static void movb_ar_b(tms34010_state *tms, UINT16 op);
186static void movb_aa(tms34010_state *tms, UINT16 op);
187static void move_rr_a(tms34010_state *tms, UINT16 op); /* 4c00/d00 */
188static void move_rr_b(tms34010_state *tms, UINT16 op); /* 4c00/d00 */
189static void move_rr_ax(tms34010_state *tms, UINT16 op); /* 4e00/f00 */
190static void move_rr_bx(tms34010_state *tms, UINT16 op); /* 4e00/f00 */
191static void move0_rn_a(tms34010_state *tms, UINT16 op); /* 8000 */
192static void move0_rn_b(tms34010_state *tms, UINT16 op);
193static void move1_rn_a(tms34010_state *tms, UINT16 op);
194static void move1_rn_b(tms34010_state *tms, UINT16 op);
195static void move0_r_dn_a(tms34010_state *tms, UINT16 op); /* a000 */
196static void move0_r_dn_b(tms34010_state *tms, UINT16 op);
197static void move1_r_dn_a(tms34010_state *tms, UINT16 op);
198static void move1_r_dn_b(tms34010_state *tms, UINT16 op);
199static void move0_r_ni_a(tms34010_state *tms, UINT16 op); /* 9000 */
200static void move0_r_ni_b(tms34010_state *tms, UINT16 op);
201static void move1_r_ni_a(tms34010_state *tms, UINT16 op);
202static void move1_r_ni_b(tms34010_state *tms, UINT16 op);
203static void move0_nr_a(tms34010_state *tms, UINT16 op); /* 8400-500 */
204static void move0_nr_b(tms34010_state *tms, UINT16 op); /* 8400-500 */
205static void move1_nr_a(tms34010_state *tms, UINT16 op); /* 8600-700 */
206static void move1_nr_b(tms34010_state *tms, UINT16 op); /* 8600-700 */
207static void move0_dn_r_a(tms34010_state *tms, UINT16 op); /* A400-500 */
208static void move0_dn_r_b(tms34010_state *tms, UINT16 op); /* A400-500 */
209static void move1_dn_r_a(tms34010_state *tms, UINT16 op); /* A600-700 */
210static void move1_dn_r_b(tms34010_state *tms, UINT16 op); /* A600-700 */
211static void move0_ni_r_a(tms34010_state *tms, UINT16 op); /* 9400-500 */
212static void move0_ni_r_b(tms34010_state *tms, UINT16 op); /* 9400-500 */
213static void move1_ni_r_a(tms34010_state *tms, UINT16 op); /* 9600-700 */
214static void move1_ni_r_b(tms34010_state *tms, UINT16 op); /* 9600-700 */
215static void move0_nn_a(tms34010_state *tms, UINT16 op); /* 8800 */
216static void move0_nn_b(tms34010_state *tms, UINT16 op);
217static void move1_nn_a(tms34010_state *tms, UINT16 op);
218static void move1_nn_b(tms34010_state *tms, UINT16 op);
219static void move0_dn_dn_a(tms34010_state *tms, UINT16 op); /* a800 */
220static void move0_dn_dn_b(tms34010_state *tms, UINT16 op);
221static void move1_dn_dn_a(tms34010_state *tms, UINT16 op);
222static void move1_dn_dn_b(tms34010_state *tms, UINT16 op);
223static void move0_ni_ni_a(tms34010_state *tms, UINT16 op); /* 9800 */
224static void move0_ni_ni_b(tms34010_state *tms, UINT16 op);
225static void move1_ni_ni_a(tms34010_state *tms, UINT16 op);
226static void move1_ni_ni_b(tms34010_state *tms, UINT16 op);
227static void move0_r_no_a(tms34010_state *tms, UINT16 op); /* b000 */
228static void move0_r_no_b(tms34010_state *tms, UINT16 op);
229static void move1_r_no_a(tms34010_state *tms, UINT16 op);
230static void move1_r_no_b(tms34010_state *tms, UINT16 op);
231static void move0_no_r_a(tms34010_state *tms, UINT16 op); /* b400 */
232static void move0_no_r_b(tms34010_state *tms, UINT16 op);
233static void move1_no_r_a(tms34010_state *tms, UINT16 op);
234static void move1_no_r_b(tms34010_state *tms, UINT16 op);
235static void move0_no_ni_a(tms34010_state *tms, UINT16 op); /* d000 */
236static void move0_no_ni_b(tms34010_state *tms, UINT16 op);
237static void move1_no_ni_a(tms34010_state *tms, UINT16 op);
238static void move1_no_ni_b(tms34010_state *tms, UINT16 op);
239static void move0_no_no_a(tms34010_state *tms, UINT16 op); /* b800 */
240static void move0_no_no_b(tms34010_state *tms, UINT16 op);
241static void move1_no_no_a(tms34010_state *tms, UINT16 op);
242static void move1_no_no_b(tms34010_state *tms, UINT16 op);
243static void move0_ra_a(tms34010_state *tms, UINT16 op);
244static void move0_ra_b(tms34010_state *tms, UINT16 op);
245static void move1_ra_a(tms34010_state *tms, UINT16 op);
246static void move1_ra_b(tms34010_state *tms, UINT16 op);
247static void move0_ar_a(tms34010_state *tms, UINT16 op);
248static void move0_ar_b(tms34010_state *tms, UINT16 op);
249static void move1_ar_a(tms34010_state *tms, UINT16 op);
250static void move1_ar_b(tms34010_state *tms, UINT16 op);
251static void move0_a_ni_a(tms34010_state *tms, UINT16 op); /* d400 */
252static void move0_a_ni_b(tms34010_state *tms, UINT16 op); /* d410 */
253static void move1_a_ni_a(tms34010_state *tms, UINT16 op); /* d600 */
254static void move1_a_ni_b(tms34010_state *tms, UINT16 op); /* d610 */
255static void move0_aa(tms34010_state *tms, UINT16 op); /* 05c0 */
256static void move1_aa(tms34010_state *tms, UINT16 op); /* 07c0 */
257
258
259/* Program Control and Context Switching */
260static void call_a(tms34010_state *tms, UINT16 op); /* 0920 */
261static void call_b(tms34010_state *tms, UINT16 op); /* 0930 */
262static void callr(tms34010_state *tms, UINT16 op); /* 0d3f */
263static void calla(tms34010_state *tms, UINT16 op); /* 0d5f */
264static void dsj_a(tms34010_state *tms, UINT16 op);  /* 0d80 */
265static void dsj_b(tms34010_state *tms, UINT16 op);  /* 0d90 */
266static void dsjeq_a(tms34010_state *tms, UINT16 op); /* 0da0 */
267static void dsjeq_b(tms34010_state *tms, UINT16 op); /* 0db0 */
268static void dsjne_a(tms34010_state *tms, UINT16 op); /* 0dc0 */
269static void dsjne_b(tms34010_state *tms, UINT16 op); /* 0dd0 */
270static void dsjs_a(tms34010_state *tms, UINT16 op);
271static void dsjs_b(tms34010_state *tms, UINT16 op);
272static void emu(tms34010_state *tms, UINT16 op);     /* 0100 */
273static void exgpc_a(tms34010_state *tms, UINT16 op); /* 0120 */
274static void exgpc_b(tms34010_state *tms, UINT16 op); /* 0130 */
275static void getpc_a(tms34010_state *tms, UINT16 op); /* 0140 */
276static void getpc_b(tms34010_state *tms, UINT16 op); /* 0150 */
277static void getst_a(tms34010_state *tms, UINT16 op); /* 0180 */
278static void getst_b(tms34010_state *tms, UINT16 op); /* 0190 */
279static void j_UC_0(tms34010_state *tms, UINT16 op);
280static void j_UC_8(tms34010_state *tms, UINT16 op);
281static void j_UC_x(tms34010_state *tms, UINT16 op);
282static void j_P_0(tms34010_state *tms, UINT16 op);
283static void j_P_8(tms34010_state *tms, UINT16 op);
284static void j_P_x(tms34010_state *tms, UINT16 op);
285static void j_LS_0(tms34010_state *tms, UINT16 op);
286static void j_LS_8(tms34010_state *tms, UINT16 op);
287static void j_LS_x(tms34010_state *tms, UINT16 op);
288static void j_HI_0(tms34010_state *tms, UINT16 op);
289static void j_HI_8(tms34010_state *tms, UINT16 op);
290static void j_HI_x(tms34010_state *tms, UINT16 op);
291static void j_LT_0(tms34010_state *tms, UINT16 op);
292static void j_LT_8(tms34010_state *tms, UINT16 op);
293static void j_LT_x(tms34010_state *tms, UINT16 op);
294static void j_GE_0(tms34010_state *tms, UINT16 op);
295static void j_GE_8(tms34010_state *tms, UINT16 op);
296static void j_GE_x(tms34010_state *tms, UINT16 op);
297static void j_LE_0(tms34010_state *tms, UINT16 op);
298static void j_LE_8(tms34010_state *tms, UINT16 op);
299static void j_LE_x(tms34010_state *tms, UINT16 op);
300static void j_GT_0(tms34010_state *tms, UINT16 op);
301static void j_GT_8(tms34010_state *tms, UINT16 op);
302static void j_GT_x(tms34010_state *tms, UINT16 op);
303static void j_C_0(tms34010_state *tms, UINT16 op);
304static void j_C_8(tms34010_state *tms, UINT16 op);
305static void j_C_x(tms34010_state *tms, UINT16 op);
306static void j_NC_0(tms34010_state *tms, UINT16 op);
307static void j_NC_8(tms34010_state *tms, UINT16 op);
308static void j_NC_x(tms34010_state *tms, UINT16 op);
309static void j_EQ_0(tms34010_state *tms, UINT16 op);
310static void j_EQ_8(tms34010_state *tms, UINT16 op);
311static void j_EQ_x(tms34010_state *tms, UINT16 op);
312static void j_NE_0(tms34010_state *tms, UINT16 op);
313static void j_NE_8(tms34010_state *tms, UINT16 op);
314static void j_NE_x(tms34010_state *tms, UINT16 op);
315static void j_V_0(tms34010_state *tms, UINT16 op);
316static void j_V_8(tms34010_state *tms, UINT16 op);
317static void j_V_x(tms34010_state *tms, UINT16 op);
318static void j_NV_0(tms34010_state *tms, UINT16 op);
319static void j_NV_8(tms34010_state *tms, UINT16 op);
320static void j_NV_x(tms34010_state *tms, UINT16 op);
321static void j_N_0(tms34010_state *tms, UINT16 op);
322static void j_N_8(tms34010_state *tms, UINT16 op);
323static void j_N_x(tms34010_state *tms, UINT16 op);
324static void j_NN_0(tms34010_state *tms, UINT16 op);
325static void j_NN_8(tms34010_state *tms, UINT16 op);
326static void j_NN_x(tms34010_state *tms, UINT16 op);
327static void jump_a(tms34010_state *tms, UINT16 op); /* 0160 */
328static void jump_b(tms34010_state *tms, UINT16 op); /* 0170 */
329static void popst(tms34010_state *tms, UINT16 op); /* 01c0 */
330static void pushst(tms34010_state *tms, UINT16 op); /* 01e0 */
331static void putst_a(tms34010_state *tms, UINT16 op); /* 01a0 */
332static void putst_b(tms34010_state *tms, UINT16 op); /* 01b0 */
333static void reti(tms34010_state *tms, UINT16 op); /* 0940 */
334static void rets(tms34010_state *tms, UINT16 op); /* 0960/70 */
335static void rev_a(tms34010_state *tms, UINT16 op); /* 0020 */
336static void rev_b(tms34010_state *tms, UINT16 op); /* 0030 */
337static void trap(tms34010_state *tms, UINT16 op); /* 0900/10 */
338
339
340/* 34020 instructions */
341static void addxyi_a(tms34010_state *tms, UINT16 op);
342static void addxyi_b(tms34010_state *tms, UINT16 op);
343static void blmove(tms34010_state *tms, UINT16 op);
344static void cexec_l(tms34010_state *tms, UINT16 op);
345static void cexec_s(tms34010_state *tms, UINT16 op);
346static void clip(tms34010_state *tms, UINT16 op);
347static void cmovcg_a(tms34010_state *tms, UINT16 op);
348static void cmovcg_b(tms34010_state *tms, UINT16 op);
349static void cmovcm_f(tms34010_state *tms, UINT16 op);
350static void cmovcm_b(tms34010_state *tms, UINT16 op);
351static void cmovgc_a(tms34010_state *tms, UINT16 op);
352static void cmovgc_b(tms34010_state *tms, UINT16 op);
353static void cmovgc_a_s(tms34010_state *tms, UINT16 op);
354static void cmovgc_b_s(tms34010_state *tms, UINT16 op);
355static void cmovmc_f(tms34010_state *tms, UINT16 op);
356static void cmovmc_f_va(tms34010_state *tms, UINT16 op);
357static void cmovmc_f_vb(tms34010_state *tms, UINT16 op);
358static void cmovmc_b(tms34010_state *tms, UINT16 op);
359static void cmp_k_a(tms34010_state *tms, UINT16 op);
360static void cmp_k_b(tms34010_state *tms, UINT16 op);
361static void cvdxyl_a(tms34010_state *tms, UINT16 op);
362static void cvdxyl_b(tms34010_state *tms, UINT16 op);
363static void cvmxyl_a(tms34010_state *tms, UINT16 op);
364static void cvmxyl_b(tms34010_state *tms, UINT16 op);
365static void cvsxyl_a(tms34010_state *tms, UINT16 op);
366static void cvsxyl_b(tms34010_state *tms, UINT16 op);
367static void exgps_a(tms34010_state *tms, UINT16 op);
368static void exgps_b(tms34010_state *tms, UINT16 op);
369static void fline(tms34010_state *tms, UINT16 op);
370static void fpixeq(tms34010_state *tms, UINT16 op);
371static void fpixne(tms34010_state *tms, UINT16 op);
372static void getps_a(tms34010_state *tms, UINT16 op);
373static void getps_b(tms34010_state *tms, UINT16 op);
374static void idle(tms34010_state *tms, UINT16 op);
375static void linit(tms34010_state *tms, UINT16 op);
376static void mwait(tms34010_state *tms, UINT16 op);
377static void pfill_xy(tms34010_state *tms, UINT16 op);
378static void pixblt_l_m_l(tms34010_state *tms, UINT16 op);
379static void retm(tms34010_state *tms, UINT16 op);
380static void rmo_a(tms34010_state *tms, UINT16 op);
381static void rmo_b(tms34010_state *tms, UINT16 op);
382static void rpix_a(tms34010_state *tms, UINT16 op);
383static void rpix_b(tms34010_state *tms, UINT16 op);
384static void setcdp(tms34010_state *tms, UINT16 op);
385static void setcmp(tms34010_state *tms, UINT16 op);
386static void setcsp(tms34010_state *tms, UINT16 op);
387static void swapf_a(tms34010_state *tms, UINT16 op);
388static void swapf_b(tms34010_state *tms, UINT16 op);
389static void tfill_xy(tms34010_state *tms, UINT16 op);
390static void trapl(tms34010_state *tms, UINT16 op);
391static void vblt_b_l(tms34010_state *tms, UINT16 op);
392static void vfill_l(tms34010_state *tms, UINT16 op);
393static void vlcol(tms34010_state *tms, UINT16 op);
394
395
3969/* Opcode Table */
397static void (*const opcode_table[65536 >> 4])(tms34010_state *tms, UINT16 op) =
10const tms340x0_device::opcode_func tms340x0_device::s_opcode_table[65536 >> 4] =
39811{
39912   /* 0x0000 0x0010 0x0020 0x0030 ... 0x00f0 */
400   unimpl,     unimpl,     rev_a,      rev_b,      idle,       unimpl,     unimpl,     unimpl,
401   mwait,      unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     blmove,
13   &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,
14   &tms340x0_device::mwait,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::blmove,
40215   /* 0x0100 */
403   emu,        unimpl,     exgpc_a,    exgpc_b,    getpc_a,    getpc_b,    jump_a,     jump_b,
404   getst_a,    getst_b,    putst_a,    putst_b,    popst,      unimpl,     pushst,     unimpl,
16   &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,
17   &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,
40518   /* 0x0200 */
406   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     setcsp,     unimpl,     setcdp,
407   rpix_a,     rpix_b,     exgps_a,    exgps_b,    getps_a,    getps_b,    unimpl,     setcmp,
19   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::setcsp,     &tms340x0_device::unimpl,     &tms340x0_device::setcdp,
20   &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,
40821   /* 0x0300 */
409   nop,        unimpl,     clrc,       unimpl,     movb_aa,    unimpl,     dint,       unimpl,
410   abs_a,      abs_b,      neg_a,      neg_b,      negb_a,     negb_b,     not_a,      not_b,
22   &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,
23   &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,
41124   /* 0x0400 */
412   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
413   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
25   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
26   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
41427   /* 0x0500 */
415   sext0_a,    sext0_b,    zext0_a,    zext0_b,    setf0,      setf0,      setf0,      setf0,
416   move0_ra_a, move0_ra_b, move0_ar_a, move0_ar_b, move0_aa,   unimpl,     movb_ra_a,  movb_ra_b,
28   &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,
29   &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,
41730   /* 0x0600 */
418   cexec_l,    unimpl,     cmovgc_a,   cmovgc_b,   cmovgc_a_s, cmovgc_b_s, cmovcg_a,   cmovcg_b,
419   cmovmc_f,   cmovmc_f,   cmovcm_f,   cmovcm_f,   cmovcm_b,   cmovcm_b,   cmovmc_f_va,cmovmc_f_vb,
31   &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,
32   &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,
42033   /* 0x0700 */
421   sext1_a,    sext1_b,    zext1_a,    zext1_b,    setf1,      setf1,      setf1,      setf1,
422   move1_ra_a, move1_ra_b, move1_ar_a, move1_ar_b, move1_aa,   unimpl,     movb_ar_a,  movb_ar_b,
34   &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,
35   &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,
42336   /* 0x0800 */
424   trapl,      unimpl,     cmovmc_b,   cmovmc_b,   unimpl,     vblt_b_l,   retm,       unimpl,
425   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     clip,
37   &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,
38   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::clip,
42639   /* 0x0900 */
427   trap,       trap,       call_a,     call_b,     reti,       unimpl,     rets,       rets,
428   mmtm_a,     mmtm_b,     mmfm_a,     mmfm_b,     movi_w_a,   movi_w_b,   movi_l_a,   movi_l_b,
40   &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,
41   &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,
42942   /* 0x0a00 */
430   vlcol,      unimpl,     unimpl,     pfill_xy,   unimpl,     vfill_l,    cvmxyl_a,   cvmxyl_b,
431   cvdxyl_a,   cvdxyl_b,   unimpl,     fpixeq,     unimpl,     fpixne,     unimpl,     unimpl,
43   &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,
44   &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,
43245   /* 0x0b00 */
433   addi_w_a,   addi_w_b,   addi_l_a,   addi_l_b,   cmpi_w_a,   cmpi_w_b,   cmpi_l_a,   cmpi_l_b,
434   andi_a,     andi_b,     ori_a,      ori_b,      xori_a,     xori_b,     subi_w_a,   subi_w_b,
46   &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,
47   &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,
43548   /* 0x0c00 */
436   addxyi_a,   addxyi_b,   unimpl,     unimpl,     unimpl,     linit,      unimpl,     unimpl,
437   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
49   &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,
50   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
43851   /* 0x0d00 */
439   subi_l_a,   subi_l_b,   unimpl,     callr,      unimpl,     calla,      eint,       unimpl,
440   dsj_a,      dsj_b,      dsjeq_a,    dsjeq_b,    dsjne_a,    dsjne_b,    setc,       unimpl,
52   &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,
53   &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,
44154   /* 0x0e00 */
442   unimpl,     pixblt_l_m_l,unimpl,    unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
443   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     tfill_xy,
55   &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,
56   &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,
44457   /* 0x0f00 */
445   pixblt_l_l, unimpl,     pixblt_l_xy,unimpl,     pixblt_xy_l,unimpl,     pixblt_xy_xy,unimpl,
446   pixblt_b_l, unimpl,     pixblt_b_xy,unimpl,     fill_l,     unimpl,     fill_xy,    unimpl,
58   &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,
59   &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,
44760   /* 0x1000 */
448   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,
449   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,
61   &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,
62   &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,
45063   /* 0x1100 */
451   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,
452   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     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   &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,
45366   /* 0x1200 */
454   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,
455   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     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   &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,
45669   /* 0x1300 */
457   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,
458   addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     addk_b,     addk_a,     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   &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,
45972   /* 0x1400 */
460   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,
461   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,
73   &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,
74   &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,
46275   /* 0x1500 */
463   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,
464   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     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   &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,
46578   /* 0x1600 */
466   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,
467   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     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   &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,
46881   /* 0x1700 */
469   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,
470   subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     subk_b,     subk_a,     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   &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,
47184   /* 0x1800 */
472   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,
473   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,
85   &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,
86   &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,
47487   /* 0x1900 */
475   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,
476   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     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   &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,
47790   /* 0x1a00 */
478   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,
479   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     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   &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,
48093   /* 0x1b00 */
481   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,
482   movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     movk_b,     movk_a,     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   &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,
48396   /* 0x1c00 */
484   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,
485   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,
97   &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,
98   &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,
48699   /* 0x1d00 */
487   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,
488   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   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   &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,
489102   /* 0x1e00 */
490   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,
491   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   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   &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,
492105   /* 0x1f00 */
493   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,
494   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   btst_k_b,   btst_k_a,   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   &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,
495108   /* 0x2000 */
496   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,
497   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,
109   &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,
110   &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,
498111   /* 0x2100 */
499   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,
500   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    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   &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,
501114   /* 0x2200 */
502   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,
503   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    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   &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,
504117   /* 0x2300 */
505   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,
506   sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    sla_k_b,    sla_k_a,    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   &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,
507120   /* 0x2400 */
508   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,
509   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,
121   &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,
122   &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,
510123   /* 0x2500 */
511   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,
512   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    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   &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,
513126   /* 0x2600 */
514   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,
515   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    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   &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,
516129   /* 0x2700 */
517   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,
518   sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    sll_k_b,    sll_k_a,    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   &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,
519132   /* 0x2800 */
520   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,
521   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,
133   &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,
134   &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,
522135   /* 0x2900 */
523   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,
524   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    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   &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,
525138   /* 0x2a00 */
526   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,
527   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    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   &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,
528141   /* 0x2b00 */
529   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,
530   sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    sra_k_b,    sra_k_a,    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   &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,
531144   /* 0x2c00 */
532   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,
533   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,
145   &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,
146   &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,
534147   /* 0x2d00 */
535   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,
536   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    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   &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,
537150   /* 0x2e00 */
538   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,
539   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    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   &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,
540153   /* 0x2f00 */
541   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,
542   srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    srl_k_b,    srl_k_a,    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   &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,
543156   /* 0x3000 */
544   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,
545   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,
157   &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,
158   &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,
546159   /* 0x3100 */
547   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,
548   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     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   &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,
549162   /* 0x3200 */
550   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,
551   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     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   &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,
552165   /* 0x3300 */
553   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,
554   rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     rl_k_b,     rl_k_a,     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   &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,
555168   /* 0x3400 */
556   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,
557   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,
169   &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,
170   &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,
558171   /* 0x3500 */
559   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,
560   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    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   &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,
561174   /* 0x3600 */
562   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,
563   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    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   &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,
564177   /* 0x3700 */
565   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,
566   cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    cmp_k_b,    cmp_k_a,    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   &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,
567180   /* 0x3800 */
568   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
569   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
181   &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,
182   &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,
570183   /* 0x3900 */
571   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
572   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     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   &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,
573186   /* 0x3a00 */
574   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
575   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     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   &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,
576189   /* 0x3b00 */
577   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
578   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     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   &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,
579192   /* 0x3c00 */
580   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
581   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     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   &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,
582195   /* 0x3d00 */
583   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
584   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     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   &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,
585198   /* 0x3e00 */
586   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
587   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     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   &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,
588201   /* 0x3f00 */
589   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,
590   dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     dsjs_b,     dsjs_a,     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   &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,
591204   /* 0x4000 */
592   add_a,      add_b,      add_a,      add_b,      add_a,      add_b,      add_a,      add_b,
593   add_a,      add_b,      add_a,      add_b,      add_a,      add_b,      add_a,      add_b,
205   &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,
206   &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,
594207   /* 0x4100 */
595   add_a,      add_b,      add_a,      add_b,      add_a,      add_b,      add_a,      add_b,
596   add_a,      add_b,      add_a,      add_b,      add_a,      add_b,      add_a,      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   &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,
597210   /* 0x4200 */
598   addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     addc_b,
599   addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     addc_b,
211   &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,
212   &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,
600213   /* 0x4300 */
601   addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     addc_b,
602   addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     addc_b,     addc_a,     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   &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,
603216   /* 0x4400 */
604   sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      sub_b,
605   sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      sub_b,
217   &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,
218   &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,
606219   /* 0x4500 */
607   sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      sub_b,
608   sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      sub_b,      sub_a,      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   &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,
609222   /* 0x4600 */
610   subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     subb_b,
611   subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     subb_b,
223   &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,
224   &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,
612225   /* 0x4700 */
613   subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     subb_b,
614   subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     subb_b,     subb_a,     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   &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,
615228   /* 0x4800 */
616   cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      cmp_b,
617   cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      cmp_b,
229   &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,
230   &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,
618231   /* 0x4900 */
619   cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      cmp_b,
620   cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      cmp_b,      cmp_a,      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   &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,
621234   /* 0x4a00 */
622   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,
623   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,
235   &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,
236   &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,
624237   /* 0x4b00 */
625   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,
626   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   btst_r_b,   btst_r_a,   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   &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,
627240   /* 0x4c00 */
628   move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,
629   move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,
241   &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,
242   &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,
630243   /* 0x4d00 */
631   move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,
632   move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  move_rr_b,  move_rr_a,  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   &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,
633246   /* 0x4e00 */
634   move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx,
635   move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx,
247   &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,
248   &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,
636249   /* 0x4f00 */
637   move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx,
638   move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, move_rr_bx, move_rr_ax, 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   &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,
639252   /* 0x5000 */
640   and_a,      and_b,      and_a,      and_b,      and_a,      and_b,      and_a,      and_b,
641   and_a,      and_b,      and_a,      and_b,      and_a,      and_b,      and_a,      and_b,
253   &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,
254   &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,
642255   /* 0x5100 */
643   and_a,      and_b,      and_a,      and_b,      and_a,      and_b,      and_a,      and_b,
644   and_a,      and_b,      and_a,      and_b,      and_a,      and_b,      and_a,      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   &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,
645258   /* 0x5200 */
646   andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     andn_b,
647   andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     andn_b,
259   &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,
260   &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,
648261   /* 0x5300 */
649   andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     andn_b,
650   andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     andn_b,     andn_a,     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   &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,
651264   /* 0x5400 */
652   or_a,       or_b,       or_a,       or_b,       or_a,       or_b,       or_a,       or_b,
653   or_a,       or_b,       or_a,       or_b,       or_a,       or_b,       or_a,       or_b,
265   &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,
266   &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,
654267   /* 0x5500 */
655   or_a,       or_b,       or_a,       or_b,       or_a,       or_b,       or_a,       or_b,
656   or_a,       or_b,       or_a,       or_b,       or_a,       or_b,       or_a,       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   &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,
657270   /* 0x5600 */
658   xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      xor_b,
659   xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      xor_b,
271   &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,
272   &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,
660273   /* 0x5700 */
661   xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      xor_b,
662   xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      xor_b,      xor_a,      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   &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,
663276   /* 0x5800 */
664   divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     divs_b,
665   divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     divs_b,
277   &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,
278   &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,
666279   /* 0x5900 */
667   divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     divs_b,
668   divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     divs_b,     divs_a,     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   &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,
669282   /* 0x5a00 */
670   divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     divu_b,
671   divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     divu_b,
283   &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,
284   &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,
672285   /* 0x5b00 */
673   divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     divu_b,
674   divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     divu_b,     divu_a,     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   &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,
675288   /* 0x5c00 */
676   mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     mpys_b,
677   mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     mpys_b,
289   &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,
290   &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,
678291   /* 0x5d00 */
679   mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     mpys_b,
680   mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     mpys_b,     mpys_a,     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   &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,
681294   /* 0x5e00 */
682   mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,
683   mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,
295   &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,
296   &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,
684297   /* 0x5f00 */
685   mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,
686   mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     mpyu_b,     mpyu_a,     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   &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,
687300   /* 0x6000 */
688   sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,
689   sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,
301   &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,
302   &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,
690303   /* 0x6100 */
691   sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,
692   sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    sla_r_b,    sla_r_a,    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   &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,
693306   /* 0x6200 */
694   sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,
695   sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,
307   &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,
308   &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,
696309   /* 0x6300 */
697   sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,
698   sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    sll_r_b,    sll_r_a,    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   &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,
699312   /* 0x6400 */
700   sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,
701   sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,
313   &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,
314   &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,
702315   /* 0x6500 */
703   sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,
704   sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    sra_r_b,    sra_r_a,    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   &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,
705318   /* 0x6600 */
706   srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,
707   srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,
319   &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,
320   &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,
708321   /* 0x6700 */
709   srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,
710   srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    srl_r_b,    srl_r_a,    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   &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,
711324   /* 0x6800 */
712   rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,
713   rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,
325   &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,
326   &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,
714327   /* 0x6900 */
715   rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,
716   rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     rl_r_b,     rl_r_a,     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   &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,
717330   /* 0x6a00 */
718   lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      lmo_b,
719   lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      lmo_b,
331   &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,
332   &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,
720333   /* 0x6b00 */
721   lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      lmo_b,
722   lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      lmo_b,      lmo_a,      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   &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,
723336   /* 0x6c00 */
724   mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     mods_b,
725   mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     mods_b,
337   &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,
338   &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,
726339   /* 0x6d00 */
727   mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     mods_b,
728   mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     mods_b,     mods_a,     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   &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,
729342   /* 0x6e00 */
730   modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     modu_b,
731   modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     modu_b,
343   &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,
344   &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,
732345   /* 0x6f00 */
733   modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     modu_b,
734   modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     modu_b,     modu_a,     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   &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,
735348   /* 0x7000 */
736   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
737   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
349   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
350   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
738351   /* 0x7100 */
739   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
740   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
741354   /* 0x7200 */
742   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
743   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
744357   /* 0x7300 */
745   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
746   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
747360   /* 0x7400 */
748   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
749   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
750363   /* 0x7500 */
751   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
752   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
753366   /* 0x7600 */
754   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
755   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
756369   /* 0x7700 */
757   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
758   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
759372   /* 0x7800 */
760   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
761   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
762375   /* 0x7900 */
763   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
764   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
765378   /* 0x7a00 */
766   rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      rmo_b,
767   rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      rmo_b,
379   &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,
380   &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,
768381   /* 0x7b00 */
769   rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      rmo_b,
770   rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      rmo_b,      rmo_a,      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   &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,
771384   /* 0x7c00 */
772   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
773   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
385   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
386   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
774387   /* 0x7d00 */
775   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
776   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
777390   /* 0x7e00 */
778   swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    swapf_b,
779   swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    swapf_b,
391   &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,
392   &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,
780393   /* 0x7f00 */
781   swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    swapf_b,
782   swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    swapf_b,    swapf_a,    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   &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,
783396   /* 0x8000 */
784   move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b,
785   move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b,
397   &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,
398   &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,
786399   /* 0x8100 */
787   move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b,
788   move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, move0_rn_b, move0_rn_a, 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   &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,
789402   /* 0x8200 */
790   move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b,
791   move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b,
403   &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,
404   &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,
792405   /* 0x8300 */
793   move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b,
794   move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, move1_rn_b, move1_rn_a, 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   &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,
795408   /* 0x8400 */
796   move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b,
797   move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b,
409   &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,
410   &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,
798411   /* 0x8500 */
799   move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b,
800   move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, move0_nr_b, move0_nr_a, 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   &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,
801414   /* 0x8600 */
802   move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b,
803   move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b,
415   &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,
416   &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,
804417   /* 0x8700 */
805   move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b,
806   move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, move1_nr_b, move1_nr_a, 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   &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,
807420   /* 0x8800 */
808   move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b,
809   move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b,
421   &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,
422   &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,
810423   /* 0x8900 */
811   move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b,
812   move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, move0_nn_b, move0_nn_a, 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   &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,
813426   /* 0x8a00 */
814   move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b,
815   move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b,
427   &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,
428   &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,
816429   /* 0x8b00 */
817   move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b,
818   move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, move1_nn_b, move1_nn_a, 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   &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,
819432   /* 0x8c00 */
820   movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,
821   movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,
433   &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,
434   &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,
822435   /* 0x8d00 */
823   movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,
824   movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  movb_rn_b,  movb_rn_a,  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   &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,
825438   /* 0x8e00 */
826   movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,
827   movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,
439   &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,
440   &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,
828441   /* 0x8f00 */
829   movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,
830   movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  movb_nr_b,  movb_nr_a,  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   &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,
831444   /* 0x9000 */
832   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,
833   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,
445   &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,
446   &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,
834447   /* 0x9100 */
835   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,
836   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   move0_r_ni_b,   move0_r_ni_a,   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   &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,
837450   /* 0x9200 */
838   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,
839   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,
451   &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,
452   &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,
840453   /* 0x9300 */
841   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,
842   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   move1_r_ni_b,   move1_r_ni_a,   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   &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,
843456   /* 0x9400 */
844   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,
845   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,
457   &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,
458   &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,
846459   /* 0x9500 */
847   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,
848   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   move0_ni_r_b,   move0_ni_r_a,   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   &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,
849462   /* 0x9600 */
850   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,
851   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,
463   &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,
464   &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,
852465   /* 0x9700 */
853   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,
854   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   move1_ni_r_b,   move1_ni_r_a,   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   &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,
855468   /* 0x9800 */
856   move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,
857   move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,
469   &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,
470   &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,
858471   /* 0x9900 */
859   move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,
860   move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  move0_ni_ni_b,  move0_ni_ni_a,  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   &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,
861474   /* 0x9a00 */
862   move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,
863   move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,
475   &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,
476   &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,
864477   /* 0x9b00 */
865   move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,
866   move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  move1_ni_ni_b,  move1_ni_ni_a,  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   &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,
867480   /* 0x9c00 */
868   movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,
869   movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,
481   &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,
482   &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,
870483   /* 0x9d00 */
871   movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,
872   movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  movb_nn_b,  movb_nn_a,  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   &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,
873486   /* 0x9e00 */
874   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
875   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
487   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
488   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
876489   /* 0x9f00 */
877   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
878   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
879492   /* 0xa000 */
880   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,
881   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,
493   &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,
494   &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,
882495   /* 0xa100 */
883   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,
884   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   move0_r_dn_b,   move0_r_dn_a,   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   &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,
885498   /* 0xa200 */
886   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,
887   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,
499   &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,
500   &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,
888501   /* 0xa300 */
889   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,
890   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   move1_r_dn_b,   move1_r_dn_a,   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   &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,
891504   /* 0xa400 */
892   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,
893   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,
505   &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,
506   &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,
894507   /* 0xa500 */
895   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,
896   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   move0_dn_r_b,   move0_dn_r_a,   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   &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,
897510   /* 0xa600 */
898   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,
899   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,
511   &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,
512   &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,
900513   /* 0xa700 */
901   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,
902   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   move1_dn_r_b,   move1_dn_r_a,   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   &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,
903516   /* 0xa800 */
904   move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,
905   move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,
517   &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,
518   &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,
906519   /* 0xa900 */
907   move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,
908   move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  move0_dn_dn_b,  move0_dn_dn_a,  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   &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,
909522   /* 0xaa00 */
910   move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,
911   move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,
523   &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,
524   &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,
912525   /* 0xab00 */
913   move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,
914   move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  move1_dn_dn_b,  move1_dn_dn_a,  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   &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,
915528   /* 0xac00 */
916   movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,
917   movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,
529   &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,
530   &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,
918531   /* 0xad00 */
919   movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,
920   movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    movb_r_no_b,    movb_r_no_a,    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   &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,
921534   /* 0xae00 */
922   movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,
923   movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,
535   &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,
536   &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,
924537   /* 0xaf00 */
925   movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,
926   movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    movb_no_r_b,    movb_no_r_a,    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   &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,
927540   /* 0xb000 */
928   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,
929   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,
541   &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,
542   &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,
930543   /* 0xb100 */
931   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,
932   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   move0_r_no_b,   move0_r_no_a,   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   &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,
933546   /* 0xb200 */
934   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,
935   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,
547   &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,
548   &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,
936549   /* 0xb300 */
937   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,
938   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   move1_r_no_b,   move1_r_no_a,   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   &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,
939552   /* 0xb400 */
940   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,
941   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,
553   &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,
554   &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,
942555   /* 0xb500 */
943   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,
944   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   move0_no_r_b,   move0_no_r_a,   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   &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,
945558   /* 0xb600 */
946   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,
947   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,
559   &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,
560   &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,
948561   /* 0xb700 */
949   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,
950   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   move1_no_r_b,   move1_no_r_a,   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   &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,
951564   /* 0xb800 */
952   move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,
953   move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,
565   &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,
566   &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,
954567   /* 0xb900 */
955   move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,
956   move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  move0_no_no_b,  move0_no_no_a,  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   &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,
957570   /* 0xba00 */
958   move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,
959   move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,
571   &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,
572   &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,
960573   /* 0xbb00 */
961   move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,
962   move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  move1_no_no_b,  move1_no_no_a,  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   &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,
963576   /* 0xbc00 */
964   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,
965   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,
577   &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,
578   &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,
966579   /* 0xbd00 */
967   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,
968   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,   movb_no_no_b,   movb_no_no_a,       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   &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,
969582   /* 0xbe00 */
970   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
971   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
583   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
584   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
972585   /* 0xbf00 */
973   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
974   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
975588   /* 0xc000 */
976   j_UC_0,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,
977   j_UC_8,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,     j_UC_x,
589   &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,
590   &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,
978591   /* 0xc100 */
979   j_P_0,      j_P_x,      j_P_x,      j_P_x,      j_P_x,      j_P_x,      j_P_x,      j_P_x,
980   j_P_8,      j_P_x,      j_P_x,      j_P_x,      j_P_x,      j_P_x,      j_P_x,      j_P_x,
592   &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,
593   &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,
981594   /* 0xc200 */
982   j_LS_0,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,
983   j_LS_8,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,     j_LS_x,
595   &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,
596   &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,
984597   /* 0xc300 */
985   j_HI_0,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,
986   j_HI_8,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,     j_HI_x,
598   &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,
599   &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,
987600   /* 0xc400 */
988   j_LT_0,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,
989   j_LT_8,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,     j_LT_x,
601   &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,
602   &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,
990603   /* 0xc500 */
991   j_GE_0,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,
992   j_GE_8,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,     j_GE_x,
604   &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,
605   &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,
993606   /* 0xc600 */
994   j_LE_0,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,
995   j_LE_8,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,     j_LE_x,
607   &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,
608   &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,
996609   /* 0xc700 */
997   j_GT_0,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,
998   j_GT_8,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,     j_GT_x,
610   &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,
611   &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,
999612   /* 0xc800 */
1000   j_C_0,      j_C_x,      j_C_x,      j_C_x,      j_C_x,      j_C_x,      j_C_x,      j_C_x,
1001   j_C_8,      j_C_x,      j_C_x,      j_C_x,      j_C_x,      j_C_x,      j_C_x,      j_C_x,
613   &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,
614   &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,
1002615   /* 0xc900 */
1003   j_NC_0,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,
1004   j_NC_8,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,     j_NC_x,
616   &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,
617   &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,
1005618   /* 0xca00 */
1006   j_EQ_0,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,
1007   j_EQ_8,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,     j_EQ_x,
619   &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,
620   &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,
1008621   /* 0xcb00 */
1009   j_NE_0,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,
1010   j_NE_8,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,     j_NE_x,
622   &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,
623   &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,
1011624   /* 0xcc00 */
1012   j_V_0,      j_V_x,      j_V_x,      j_V_x,      j_V_x,      j_V_x,      j_V_x,      j_V_x,
1013   j_V_8,      j_V_x,      j_V_x,      j_V_x,      j_V_x,      j_V_x,      j_V_x,      j_V_x,
625   &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,
626   &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,
1014627   /* 0xcd00 */
1015   j_NV_0,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,
1016   j_NV_8,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,     j_NV_x,
628   &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,
629   &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,
1017630   /* 0xce00 */
1018   j_N_0,      j_N_x,      j_N_x,      j_N_x,      j_N_x,      j_N_x,      j_N_x,      j_N_x,
1019   j_N_8,      j_N_x,      j_N_x,      j_N_x,      j_N_x,      j_N_x,      j_N_x,      j_N_x,
631   &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,
632   &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,
1020633   /* 0xcf00 */
1021   j_NN_0,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,
1022   j_NN_8,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,     j_NN_x,
634   &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,
635   &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,
1023636   /* 0xd000 */
1024   move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,
1025   move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,
637   &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,
638   &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,
1026639   /* 0xd100 */
1027   move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,
1028   move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  move0_no_ni_b,  move0_no_ni_a,  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   &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,
1029642   /* 0xd200 */
1030   move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,
1031   move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,
643   &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,
644   &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,
1032645   /* 0xd300 */
1033   move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,
1034   move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  move1_no_ni_b,  move1_no_ni_a,  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   &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,
1035648   /* 0xd400 */
1036   move0_a_ni_a,move0_a_ni_b,unimpl,   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1037   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
649   &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,
650   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1038651   /* 0xd500 */
1039   exgf0_a,    exgf0_b,    unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1040   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
652   &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,
653   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1041654   /* 0xd600 */
1042   move1_a_ni_a,move1_a_ni_b,unimpl,   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1043   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
655   &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,
656   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1044657   /* 0xd700 */
1045   exgf1_a,    exgf1_b,    unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1046   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
658   &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,
659   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1047660   /* 0xd800 */
1048   cexec_s,    cexec_s,    cexec_s,    cexec_s,    cexec_s,    cexec_s,    cexec_s,    cexec_s,
1049   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
661   &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,
662   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1050663   /* 0xd900 */
1051   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1052   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1053666   /* 0xda00 */
1054   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1055   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1056669   /* 0xdb00 */
1057   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1058   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1059672   /* 0xdc00 */
1060   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1061   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1062675   /* 0xdd00 */
1063   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1064   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1065678   /* 0xde00 */
1066   unimpl,     fline,      unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1067   unimpl,     fline,      unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
679   &tms340x0_device::unimpl,     &tms340x0_device::fline,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
680   &tms340x0_device::unimpl,     &tms340x0_device::fline,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1068681   /* 0xdf00 */
1069   unimpl,     line,       unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1070   unimpl,     line,       unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
682   &tms340x0_device::unimpl,     &tms340x0_device::line,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
683   &tms340x0_device::unimpl,     &tms340x0_device::line,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1071684   /* 0xe000 */
1072   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,
1073   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,
685   &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,
686   &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,
1074687   /* 0xe100 */
1075   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,
1076   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   add_xy_b,   add_xy_a,   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   &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,
1077690   /* 0xe200 */
1078   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,
1079   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,
691   &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,
692   &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,
1080693   /* 0xe300 */
1081   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,
1082   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   sub_xy_b,   sub_xy_a,   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   &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,
1083696   /* 0xe400 */
1084   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,
1085   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,
697   &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,
698   &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,
1086699   /* 0xe500 */
1087   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,
1088   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   cmp_xy_b,   cmp_xy_a,   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   &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,
1089702   /* 0xe600 */
1090   cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      cpw_b,
1091   cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      cpw_b,
703   &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,
704   &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,
1092705   /* 0xe700 */
1093   cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      cpw_b,
1094   cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      cpw_b,      cpw_a,      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   &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,
1095708   /* 0xe800 */
1096   cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,
1097   cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,
709   &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,
710   &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,
1098711   /* 0xe900 */
1099   cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,
1100   cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    cvxyl_b,    cvxyl_a,    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   &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,
1101714   /* 0xea00 */
1102   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,
1103   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,
715   &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,
716   &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,
1104717   /* 0xeb00 */
1105   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,
1106   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   cvsxyl_b,   cvsxyl_a,   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   &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,
1107720   /* 0xec00 */
1108   movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     movx_b,
1109   movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     movx_b,
721   &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,
722   &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,
1110723   /* 0xed00 */
1111   movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     movx_b,
1112   movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     movx_b,     movx_a,     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   &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,
1113726   /* 0xee00 */
1114   movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     movy_b,
1115   movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     movy_b,
727   &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,
728   &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,
1116729   /* 0xef00 */
1117   movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     movy_b,
1118   movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     movy_b,     movy_a,     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   &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,
1119732   /* 0xf000 */
1120   pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,
1121   pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,
733   &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,
734   &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,
1122735   /* 0xf100 */
1123   pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,
1124   pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    pixt_rixy_b,    pixt_rixy_a,    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   &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,
1125738   /* 0xf200 */
1126   pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,
1127   pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,
739   &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,
740   &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,
1128741   /* 0xf300 */
1129   pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,
1130   pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    pixt_ixyr_b,    pixt_ixyr_a,    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   &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,
1131744   /* 0xf400 */
1132   pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,
1133   pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,
745   &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,
746   &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,
1134747   /* 0xf500 */
1135   pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,
1136   pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  pixt_ixyixy_b,  pixt_ixyixy_a,  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   &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,
1137750   /* 0xf600 */
1138   drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     drav_b,
1139   drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     drav_b,
751   &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,
752   &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,
1140753   /* 0xf700 */
1141   drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     drav_b,
1142   drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     drav_b,     drav_a,     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   &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,
1143756   /* 0xf800 */
1144   pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,
1145   pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,
757   &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,
758   &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,
1146759   /* 0xf900 */
1147   pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,
1148   pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  pixt_ri_b,  pixt_ri_a,  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   &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,
1149762   /* 0xfa00 */
1150   pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,
1151   pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,
763   &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,
764   &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,
1152765   /* 0xfb00 */
1153   pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,
1154   pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  pixt_ir_b,  pixt_ir_a,  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   &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,
1155768   /* 0xfc00 */
1156   pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,
1157   pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,
769   &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,
770   &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,
1158771   /* 0xfd00 */
1159   pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,
1160   pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  pixt_ii_b,  pixt_ii_a,  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   &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,
1161774   /* 0xfe00 */
1162   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1163   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
775   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
776   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
1164777   /* 0xff00 */
1165   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,
1166   unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     unimpl,     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   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl
1167780};
trunk/src/emu/cpu/tms34010/tms34010.c
r31176r31177
2323#define LOG(x)  do { if (VERBOSE) logerror x; } while (0)
2424
2525
26const device_type TMS34010 = &device_creator<tms34010_device>;
27const device_type TMS34020 = &device_creator<tms34020_device>;
2628
29
2730/***************************************************************************
28    CORE STATE
31    GLOBAL VARIABLES
2932***************************************************************************/
3033
31/* Size of the memory buffer allocated for the shiftr register */
32#define SHIFTREG_SIZE           (8 * 512 * sizeof(UINT16))
33
34/* TMS34010 State */
35struct XY
34/* default configuration */
35static const tms340x0_config default_config =
3636{
37#ifdef LSB_FIRST
38   INT16 x;
39   INT16 y;
40#else
41   INT16 y;
42   INT16 x;
43#endif
37   0
4438};
4539
46struct tms34010_state
40
41tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
42   : cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
43   , m_program_config("program", ENDIANNESS_LITTLE, 16, 32, 3)
44   , m_config(&default_config)
4745{
48   UINT32              pc;
49   UINT32              ppc;
50   UINT32              st;
51   void (*pixel_write)(tms34010_state *tms, offs_t offset, UINT32 data);
52   UINT32 (*pixel_read)(tms34010_state *tms, offs_t offset);
53   UINT32 (*raster_op)(tms34010_state *tms, UINT32 newpix, UINT32 oldpix);
54   UINT32              convsp;
55   UINT32              convdp;
56   UINT32              convmp;
57   INT32               gfxcycles;
58   UINT8               pixelshift;
59   UINT8               is_34020;
60   UINT8               reset_deferred;
61   UINT8               hblank_stable;
62   UINT8               external_host_access;
63   UINT8               executing;
64   device_irq_acknowledge_delegate irq_callback;
65   legacy_cpu_device *device;
66   address_space *program;
67   direct_read_data *direct;
68   const tms34010_config *config;
69   screen_device *screen;
70   emu_timer *         scantimer;
71   int                 icount;
46}
7247
73   /* A registers 0-15 map to regs[0]-regs[15] */
74   /* B registers 0-15 map to regs[30]-regs[15] */
75   union
76   {
77      INT32 reg;
78      XY xy;
79   } regs[31];
8048
81   UINT16 IOregs[64];
82   UINT16              shiftreg[SHIFTREG_SIZE/2];
83};
84
85INLINE tms34010_state *get_safe_token(device_t *device)
49tms34010_device::tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
50   : tms340x0_device(mconfig, TMS34010, "TMS34010", tag, owner, clock, "tms34010")
8651{
87   assert(device != NULL);
88   assert(device->type() == TMS34010 ||
89         device->type() == TMS34020);
90   return (tms34010_state *)downcast<legacy_cpu_device *>(device)->token();
52   m_is_34020 = 0;
9153}
9254
93#include "34010ops.h"
9455
95
96
97/***************************************************************************
98    GLOBAL VARIABLES
99***************************************************************************/
100
101/* default configuration */
102static const tms34010_config default_config =
56tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
57   : tms340x0_device(mconfig, TMS34020, "TMS34020", tag, owner, clock, "tms34020")
10358{
104   0
105};
59   m_is_34020 = 1;
60}
10661
107static void check_interrupt(tms34010_state *tms);
108static TIMER_CALLBACK( scanline_callback );
109static void tms34010_state_postload(tms34010_state *tms);
11062
63#include "34010ops.h"
11164
11265
11366/***************************************************************************
r31176r31177
12780#define STBITS_F0       (0x1f << 0)
12881
12982/* register definitions and shortcuts */
130#define N_FLAG(T)       ((T)->st & STBIT_N)
131#define Z_FLAG(T)       ((T)->st & STBIT_Z)
132#define C_FLAG(T)       ((T)->st & STBIT_C)
133#define V_FLAG(T)       ((T)->st & STBIT_V)
134#define P_FLAG(T)       ((T)->st & STBIT_P)
135#define IE_FLAG(T)      ((T)->st & STBIT_IE)
136#define FE0_FLAG(T)     ((T)->st & STBIT_FE0)
137#define FE1_FLAG(T)     ((T)->st & STBIT_FE1)
83#define N_FLAG()       (m_st & STBIT_N)
84#define Z_FLAG()       (m_st & STBIT_Z)
85#define C_FLAG()       (m_st & STBIT_C)
86#define V_FLAG()       (m_st & STBIT_V)
87#define P_FLAG()       (m_st & STBIT_P)
88#define IE_FLAG()      (m_st & STBIT_IE)
89#define FE0_FLAG()     (m_st & STBIT_FE0)
90#define FE1_FLAG()     (m_st & STBIT_FE1)
13891
13992/* register file access */
140#define AREG(T,i)       ((T)->regs[i].reg)
141#define AREG_XY(T,i)    ((T)->regs[i].xy)
142#define AREG_X(T,i)     ((T)->regs[i].xy.x)
143#define AREG_Y(T,i)     ((T)->regs[i].xy.y)
144#define BREG(T,i)       ((T)->regs[30 - (i)].reg)
145#define BREG_XY(T,i)    ((T)->regs[30 - (i)].xy)
146#define BREG_X(T,i)     ((T)->regs[30 - (i)].xy.x)
147#define BREG_Y(T,i)     ((T)->regs[30 - (i)].xy.y)
148#define SP(T)           AREG(T,15)
149#define FW(T,i)         (((T)->st >> (i ? 6 : 0)) & 0x1f)
150#define FWEX(T,i)       (((T)->st >> (i ? 6 : 0)) & 0x3f)
93#define AREG(i)       (m_regs[i].reg)
94#define AREG_XY(i)    (m_regs[i].xy)
95#define AREG_X(i)     (m_regs[i].xy.x)
96#define AREG_Y(i)     (m_regs[i].xy.y)
97#define BREG(i)       (m_regs[30 - (i)].reg)
98#define BREG_XY(i)    (m_regs[30 - (i)].xy)
99#define BREG_X(i)     (m_regs[30 - (i)].xy.x)
100#define BREG_Y(i)     (m_regs[30 - (i)].xy.y)
101#define SP()          AREG(15)
102#define FW(i)         ((m_st >> (i ? 6 : 0)) & 0x1f)
103#define FWEX(i)       ((m_st >> (i ? 6 : 0)) & 0x3f)
151104
152105/* opcode decode helpers */
153106#define SRCREG(O)       (((O) >> 5) & 0x0f)
154107#define DSTREG(O)       ((O) & 0x0f)
155#define SKIP_WORD(T)    ((T)->pc += (2 << 3))
156#define SKIP_LONG(T)    ((T)->pc += (4 << 3))
108#define SKIP_WORD()     (m_pc += (2 << 3))
109#define SKIP_LONG()     (m_pc += (4 << 3))
157110#define PARAM_K(O)      (((O) >> 5) & 0x1f)
158111#define PARAM_N(O)      ((O) & 0x1f)
159112#define PARAM_REL8(O)   ((INT8)(O))
160113
161114/* memory I/O */
162#define WFIELD0(T,a,b)  (*tms34010_wfield_functions[FW(T,0)])(T,a,b)
163#define WFIELD1(T,a,b)  (*tms34010_wfield_functions[FW(T,1)])(T,a,b)
164#define RFIELD0(T,a)    (*tms34010_rfield_functions[FWEX(T,0)])(T,a)
165#define RFIELD1(T,a)    (*tms34010_rfield_functions[FWEX(T,1)])(T,a)
166#define WPIXEL(T,a,b)   (*(T)->pixel_write)(T,a,b)
167#define RPIXEL(T,a)     (*(T)->pixel_read)(T,a)
115#define WFIELD0(a,b)  (this->*s_wfield_functions[FW(0)])(a,b)
116#define WFIELD1(a,b)  (this->*s_wfield_functions[FW(1)])(a,b)
117#define RFIELD0(a)    (this->*s_rfield_functions[FWEX(0)])(a)
118#define RFIELD1(a)    (this->*s_rfield_functions[FWEX(1)])(a)
119#define WPIXEL(a,b)   (this->*m_pixel_write)(a,b)
120#define RPIXEL(a)     (this->*m_pixel_read)(a)
168121
169122/* Implied Operands */
170#define SADDR(T)        BREG(T,0)
171#define SADDR_X(T)      BREG_X(T,0)
172#define SADDR_Y(T)      BREG_Y(T,0)
173#define SADDR_XY(T)     BREG_XY(T,0)
174#define SPTCH(T)        BREG(T,1)
175#define DADDR(T)        BREG(T,2)
176#define DADDR_X(T)      BREG_X(T,2)
177#define DADDR_Y(T)      BREG_Y(T,2)
178#define DADDR_XY(T)     BREG_XY(T,2)
179#define DPTCH(T)        BREG(T,3)
180#define OFFSET(T)       BREG(T,4)
181#define WSTART_X(T)     BREG_X(T,5)
182#define WSTART_Y(T)     BREG_Y(T,5)
183#define WEND_X(T)       BREG_X(T,6)
184#define WEND_Y(T)       BREG_Y(T,6)
185#define DYDX_X(T)       BREG_X(T,7)
186#define DYDX_Y(T)       BREG_Y(T,7)
187#define COLOR0(T)       BREG(T,8)
188#define COLOR1(T)       BREG(T,9)
189#define COUNT(T)        BREG(T,10)
190#define INC1_X(T)       BREG_X(T,11)
191#define INC1_Y(T)       BREG_Y(T,11)
192#define INC2_X(T)       BREG_X(T,12)
193#define INC2_Y(T)       BREG_Y(T,12)
194#define PATTRN(T)       BREG(T,13)
195#define TEMP(T)         BREG(T,14)
123#define SADDR()        BREG(0)
124#define SADDR_X()      BREG_X(0)
125#define SADDR_Y()      BREG_Y(0)
126#define SADDR_XY()     BREG_XY(0)
127#define SPTCH()        BREG(1)
128#define DADDR()        BREG(2)
129#define DADDR_X()      BREG_X(2)
130#define DADDR_Y()      BREG_Y(2)
131#define DADDR_XY()     BREG_XY(2)
132#define DPTCH()        BREG(3)
133#define OFFSET()       BREG(4)
134#define WSTART_X()     BREG_X(5)
135#define WSTART_Y()     BREG_Y(5)
136#define WEND_X()       BREG_X(6)
137#define WEND_Y()       BREG_Y(6)
138#define DYDX_X()       BREG_X(7)
139#define DYDX_Y()       BREG_Y(7)
140#define COLOR0()       BREG(8)
141#define COLOR1()       BREG(9)
142#define COUNT()        BREG(10)
143#define INC1_X()       BREG_X(11)
144#define INC1_Y()       BREG_Y(11)
145#define INC2_X()       BREG_X(12)
146#define INC2_Y()       BREG_Y(12)
147#define PATTRN()       BREG(13)
148#define TEMP()         BREG(14)
196149
197150/* I/O registers */
198#define WINDOW_CHECKING(T)  ((IOREG(T, REG_CONTROL) >> 6) & 0x03)
151#define WINDOW_CHECKING()  ((IOREG(REG_CONTROL) >> 6) & 0x03)
199152
200153
201154
r31176r31177
204157***************************************************************************/
205158
206159/* Break up Status Register into indiviual flags */
207INLINE void SET_ST(tms34010_state *tms, UINT32 st)
160inline void tms340x0_device::SET_ST(UINT32 st)
208161{
209   tms->st = st;
162   m_st = st;
210163   /* interrupts might have been enabled, check it */
211   check_interrupt(tms);
164   check_interrupt();
212165}
213166
214167/* Intialize Status to 0x0010 */
215INLINE void RESET_ST(tms34010_state *tms)
168inline void tms340x0_device::RESET_ST()
216169{
217   SET_ST(tms, 0x00000010);
170   SET_ST(0x00000010);
218171}
219172
220173/* shortcuts for reading opcodes */
221INLINE UINT32 ROPCODE(tms34010_state *tms)
174inline UINT32 tms340x0_device::ROPCODE()
222175{
223   UINT32 pc = TOBYTE(tms->pc);
224   tms->pc += 2 << 3;
225   return tms->direct->read_decrypted_word(pc);
176   UINT32 pc = TOBYTE(m_pc);
177   m_pc += 2 << 3;
178   return m_direct->read_decrypted_word(pc);
226179}
227180
228INLINE INT16 PARAM_WORD(tms34010_state *tms)
181inline INT16 tms340x0_device::PARAM_WORD()
229182{
230   UINT32 pc = TOBYTE(tms->pc);
231   tms->pc += 2 << 3;
232   return tms->direct->read_raw_word(pc);
183   UINT32 pc = TOBYTE(m_pc);
184   m_pc += 2 << 3;
185   return m_direct->read_raw_word(pc);
233186}
234187
235INLINE INT32 PARAM_LONG(tms34010_state *tms)
188inline INT32 tms340x0_device::PARAM_LONG()
236189{
237   UINT32 pc = TOBYTE(tms->pc);
238   tms->pc += 4 << 3;
239   return (UINT16)tms->direct->read_raw_word(pc) | (tms->direct->read_raw_word(pc + 2) << 16);
190   UINT32 pc = TOBYTE(m_pc);
191   m_pc += 4 << 3;
192   return (UINT16)m_direct->read_raw_word(pc) | (m_direct->read_raw_word(pc + 2) << 16);
240193}
241194
242INLINE INT16 PARAM_WORD_NO_INC(tms34010_state *tms)
195inline INT16 tms340x0_device::PARAM_WORD_NO_INC()
243196{
244   return tms->direct->read_raw_word(TOBYTE(tms->pc));
197   return m_direct->read_raw_word(TOBYTE(m_pc));
245198}
246199
247INLINE INT32 PARAM_LONG_NO_INC(tms34010_state *tms)
200inline INT32 tms340x0_device::PARAM_LONG_NO_INC()
248201{
249   UINT32 pc = TOBYTE(tms->pc);
250   return (UINT16)tms->direct->read_raw_word(pc) | (tms->direct->read_raw_word(pc + 2) << 16);
202   UINT32 pc = TOBYTE(m_pc);
203   return (UINT16)m_direct->read_raw_word(pc) | (m_direct->read_raw_word(pc + 2) << 16);
251204}
252205
253206/* read memory byte */
254INLINE UINT32 RBYTE(tms34010_state *tms, offs_t offset)
207inline UINT32 tms340x0_device::RBYTE(offs_t offset)
255208{
256209   UINT32 ret;
257   RFIELDMAC_8(tms);
210   RFIELDMAC_8();
258211   return ret;
259212}
260213
261214/* write memory byte */
262INLINE void WBYTE(tms34010_state *tms, offs_t offset, UINT32 data)
215inline void tms340x0_device::WBYTE(offs_t offset, UINT32 data)
263216{
264   WFIELDMAC_8(tms);
217   WFIELDMAC_8();
265218}
266219
267220/* read memory long */
268INLINE UINT32 RLONG(tms34010_state *tms, offs_t offset)
221inline UINT32 tms340x0_device::RLONG(offs_t offset)
269222{
270   RFIELDMAC_32(tms);
223   RFIELDMAC_32();
271224}
272225
273226/* write memory long */
274INLINE void WLONG(tms34010_state *tms, offs_t offset, UINT32 data)
227inline void tms340x0_device::WLONG(offs_t offset, UINT32 data)
275228{
276   WFIELDMAC_32(tms);
229   WFIELDMAC_32();
277230}
278231
279232/* pushes/pops a value from the stack */
280INLINE void PUSH(tms34010_state *tms, UINT32 data)
233inline void tms340x0_device::PUSH(UINT32 data)
281234{
282   SP(tms) -= 0x20;
283   WLONG(tms, SP(tms), data);
235   SP() -= 0x20;
236   WLONG(SP(), data);
284237}
285238
286INLINE INT32 POP(tms34010_state *tms)
239inline INT32 tms340x0_device::POP()
287240{
288   INT32 ret = RLONG(tms, SP(tms));
289   SP(tms) += 0x20;
241   INT32 ret = RLONG(SP());
242   SP() += 0x20;
290243   return ret;
291244}
292245
r31176r31177
296249    PIXEL READS
297250***************************************************************************/
298251
299#define RP(T,m1,m2)                                             \
252#define RP(m1,m2)                                           \
300253   /* TODO: Plane masking */                               \
301   return (TMS34010_RDMEM_WORD(T, TOBYTE(offset & 0xfffffff0)) >> (offset & m1)) & m2;
254   return (TMS34010_RDMEM_WORD(TOBYTE(offset & 0xfffffff0)) >> (offset & m1)) & m2;
302255
303static UINT32 read_pixel_1(tms34010_state *tms, offs_t offset) { RP(tms,0x0f,0x01) }
304static UINT32 read_pixel_2(tms34010_state *tms, offs_t offset) { RP(tms,0x0e,0x03) }
305static UINT32 read_pixel_4(tms34010_state *tms, offs_t offset) { RP(tms,0x0c,0x0f) }
306static UINT32 read_pixel_8(tms34010_state *tms, offs_t offset) { RP(tms,0x08,0xff) }
307static UINT32 read_pixel_16(tms34010_state *tms, offs_t offset)
256UINT32 tms340x0_device::read_pixel_1(offs_t offset) { RP(0x0f,0x01) }
257UINT32 tms340x0_device::read_pixel_2(offs_t offset) { RP(0x0e,0x03) }
258UINT32 tms340x0_device::read_pixel_4(offs_t offset) { RP(0x0c,0x0f) }
259UINT32 tms340x0_device::read_pixel_8(offs_t offset) { RP(0x08,0xff) }
260UINT32 tms340x0_device::read_pixel_16(offs_t offset)
308261{
309262   /* TODO: Plane masking */
310   return TMS34010_RDMEM_WORD(tms, TOBYTE(offset & 0xfffffff0));
263   return TMS34010_RDMEM_WORD(TOBYTE(offset & 0xfffffff0));
311264}
312static UINT32 read_pixel_32(tms34010_state *tms, offs_t offset)
265UINT32 tms340x0_device::read_pixel_32(offs_t offset)
313266{
314267   /* TODO: Plane masking */
315   return TMS34010_RDMEM_DWORD(tms, TOBYTE(offset & 0xffffffe0));
268   return TMS34010_RDMEM_DWORD(TOBYTE(offset & 0xffffffe0));
316269}
317270
318271/* Shift register read */
319static UINT32 read_pixel_shiftreg(tms34010_state *tms, offs_t offset)
272UINT32 tms340x0_device::read_pixel_shiftreg(offs_t offset)
320273{
321   if (tms->config->to_shiftreg)
322      tms->config->to_shiftreg(*tms->program, offset, &tms->shiftreg[0]);
274   if (m_config->to_shiftreg)
275      m_config->to_shiftreg(*m_program, offset, &m_shiftreg[0]);
323276   else
324      fatalerror("To ShiftReg function not set. PC = %08X\n", tms->pc);
325   return tms->shiftreg[0];
277      fatalerror("To ShiftReg function not set. PC = %08X\n", m_pc);
278   return m_shiftreg[0];
326279}
327280
328281
r31176r31177
332285***************************************************************************/
333286
334287/* No Raster Op + No Transparency */
335#define WP(T,m1,m2)                                                                         \
288#define WP(m1,m2)                                                                           \
336289   UINT32 a = TOBYTE(offset & 0xfffffff0);                                                 \
337   UINT32 pix = TMS34010_RDMEM_WORD(T,a);                                                  \
290   UINT32 pix = TMS34010_RDMEM_WORD(a);                                                    \
338291   UINT32 shiftcount = offset & m1;                                                        \
339292                                                                     \
340293   /* TODO: plane masking */                                                               \
341294   data &= m2;                                                                             \
342295   pix = (pix & ~(m2 << shiftcount)) | (data << shiftcount);                               \
343   TMS34010_WRMEM_WORD(T, a, pix);
296   TMS34010_WRMEM_WORD(a, pix);
297
344298/* No Raster Op + Transparency */
345#define WP_T(T,m1,m2)                                                                       \
299#define WP_T(m1,m2)                                                                         \
346300   /* TODO: plane masking */                                                               \
347301   data &= m2;                                                                             \
348302   if (data)                                                                               \
349303   {                                                                                       \
350304      UINT32 a = TOBYTE(offset & 0xfffffff0);                                             \
351      UINT32 pix = TMS34010_RDMEM_WORD(T,a);                                              \
305      UINT32 pix = TMS34010_RDMEM_WORD(a);                                                \
352306      UINT32 shiftcount = offset & m1;                                                    \
353307                                                                     \
354308      /* TODO: plane masking */                                                           \
355309      pix = (pix & ~(m2 << shiftcount)) | (data << shiftcount);                           \
356      TMS34010_WRMEM_WORD(T, a, pix);                                                     \
310      TMS34010_WRMEM_WORD(a, pix);                                                        \
357311   }
358312/* Raster Op + No Transparency */
359#define WP_R(T,m1,m2)                                                                       \
313#define WP_R(m1,m2)                                                                         \
360314   UINT32 a = TOBYTE(offset & 0xfffffff0);                                                 \
361   UINT32 pix = TMS34010_RDMEM_WORD(T,a);                                                  \
315   UINT32 pix = TMS34010_RDMEM_WORD(a);                                                    \
362316   UINT32 shiftcount = offset & m1;                                                        \
363317                                                                     \
364318   /* TODO: plane masking */                                                               \
365   data = (*(T)->raster_op)(tms, data & m2, (pix >> shiftcount) & m2) & m2;                \
319   data = (this->*m_raster_op)(data & m2, (pix >> shiftcount) & m2) & m2;                  \
366320   pix = (pix & ~(m2 << shiftcount)) | (data << shiftcount);                               \
367   TMS34010_WRMEM_WORD(T, a, pix);
321   TMS34010_WRMEM_WORD(a, pix);
322
368323/* Raster Op + Transparency */
369#define WP_R_T(T,m1,m2)                                                                     \
324#define WP_R_T(m1,m2)                                                                       \
370325   UINT32 a = TOBYTE(offset & 0xfffffff0);                                                 \
371   UINT32 pix = TMS34010_RDMEM_WORD(T,a);                                                  \
326   UINT32 pix = TMS34010_RDMEM_WORD(a);                                                    \
372327   UINT32 shiftcount = offset & m1;                                                        \
373328                                                                     \
374329   /* TODO: plane masking */                                                               \
375   data = (*(T)->raster_op)(tms, data & m2, (pix >> shiftcount) & m2) & m2;                \
330   data = (this->*m_raster_op)(data & m2, (pix >> shiftcount) & m2) & m2;                  \
376331   if (data)                                                                               \
377332   {                                                                                       \
378333      pix = (pix & ~(m2 << shiftcount)) | (data << shiftcount);                           \
379      TMS34010_WRMEM_WORD(T, a, pix);                                                     \
334      TMS34010_WRMEM_WORD(a, pix);                                                        \
380335   }
381336
382337/* No Raster Op + No Transparency */
383static void write_pixel_1(tms34010_state *tms, offs_t offset, UINT32 data) { WP(tms, 0x0f, 0x01); }
384static void write_pixel_2(tms34010_state *tms, offs_t offset, UINT32 data) { WP(tms, 0x0e, 0x03); }
385static void write_pixel_4(tms34010_state *tms, offs_t offset, UINT32 data) { WP(tms, 0x0c, 0x0f); }
386static void write_pixel_8(tms34010_state *tms, offs_t offset, UINT32 data) { WP(tms, 0x08, 0xff); }
387static void write_pixel_16(tms34010_state *tms, offs_t offset, UINT32 data)
338void tms340x0_device::write_pixel_1(offs_t offset, UINT32 data) { WP(0x0f, 0x01); }
339void tms340x0_device::write_pixel_2(offs_t offset, UINT32 data) { WP(0x0e, 0x03); }
340void tms340x0_device::write_pixel_4(offs_t offset, UINT32 data) { WP(0x0c, 0x0f); }
341void tms340x0_device::write_pixel_8(offs_t offset, UINT32 data) { WP(0x08, 0xff); }
342void tms340x0_device::write_pixel_16(offs_t offset, UINT32 data)
388343{
389344   /* TODO: plane masking */
390   TMS34010_WRMEM_WORD(tms, TOBYTE(offset & 0xfffffff0), data);
345   TMS34010_WRMEM_WORD(TOBYTE(offset & 0xfffffff0), data);
391346}
392static void write_pixel_32(tms34010_state *tms, offs_t offset, UINT32 data)
347void tms340x0_device::write_pixel_32(offs_t offset, UINT32 data)
393348{
394349   /* TODO: plane masking */
395   TMS34010_WRMEM_WORD(tms, TOBYTE(offset & 0xffffffe0), data);
350   TMS34010_WRMEM_WORD(TOBYTE(offset & 0xffffffe0), data);
396351}
397352
398353/* No Raster Op + Transparency */
399static void write_pixel_t_1(tms34010_state *tms, offs_t offset, UINT32 data) { WP_T(tms, 0x0f, 0x01); }
400static void write_pixel_t_2(tms34010_state *tms, offs_t offset, UINT32 data) { WP_T(tms, 0x0e, 0x03); }
401static void write_pixel_t_4(tms34010_state *tms, offs_t offset, UINT32 data) { WP_T(tms, 0x0c, 0x0f); }
402static void write_pixel_t_8(tms34010_state *tms, offs_t offset, UINT32 data) { WP_T(tms, 0x08, 0xff); }
403static void write_pixel_t_16(tms34010_state *tms, offs_t offset, UINT32 data)
354void tms340x0_device::write_pixel_t_1(offs_t offset, UINT32 data) { WP_T(0x0f, 0x01); }
355void tms340x0_device::write_pixel_t_2(offs_t offset, UINT32 data) { WP_T(0x0e, 0x03); }
356void tms340x0_device::write_pixel_t_4(offs_t offset, UINT32 data) { WP_T(0x0c, 0x0f); }
357void tms340x0_device::write_pixel_t_8(offs_t offset, UINT32 data) { WP_T(0x08, 0xff); }
358void tms340x0_device::write_pixel_t_16(offs_t offset, UINT32 data)
404359{
405360   /* TODO: plane masking */
406361   if (data)
407      TMS34010_WRMEM_WORD(tms, TOBYTE(offset & 0xfffffff0), data);
362      TMS34010_WRMEM_WORD(TOBYTE(offset & 0xfffffff0), data);
408363}
409static void write_pixel_t_32(tms34010_state *tms, offs_t offset, UINT32 data)
364void tms340x0_device::write_pixel_t_32(offs_t offset, UINT32 data)
410365{
411366   /* TODO: plane masking */
412367   if (data)
413      TMS34010_WRMEM_DWORD(tms, TOBYTE(offset & 0xffffffe0), data);
368      TMS34010_WRMEM_DWORD(TOBYTE(offset & 0xffffffe0), data);
414369}
415370
416371/* Raster Op + No Transparency */
417static void write_pixel_r_1(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R(tms, 0x0f, 0x01); }
418static void write_pixel_r_2(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R(tms, 0x0e, 0x03); }
419static void write_pixel_r_4(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R(tms, 0x0c, 0x0f); }
420static void write_pixel_r_8(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R(tms, 0x08, 0xff); }
421static void write_pixel_r_16(tms34010_state *tms, offs_t offset, UINT32 data)
372void tms340x0_device::write_pixel_r_1(offs_t offset, UINT32 data) { WP_R(0x0f, 0x01); }
373void tms340x0_device::write_pixel_r_2(offs_t offset, UINT32 data) { WP_R(0x0e, 0x03); }
374void tms340x0_device::write_pixel_r_4(offs_t offset, UINT32 data) { WP_R(0x0c, 0x0f); }
375void tms340x0_device::write_pixel_r_8(offs_t offset, UINT32 data) { WP_R(0x08, 0xff); }
376void tms340x0_device::write_pixel_r_16(offs_t offset, UINT32 data)
422377{
423378   /* TODO: plane masking */
424379   UINT32 a = TOBYTE(offset & 0xfffffff0);
425   TMS34010_WRMEM_WORD(tms, a, (*tms->raster_op)(tms, data, TMS34010_RDMEM_WORD(tms, a)));
380   TMS34010_WRMEM_WORD(a, (this->*m_raster_op)(data, TMS34010_RDMEM_WORD(a)));
426381}
427static void write_pixel_r_32(tms34010_state *tms, offs_t offset, UINT32 data)
382void tms340x0_device::write_pixel_r_32(offs_t offset, UINT32 data)
428383{
429384   /* TODO: plane masking */
430385   UINT32 a = TOBYTE(offset & 0xffffffe0);
431   TMS34010_WRMEM_DWORD(tms, a, (*tms->raster_op)(tms, data, TMS34010_RDMEM_DWORD(tms, a)));
386   TMS34010_WRMEM_DWORD(a, (this->*m_raster_op)(data, TMS34010_RDMEM_DWORD(a)));
432387}
433388
434389/* Raster Op + Transparency */
435static void write_pixel_r_t_1(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R_T(tms, 0x0f,0x01); }
436static void write_pixel_r_t_2(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R_T(tms, 0x0e,0x03); }
437static void write_pixel_r_t_4(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R_T(tms, 0x0c,0x0f); }
438static void write_pixel_r_t_8(tms34010_state *tms, offs_t offset, UINT32 data) { WP_R_T(tms, 0x08,0xff); }
439static void write_pixel_r_t_16(tms34010_state *tms, offs_t offset, UINT32 data)
390void tms340x0_device::write_pixel_r_t_1(offs_t offset, UINT32 data) { WP_R_T(0x0f,0x01); }
391void tms340x0_device::write_pixel_r_t_2(offs_t offset, UINT32 data) { WP_R_T(0x0e,0x03); }
392void tms340x0_device::write_pixel_r_t_4(offs_t offset, UINT32 data) { WP_R_T(0x0c,0x0f); }
393void tms340x0_device::write_pixel_r_t_8(offs_t offset, UINT32 data) { WP_R_T(0x08,0xff); }
394void tms340x0_device::write_pixel_r_t_16(offs_t offset, UINT32 data)
440395{
441396   /* TODO: plane masking */
442397   UINT32 a = TOBYTE(offset & 0xfffffff0);
443   data = (*tms->raster_op)(tms, data, TMS34010_RDMEM_WORD(tms, a));
398   data = (this->*m_raster_op)(data, TMS34010_RDMEM_WORD(a));
444399
445400   if (data)
446      TMS34010_WRMEM_WORD(tms, a, data);
401      TMS34010_WRMEM_WORD(a, data);
447402}
448static void write_pixel_r_t_32(tms34010_state *tms, offs_t offset, UINT32 data)
403void tms340x0_device::write_pixel_r_t_32(offs_t offset, UINT32 data)
449404{
450405   /* TODO: plane masking */
451406   UINT32 a = TOBYTE(offset & 0xffffffe0);
452   data = (*tms->raster_op)(tms, data, TMS34010_RDMEM_DWORD(tms, a));
407   data = (this->*m_raster_op)(data, TMS34010_RDMEM_DWORD(a));
453408
454409   if (data)
455      TMS34010_WRMEM_DWORD(tms, a, data);
410      TMS34010_WRMEM_DWORD(a, data);
456411}
457412
458413/* Shift register write */
459static void write_pixel_shiftreg(tms34010_state *tms, offs_t offset, UINT32 data)
414void tms340x0_device::write_pixel_shiftreg(offs_t offset, UINT32 data)
460415{
461   if (tms->config->from_shiftreg)
462      tms->config->from_shiftreg(*tms->program, offset, &tms->shiftreg[0]);
416   if (m_config->from_shiftreg)
417      m_config->from_shiftreg(*m_program, offset, &m_shiftreg[0]);
463418   else
464      fatalerror("From ShiftReg function not set. PC = %08X\n", tms->pc);
419      fatalerror("From ShiftReg function not set. PC = %08X\n", m_pc);
465420}
466421
467422
r31176r31177
471426***************************************************************************/
472427
473428/* Raster operations */
474static UINT32 raster_op_1(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return newpix & oldpix; }
475static UINT32 raster_op_2(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return newpix & ~oldpix; }
476static UINT32 raster_op_3(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return 0; }
477static UINT32 raster_op_4(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return newpix | ~oldpix; }
478static UINT32 raster_op_5(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return ~(newpix ^ oldpix); }
479static UINT32 raster_op_6(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return ~oldpix; }
480static UINT32 raster_op_7(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return ~(newpix | oldpix); }
481static UINT32 raster_op_8(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return newpix | oldpix; }
482static UINT32 raster_op_9(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)  { return oldpix; }
483static UINT32 raster_op_10(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return newpix ^ oldpix; }
484static UINT32 raster_op_11(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return ~newpix & oldpix; }
485static UINT32 raster_op_12(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return 0xffff; }
486static UINT32 raster_op_13(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return ~newpix | oldpix; }
487static UINT32 raster_op_14(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return ~(newpix & oldpix); }
488static UINT32 raster_op_15(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return ~newpix; }
489static UINT32 raster_op_16(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return newpix + oldpix; }
490static UINT32 raster_op_17(tms34010_state *tms, UINT32 newpix, UINT32 oldpix)
429UINT32 tms340x0_device::raster_op_1(UINT32 newpix, UINT32 oldpix)  { return newpix & oldpix; }
430UINT32 tms340x0_device::raster_op_2(UINT32 newpix, UINT32 oldpix)  { return newpix & ~oldpix; }
431UINT32 tms340x0_device::raster_op_3(UINT32 newpix, UINT32 oldpix)  { return 0; }
432UINT32 tms340x0_device::raster_op_4(UINT32 newpix, UINT32 oldpix)  { return newpix | ~oldpix; }
433UINT32 tms340x0_device::raster_op_5(UINT32 newpix, UINT32 oldpix)  { return ~(newpix ^ oldpix); }
434UINT32 tms340x0_device::raster_op_6(UINT32 newpix, UINT32 oldpix)  { return ~oldpix; }
435UINT32 tms340x0_device::raster_op_7(UINT32 newpix, UINT32 oldpix)  { return ~(newpix | oldpix); }
436UINT32 tms340x0_device::raster_op_8(UINT32 newpix, UINT32 oldpix)  { return newpix | oldpix; }
437UINT32 tms340x0_device::raster_op_9(UINT32 newpix, UINT32 oldpix)  { return oldpix; }
438UINT32 tms340x0_device::raster_op_10(UINT32 newpix, UINT32 oldpix) { return newpix ^ oldpix; }
439UINT32 tms340x0_device::raster_op_11(UINT32 newpix, UINT32 oldpix) { return ~newpix & oldpix; }
440UINT32 tms340x0_device::raster_op_12(UINT32 newpix, UINT32 oldpix) { return 0xffff; }
441UINT32 tms340x0_device::raster_op_13(UINT32 newpix, UINT32 oldpix) { return ~newpix | oldpix; }
442UINT32 tms340x0_device::raster_op_14(UINT32 newpix, UINT32 oldpix) { return ~(newpix & oldpix); }
443UINT32 tms340x0_device::raster_op_15(UINT32 newpix, UINT32 oldpix) { return ~newpix; }
444UINT32 tms340x0_device::raster_op_16(UINT32 newpix, UINT32 oldpix) { return newpix + oldpix; }
445UINT32 tms340x0_device::raster_op_17(UINT32 newpix, UINT32 oldpix)
491446{
492   UINT32 max = (UINT32)0xffffffff >> (32 - IOREG(tms, REG_PSIZE));
447   UINT32 max = (UINT32)0xffffffff >> (32 - IOREG(REG_PSIZE));
493448   UINT32 res = newpix + oldpix;
494449   return (res > max) ? max : res;
495450}
496static UINT32 raster_op_18(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return oldpix - newpix; }
497static UINT32 raster_op_19(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix - newpix : 0; }
498static UINT32 raster_op_20(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix : newpix; }
499static UINT32 raster_op_21(tms34010_state *tms, UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? newpix : oldpix; }
451UINT32 tms340x0_device::raster_op_18(UINT32 newpix, UINT32 oldpix) { return oldpix - newpix; }
452UINT32 tms340x0_device::raster_op_19(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix - newpix : 0; }
453UINT32 tms340x0_device::raster_op_20(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix : newpix; }
454UINT32 tms340x0_device::raster_op_21(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? newpix : oldpix; }
500455
501456
502457
r31176r31177
520475****************************************************************************/
521476
522477/* Generate pending interrupts. */
523static void check_interrupt(tms34010_state *tms)
478void tms340x0_device::check_interrupt()
524479{
525480   int vector = 0;
526481   int irqline = -1;
527482   int irq;
528483
529484   /* if we're not actively executing, skip it */
530   if (!tms->executing)
485   if (!m_executing)
531486      return;
532487
533488   /* check for NMI first */
534   if (IOREG(tms, REG_HSTCTLH) & 0x0100)
489   if (IOREG(REG_HSTCTLH) & 0x0100)
535490   {
536      LOG(("TMS34010 '%s' takes NMI\n", tms->device->tag()));
491      LOG(("TMS34010 '%s' takes NMI\n", tag()));
537492
538493      /* ack the NMI */
539      IOREG(tms, REG_HSTCTLH) &= ~0x0100;
494      IOREG(REG_HSTCTLH) &= ~0x0100;
540495
541496      /* handle NMI mode bit */
542      if (!(IOREG(tms, REG_HSTCTLH) & 0x0200))
497      if (!(IOREG(REG_HSTCTLH) & 0x0200))
543498      {
544         PUSH(tms, tms->pc);
545         PUSH(tms, tms->st);
499         PUSH(m_pc);
500         PUSH(m_st);
546501      }
547502
548503      /* leap to the vector */
549      RESET_ST(tms);
550      tms->pc = RLONG(tms, 0xfffffee0);
551      COUNT_CYCLES(tms,16);
504      RESET_ST();
505      m_pc = RLONG(0xfffffee0);
506      COUNT_CYCLES(16);
552507      return;
553508   }
554509
555510   /* early out if everything else is disabled */
556   irq = IOREG(tms, REG_INTPEND) & IOREG(tms, REG_INTENB);
557   if (!IE_FLAG(tms) || !irq)
511   irq = IOREG(REG_INTPEND) & IOREG(REG_INTENB);
512   if (!IE_FLAG() || !irq)
558513      return;
559514
560515   /* host interrupt */
561516   if (irq & TMS34010_HI)
562517   {
563      LOG(("TMS34010 '%s' takes HI\n", tms->device->tag()));
518      LOG(("TMS34010 '%s' takes HI\n", tag()));
564519      vector = 0xfffffec0;
565520   }
566521
567522   /* display interrupt */
568523   else if (irq & TMS34010_DI)
569524   {
570      LOG(("TMS34010 '%s' takes DI\n", tms->device->tag()));
525      LOG(("TMS34010 '%s' takes DI\n", tag()));
571526      vector = 0xfffffea0;
572527   }
573528
574529   /* window violation interrupt */
575530   else if (irq & TMS34010_WV)
576531   {
577      LOG(("TMS34010 '%s' takes WV\n", tms->device->tag()));
532      LOG(("TMS34010 '%s' takes WV\n", tag()));
578533      vector = 0xfffffe80;
579534   }
580535
581536   /* external 1 interrupt */
582537   else if (irq & TMS34010_INT1)
583538   {
584      LOG(("TMS34010 '%s' takes INT1\n", tms->device->tag()));
539      LOG(("TMS34010 '%s' takes INT1\n", tag()));
585540      vector = 0xffffffc0;
586541      irqline = 0;
587542   }
r31176r31177
589544   /* external 2 interrupt */
590545   else if (irq & TMS34010_INT2)
591546   {
592      LOG(("TMS34010 '%s' takes INT2\n", tms->device->tag()));
547      LOG(("TMS34010 '%s' takes INT2\n", tag()));
593548      vector = 0xffffffa0;
594549      irqline = 1;
595550   }
r31176r31177
597552   /* if we took something, generate it */
598553   if (vector)
599554   {
600      PUSH(tms, tms->pc);
601      PUSH(tms, tms->st);
602      RESET_ST(tms);
603      tms->pc = RLONG(tms, vector);
604      COUNT_CYCLES(tms,16);
555      PUSH(m_pc);
556      PUSH(m_st);
557      RESET_ST();
558      m_pc = RLONG(vector);
559      COUNT_CYCLES(16);
605560
606561      /* call the callback for externals */
607562      if (irqline >= 0)
608         (void)(tms->irq_callback)(*tms->device, irqline);
563         standard_irq_callback(irqline);
609564   }
610565}
611566
r31176r31177
615570    Reset the CPU emulation
616571***************************************************************************/
617572
618static CPU_INIT( tms34010 )
573void tms340x0_device::device_start()
619574{
620   const tms34010_config *configdata = device->static_config() ? (const tms34010_config *)device->static_config() : &default_config;
621   tms34010_state *tms = get_safe_token(device);
575   m_external_host_access = FALSE;
622576
623   tms->external_host_access = FALSE;
577   m_program = &space(AS_PROGRAM);
578   m_direct = &m_program->direct();
579   m_screen = downcast<screen_device *>(machine().device(m_config->screen_tag));
624580
625   tms->config = configdata;
626   tms->irq_callback = irqcallback;
627   tms->device = device;
628   tms->program = &device->space(AS_PROGRAM);
629   tms->direct = &tms->program->direct();
630   tms->screen = downcast<screen_device *>(device->machine().device(configdata->screen_tag));
631
632581   /* set up the state table */
633582   {
634      device_state_interface *state;
635      device->interface(state);
636      state->state_add(TMS34010_PC,     "PC",        tms->pc);
637      state->state_add(STATE_GENPC,     "GENPC",     tms->pc).noshow();
638      state->state_add(STATE_GENPCBASE, "GENPCBASE", tms->ppc).noshow();
639      state->state_add(TMS34010_SP,     "SP",        tms->regs[15].reg);
640      state->state_add(STATE_GENSP,     "GENSP",     tms->regs[15].reg).noshow();
641      state->state_add(TMS34010_ST,     "ST",        tms->st);
642      state->state_add(STATE_GENFLAGS,  "GENFLAGS",  tms->st).noshow().formatstr("%18s");
583      state_add(TMS34010_PC,     "PC",        m_pc);
584      state_add(STATE_GENPC,     "GENPC",     m_pc).noshow();
585      state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow();
586      state_add(TMS34010_SP,     "SP",        m_regs[15].reg);
587      state_add(STATE_GENSP,     "GENSP",     m_regs[15].reg).noshow();
588      state_add(TMS34010_ST,     "ST",        m_st);
589      state_add(STATE_GENFLAGS,  "GENFLAGS",  m_st).noshow().formatstr("%18s");
643590
644591      astring tempstr;
645592      for (int regnum = 0; regnum < 15; regnum++)
646         state->state_add(TMS34010_A0 + regnum, tempstr.format("A%d", regnum), tms->regs[regnum].reg);
593      {
594         state_add(TMS34010_A0 + regnum, tempstr.format("A%d", regnum), m_regs[regnum].reg);
595      }
647596      for (int regnum = 0; regnum < 15; regnum++)
648         state->state_add(TMS34010_B0 + regnum, tempstr.format("B%d", regnum), tms->regs[30 - regnum].reg);
597      {
598         state_add(TMS34010_B0 + regnum, tempstr.format("B%d", regnum), m_regs[30 - regnum].reg);
599      }
649600   }
650601
651602   /* allocate a scanline timer and set it to go off at the start */
652   tms->scantimer = device->machine().scheduler().timer_alloc(FUNC(scanline_callback), tms);
653   tms->scantimer->adjust(attotime::zero);
603   m_scantimer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tms340x0_device::scanline_callback), this));
604   m_scantimer->adjust(attotime::zero);
654605
655   device->save_item(NAME(tms->pc));
656   device->save_item(NAME(tms->st));
657   device->save_item(NAME(tms->reset_deferred));
658   device->save_item(NAME(tms->shiftreg));
659   device->save_item(NAME(tms->IOregs));
660   device->save_item(NAME(tms->convsp));
661   device->save_item(NAME(tms->convdp));
662   device->save_item(NAME(tms->convmp));
663   device->save_item(NAME(tms->pixelshift));
664   device->save_item(NAME(tms->gfxcycles));
665   device->save_pointer(NAME(&tms->regs[0].reg), ARRAY_LENGTH(tms->regs));
666   device->machine().save().register_postload(save_prepost_delegate(FUNC(tms34010_state_postload), tms));
606   save_item(NAME(m_pc));
607   save_item(NAME(m_st));
608   save_item(NAME(m_reset_deferred));
609   save_item(NAME(m_shiftreg));
610   save_item(NAME(m_IOregs));
611   save_item(NAME(m_convsp));
612   save_item(NAME(m_convdp));
613   save_item(NAME(m_convmp));
614   save_item(NAME(m_pixelshift));
615   save_item(NAME(m_gfxcycles));
616   save_pointer(NAME(&m_regs[0].reg), ARRAY_LENGTH(m_regs));
617   machine().save().register_postload(save_prepost_delegate(FUNC(tms340x0_device::tms34010_state_postload), this));
618
619   m_icountptr = &m_icount;
667620}
668621
669static CPU_RESET( tms34010 )
622void tms340x0_device::device_reset()
670623{
671   /* zap the state and copy in the config pointer */
672   tms34010_state *tms = get_safe_token(device);
673   const tms34010_config *config = tms->config;
674   screen_device *screen = tms->screen;
675   device_irq_acknowledge_delegate save_irqcallback = tms->irq_callback;
676   emu_timer *save_scantimer = tms->scantimer;
624   m_ppc = 0;
625   m_st = 0;
626   m_pixel_write = NULL;
627   m_pixel_read = NULL;
628   m_raster_op = NULL;
629   m_pixel_op = NULL;
630   m_pixel_op_timing = 0;
631   m_convsp = 0;
632   m_convdp = 0;
633   m_convmp = 0;
634   m_gfxcycles = 0;
635   m_pixelshift = 0;
636   m_hblank_stable = 0;
637   m_external_host_access = 0;
638   m_executing = 0;
639   memset(m_regs, 0, sizeof(m_regs));
640   memset(m_IOregs, 0, sizeof(m_IOregs));
641   memset(m_shiftreg, 0, sizeof(m_shiftreg));
677642
678   memset(tms, 0, sizeof(*tms));
679
680   tms->config = config;
681   tms->screen = screen;
682   tms->irq_callback = save_irqcallback;
683   tms->scantimer = save_scantimer;
684   tms->device = device;
685   tms->program = &device->space(AS_PROGRAM);
686   tms->direct = &tms->program->direct();
687
688643   /* fetch the initial PC and reset the state */
689   tms->pc = RLONG(tms, 0xffffffe0) & 0xfffffff0;
690   RESET_ST(tms);
644   m_pc = RLONG(0xffffffe0) & 0xfffffff0;
645   RESET_ST();
691646
692647   /* HALT the CPU if requested, and remember to re-read the starting PC */
693648   /* the first time we are run */
694   tms->reset_deferred = tms->config->halt_on_reset;
695   if (tms->config->halt_on_reset)
696      (downcast<tms34010_device*>(device))->io_register_w(device->space(AS_PROGRAM), REG_HSTCTLH, 0x8000, 0xffff);
649   m_reset_deferred = m_config->halt_on_reset;
650   if (m_config->halt_on_reset)
651   {
652      io_register_w(*m_program, REG_HSTCTLH, 0x8000, 0xffff);
653   }
697654}
698655
699656
700static CPU_RESET( tms34020 )
701{
702   tms34010_state *tms = get_safe_token(device);
703   CPU_RESET_CALL(tms34010);
704   tms->is_34020 = 1;
705}
706
707
708
709657/***************************************************************************
710    Shut down the CPU emulation
711***************************************************************************/
712
713static CPU_EXIT( tms34010 )
714{
715}
716
717
718
719/***************************************************************************
720658    Set IRQ line state
721659***************************************************************************/
722660
723static void set_irq_line(tms34010_state *tms, int irqline, int linestate)
661void tms340x0_device::execute_set_input(int inputnum, int state)
724662{
725   LOG(("TMS34010 '%s' set irq line %d state %d\n", tms->device->tag(), irqline, linestate));
663   LOG(("TMS34010 '%s' set irq line %d state %d\n", tag(), inputnum, state));
726664
727665   /* set the pending interrupt */
728   switch (irqline)
666   switch (inputnum)
729667   {
730668      case 0:
731         if (linestate != CLEAR_LINE)
732            IOREG(tms, REG_INTPEND) |= TMS34010_INT1;
669         if (state != CLEAR_LINE)
670            IOREG(REG_INTPEND) |= TMS34010_INT1;
733671         else
734            IOREG(tms, REG_INTPEND) &= ~TMS34010_INT1;
672            IOREG(REG_INTPEND) &= ~TMS34010_INT1;
735673         break;
736674
737675      case 1:
738         if (linestate != CLEAR_LINE)
739            IOREG(tms, REG_INTPEND) |= TMS34010_INT2;
676         if (state != CLEAR_LINE)
677            IOREG(REG_INTPEND) |= TMS34010_INT2;
740678         else
741            IOREG(tms, REG_INTPEND) &= ~TMS34010_INT2;
679            IOREG(REG_INTPEND) &= ~TMS34010_INT2;
742680         break;
743681   }
744682}
r31176r31177
749687    Generate internal interrupt
750688***************************************************************************/
751689
752static TIMER_CALLBACK( internal_interrupt_callback )
690TIMER_CALLBACK_MEMBER( tms340x0_device::internal_interrupt_callback )
753691{
754   tms34010_state *tms = (tms34010_state *)ptr;
755692   int type = param;
756693
757694   /* call through to the CPU to generate the int */
758   IOREG(tms, REG_INTPEND) |= type;
759   LOG(("TMS34010 '%s' set internal interrupt $%04x\n", tms->device->tag(), type));
695   IOREG(REG_INTPEND) |= type;
696   LOG(("TMS34010 '%s' set internal interrupt $%04x\n", tag(), type));
760697
761698   /* generate triggers so that spin loops can key off them */
762   tms->device->signal_interrupt_trigger();
699   signal_interrupt_trigger();
763700}
764701
765702
r31176r31177
768705    Execute
769706***************************************************************************/
770707
771static CPU_EXECUTE( tms34010 )
708void tms340x0_device::execute_run()
772709{
773   tms34010_state *tms = get_safe_token(device);
774
775710   /* Get out if CPU is halted. Absolutely no interrupts must be taken!!! */
776   if (IOREG(tms, REG_HSTCTLH) & 0x8000)
711   if (IOREG(REG_HSTCTLH) & 0x8000)
777712   {
778      tms->icount = 0;
713      m_icount = 0;
779714      return;
780715   }
781716
782717   /* if the CPU's reset was deferred, do it now */
783   if (tms->reset_deferred)
718   if (m_reset_deferred)
784719   {
785      tms->reset_deferred = 0;
786      tms->pc = RLONG(tms, 0xffffffe0);
720      m_reset_deferred = 0;
721      m_pc = RLONG(0xffffffe0);
787722   }
788723
789724   /* check interrupts first */
790   tms->executing = TRUE;
791   check_interrupt(tms);
792   if ((tms->device->machine().debug_flags & DEBUG_FLAG_ENABLED) == 0)
725   m_executing = TRUE;
726   check_interrupt();
727   if ((machine().debug_flags & DEBUG_FLAG_ENABLED) == 0)
793728   {
794729      do
795730      {
796731         UINT16 op;
797         tms->ppc = tms->pc;
798         op = ROPCODE(tms);
799         (*opcode_table[op >> 4])(tms, op);
800      } while (tms->icount > 0);
732         m_ppc = m_pc;
733         op = ROPCODE();
734         (this->*s_opcode_table[op >> 4])(op);
735      } while (m_icount > 0);
801736   }
802737   else
803738   {
804739      do
805740      {
806741         UINT16 op;
807         debugger_instruction_hook(tms->device, tms->pc);
808         tms->ppc = tms->pc;
809         op = ROPCODE(tms);
810         (*opcode_table[op >> 4])(tms, op);
811      } while (tms->icount > 0);
742         debugger_instruction_hook(this, m_pc);
743         m_ppc = m_pc;
744         op = ROPCODE();
745         (this->*s_opcode_table[op >> 4])(op);
746      } while (m_icount > 0);
812747   }
813   tms->executing = FALSE;
748   m_executing = FALSE;
814749}
815750
816751
r31176r31177
819754    PIXEL OPS
820755***************************************************************************/
821756
822static void (*const pixel_write_ops[4][6])(tms34010_state *tms, offs_t offset, UINT32 data) =
757const tms340x0_device::pixel_write_func tms340x0_device::s_pixel_write_ops[4][6] =
823758{
824   { write_pixel_1,     write_pixel_2,     write_pixel_4,     write_pixel_8,     write_pixel_16,     write_pixel_32     },
825   { write_pixel_r_1,   write_pixel_r_2,   write_pixel_r_4,   write_pixel_r_8,   write_pixel_r_16,   write_pixel_r_32   },
826   { write_pixel_t_1,   write_pixel_t_2,   write_pixel_t_4,   write_pixel_t_8,   write_pixel_t_16,   write_pixel_t_32   },
827   { write_pixel_r_t_1, write_pixel_r_t_2, write_pixel_r_t_4, write_pixel_r_t_8, write_pixel_r_t_16, write_pixel_r_t_32 }
759   { &tms340x0_device::write_pixel_1,     &tms340x0_device::write_pixel_2,     &tms340x0_device::write_pixel_4,     &tms340x0_device::write_pixel_8,     &tms340x0_device::write_pixel_16,     &tms340x0_device::write_pixel_32     },
760   { &tms340x0_device::write_pixel_r_1,   &tms340x0_device::write_pixel_r_2,   &tms340x0_device::write_pixel_r_4,   &tms340x0_device::write_pixel_r_8,   &tms340x0_device::write_pixel_r_16,   &tms340x0_device::write_pixel_r_32   },
761   { &tms340x0_device::write_pixel_t_1,   &tms340x0_device::write_pixel_t_2,   &tms340x0_device::write_pixel_t_4,   &tms340x0_device::write_pixel_t_8,   &tms340x0_device::write_pixel_t_16,   &tms340x0_device::write_pixel_t_32   },
762   { &tms340x0_device::write_pixel_r_t_1, &tms340x0_device::write_pixel_r_t_2, &tms340x0_device::write_pixel_r_t_4, &tms340x0_device::write_pixel_r_t_8, &tms340x0_device::write_pixel_r_t_16, &tms340x0_device::write_pixel_r_t_32 }
828763};
829764
830static UINT32 (*const pixel_read_ops[6])(tms34010_state *tms, offs_t offset) =
765const tms340x0_device::pixel_read_func tms340x0_device::s_pixel_read_ops[6] =
831766{
832   read_pixel_1,        read_pixel_2,      read_pixel_4,      read_pixel_8,      read_pixel_16,      read_pixel_32
767   &tms340x0_device::read_pixel_1,        &tms340x0_device::read_pixel_2,      &tms340x0_device::read_pixel_4,      &tms340x0_device::read_pixel_8,      &tms340x0_device::read_pixel_16,      &tms340x0_device::read_pixel_32
833768};
834769
835770
836static void set_pixel_function(tms34010_state *tms)
771void tms340x0_device::set_pixel_function()
837772{
838773   UINT32 i1,i2;
839774
840   if (IOREG(tms, REG_DPYCTL) & 0x0800)
775   if (IOREG(REG_DPYCTL) & 0x0800)
841776   {
842777      /* Shift Register Transfer */
843      tms->pixel_write = write_pixel_shiftreg;
844      tms->pixel_read  = read_pixel_shiftreg;
778      m_pixel_write = &tms340x0_device::write_pixel_shiftreg;
779      m_pixel_read  = &tms340x0_device::read_pixel_shiftreg;
845780      return;
846781   }
847782
848   switch (IOREG(tms, REG_PSIZE))
783   switch (IOREG(REG_PSIZE))
849784   {
850785      default:
851786      case 0x01: i2 = 0; break;
r31176r31177
856791      case 0x20: i2 = 5; break;
857792   }
858793
859   if (IOREG(tms, REG_CONTROL) & 0x20)
860      i1 = tms->raster_op ? 3 : 2;
794   if (IOREG(REG_CONTROL) & 0x20)
795      i1 = m_raster_op ? 3 : 2;
861796   else
862      i1 = tms->raster_op ? 1 : 0;
797      i1 = m_raster_op ? 1 : 0;
863798
864   tms->pixel_write = pixel_write_ops[i1][i2];
865   tms->pixel_read  = pixel_read_ops [i2];
799   m_pixel_write = s_pixel_write_ops[i1][i2];
800   m_pixel_read  = s_pixel_read_ops [i2];
866801}
867802
868803
r31176r31177
871806    RASTER OPS
872807***************************************************************************/
873808
874static UINT32 (*const raster_ops[32]) (tms34010_state *tms, UINT32 newpix, UINT32 oldpix) =
809const tms340x0_device::raster_op_func tms340x0_device::s_raster_ops[32] =
875810{
876            0, raster_op_1 , raster_op_2 , raster_op_3,
877   raster_op_4 , raster_op_5 , raster_op_6 , raster_op_7,
878   raster_op_8 , raster_op_9 , raster_op_10, raster_op_11,
879   raster_op_12, raster_op_13, raster_op_14, raster_op_15,
880   raster_op_16, raster_op_17, raster_op_18, raster_op_19,
881   raster_op_20, raster_op_21,            0,            0,
882            0,            0,            0,            0,
883            0,            0,            0,            0,
811            NULL, &tms340x0_device::raster_op_1 , &tms340x0_device::raster_op_2 , &tms340x0_device::raster_op_3,
812   &tms340x0_device::raster_op_4 , &tms340x0_device::raster_op_5 , &tms340x0_device::raster_op_6 , &tms340x0_device::raster_op_7,
813   &tms340x0_device::raster_op_8 , &tms340x0_device::raster_op_9 , &tms340x0_device::raster_op_10, &tms340x0_device::raster_op_11,
814   &tms340x0_device::raster_op_12, &tms340x0_device::raster_op_13, &tms340x0_device::raster_op_14, &tms340x0_device::raster_op_15,
815   &tms340x0_device::raster_op_16, &tms340x0_device::raster_op_17, &tms340x0_device::raster_op_18, &tms340x0_device::raster_op_19,
816   &tms340x0_device::raster_op_20, &tms340x0_device::raster_op_21,            NULL,            NULL,
817            NULL,            NULL,            NULL,            NULL,
818            NULL,            NULL,            NULL,            NULL,
884819};
885820
886821
887static void set_raster_op(tms34010_state *tms)
822void tms340x0_device::set_raster_op()
888823{
889   tms->raster_op = raster_ops[(IOREG(tms, REG_CONTROL) >> 10) & 0x1f];
824   m_raster_op = s_raster_ops[(IOREG(REG_CONTROL) >> 10) & 0x1f];
890825}
891826
892827
r31176r31177
895830    VIDEO TIMING HELPERS
896831***************************************************************************/
897832
898static TIMER_CALLBACK( scanline_callback )
833TIMER_CALLBACK_MEMBER( tms340x0_device::scanline_callback )
899834{
900   tms34010_state *tms = (tms34010_state *)ptr;
901835   int vsblnk, veblnk, vtotal;
902836   int vcount = param;
903837   int enabled;
904838   int master;
905839
906840   /* fetch the core timing parameters */
907   const rectangle &current_visarea = tms->screen->visible_area();
908   enabled = SMART_IOREG(tms, DPYCTL) & 0x8000;
909   master = (tms->is_34020 || (SMART_IOREG(tms, DPYCTL) & 0x2000));
910   vsblnk = SMART_IOREG(tms, VSBLNK);
911   veblnk = SMART_IOREG(tms, VEBLNK);
912   vtotal = SMART_IOREG(tms, VTOTAL);
841   const rectangle &current_visarea = m_screen->visible_area();
842   enabled = SMART_IOREG(DPYCTL) & 0x8000;
843   master = (m_is_34020 || (SMART_IOREG(DPYCTL) & 0x2000));
844   vsblnk = SMART_IOREG(VSBLNK);
845   veblnk = SMART_IOREG(VEBLNK);
846   vtotal = SMART_IOREG(VTOTAL);
913847   if (!master)
914848   {
915      vtotal = MIN(tms->screen->height() - 1, vtotal);
916      vcount = tms->screen->vpos();
849      vtotal = MIN(m_screen->height() - 1, vtotal);
850      vcount = m_screen->vpos();
917851   }
918852
919853   /* update the VCOUNT */
920   SMART_IOREG(tms, VCOUNT) = vcount;
854   SMART_IOREG(VCOUNT) = vcount;
921855
922856   /* if we match the display interrupt scanline, signal an interrupt */
923   if (enabled && vcount == SMART_IOREG(tms, DPYINT))
857   if (enabled && vcount == SMART_IOREG(DPYINT))
924858   {
925859      /* generate the display interrupt signal */
926      internal_interrupt_callback(machine, tms, TMS34010_DI);
860      internal_interrupt_callback(NULL, TMS34010_DI);
927861   }
928862
929863   /* at the start of VBLANK, load the starting display address */
930864   if (vcount == vsblnk)
931865   {
932866      /* 34010 loads DPYADR with DPYSTRT, and inverts if the origin is 0 */
933      if (!tms->is_34020)
867      if (!m_is_34020)
934868      {
935         IOREG(tms, REG_DPYADR) = IOREG(tms, REG_DPYSTRT);
936         LOG(("Start of VBLANK, DPYADR = %04X\n", IOREG(tms, REG_DPYADR)));
869         IOREG(REG_DPYADR) = IOREG(REG_DPYSTRT);
870         LOG(("Start of VBLANK, DPYADR = %04X\n", IOREG(REG_DPYADR)));
937871      }
938872
939873      /* 34020 loads DPYNXx with DPYSTx */
940874      else
941875      {
942         IOREG(tms, REG020_DPYNXL) = IOREG(tms, REG020_DPYSTL) & 0xffe0;
943         IOREG(tms, REG020_DPYNXH) = IOREG(tms, REG020_DPYSTH);
876         IOREG(REG020_DPYNXL) = IOREG(REG020_DPYSTL) & 0xffe0;
877         IOREG(REG020_DPYNXH) = IOREG(REG020_DPYSTH);
944878      }
945879   }
946880
r31176r31177
949883   {
950884      /* only do this if we have an incoming pixel clock */
951885      /* also, only do it if the HEBLNK/HSBLNK values are stable */
952      if (master && (tms->config->scanline_callback_ind16 != NULL || tms->config->scanline_callback_rgb32 != NULL))
886      if (master && (m_config->scanline_callback_ind16 != NULL || m_config->scanline_callback_rgb32 != NULL))
953887      {
954         int htotal = SMART_IOREG(tms, HTOTAL);
888         int htotal = SMART_IOREG(HTOTAL);
955889         if (htotal > 0 && vtotal > 0)
956890         {
957            attoseconds_t refresh = HZ_TO_ATTOSECONDS(tms->config->pixclock) * (htotal + 1) * (vtotal + 1);
958            int width = (htotal + 1) * tms->config->pixperclock;
891            attoseconds_t refresh = HZ_TO_ATTOSECONDS(m_config->pixclock) * (htotal + 1) * (vtotal + 1);
892            int width = (htotal + 1) * m_config->pixperclock;
959893            int height = vtotal + 1;
960894            rectangle visarea;
961895
962896            /* extract the visible area */
963            visarea.min_x = SMART_IOREG(tms, HEBLNK) * tms->config->pixperclock;
964            visarea.max_x = SMART_IOREG(tms, HSBLNK) * tms->config->pixperclock - 1;
897            visarea.min_x = SMART_IOREG(HEBLNK) * m_config->pixperclock;
898            visarea.max_x = SMART_IOREG(HSBLNK) * m_config->pixperclock - 1;
965899            visarea.min_y = veblnk;
966900            visarea.max_y = vsblnk - 1;
967901
r31176r31177
971905               /* because many games play with the HEBLNK/HSBLNK for effects, we don't change
972906                  if they are the only thing that has changed, unless they are stable for a couple
973907                  of frames */
974               int current_width  = tms->screen->width();
975               int current_height = tms->screen->height();
908               int current_width  = m_screen->width();
909               int current_height = m_screen->height();
976910
977911               if (width != current_width || height != current_height || visarea.min_y != current_visarea.min_y || visarea.max_y != current_visarea.max_y ||
978                  (tms->hblank_stable > 2 && (visarea.min_x != current_visarea.min_x || visarea.max_x != current_visarea.max_x)))
912                  (m_hblank_stable > 2 && (visarea.min_x != current_visarea.min_x || visarea.max_x != current_visarea.max_x)))
979913               {
980                  tms->screen->configure(width, height, visarea, refresh);
914                  m_screen->configure(width, height, visarea, refresh);
981915               }
982               tms->hblank_stable++;
916               m_hblank_stable++;
983917            }
984918
985919            LOG(("Configuring screen: HTOTAL=%3d BLANK=%3d-%3d VTOTAL=%3d BLANK=%3d-%3d refresh=%f\n",
986                  htotal, SMART_IOREG(tms, HEBLNK), SMART_IOREG(tms, HSBLNK), vtotal, veblnk, vsblnk, ATTOSECONDS_TO_HZ(refresh)));
920                  htotal, SMART_IOREG(HEBLNK), SMART_IOREG(HSBLNK), vtotal, veblnk, vsblnk, ATTOSECONDS_TO_HZ(refresh)));
987921
988922            /* interlaced timing not supported */
989            if ((SMART_IOREG(tms, DPYCTL) & 0x4000) == 0)
923            if ((SMART_IOREG(DPYCTL) & 0x4000) == 0)
990924               fatalerror("Interlaced video configured on the TMS34010 (unsupported)\n");
991925         }
992926      }
993927   }
994928
995929   /* force a partial update within the visible area */
996   if (vcount >= current_visarea.min_y && vcount <= current_visarea.max_y && (tms->config->scanline_callback_ind16 != NULL || tms->config->scanline_callback_rgb32 != NULL))
997      tms->screen->update_partial(vcount);
930   if (vcount >= current_visarea.min_y && vcount <= current_visarea.max_y && (m_config->scanline_callback_ind16 != NULL || m_config->scanline_callback_rgb32 != NULL))
931      m_screen->update_partial(vcount);
998932
999933   /* if we are in the visible area, increment DPYADR by DUDATE */
1000934   if (vcount >= veblnk && vcount < vsblnk)
1001935   {
1002936      /* 34010 increments by the DUDATE field in DPYCTL */
1003      if (!tms->is_34020)
937      if (!m_is_34020)
1004938      {
1005         UINT16 dpyadr = IOREG(tms, REG_DPYADR);
939         UINT16 dpyadr = IOREG(REG_DPYADR);
1006940         if ((dpyadr & 3) == 0)
1007            dpyadr = ((dpyadr & 0xfffc) - (IOREG(tms, REG_DPYCTL) & 0x03fc)) | (IOREG(tms, REG_DPYSTRT) & 0x0003);
941            dpyadr = ((dpyadr & 0xfffc) - (IOREG(REG_DPYCTL) & 0x03fc)) | (IOREG(REG_DPYSTRT) & 0x0003);
1008942         else
1009943            dpyadr = (dpyadr & 0xfffc) | ((dpyadr - 1) & 3);
1010         IOREG(tms, REG_DPYADR) = dpyadr;
944         IOREG(REG_DPYADR) = dpyadr;
1011945      }
1012946
1013947      /* 34020 updates based on the DINC register, including zoom */
1014948      else
1015949      {
1016         UINT32 dpynx = IOREG(tms, REG020_DPYNXL) | (IOREG(tms, REG020_DPYNXH) << 16);
1017         UINT32 dinc = IOREG(tms, REG020_DINCL) | (IOREG(tms, REG020_DINCH) << 16);
950         UINT32 dpynx = IOREG(REG020_DPYNXL) | (IOREG(REG020_DPYNXH) << 16);
951         UINT32 dinc = IOREG(REG020_DINCL) | (IOREG(REG020_DINCH) << 16);
1018952         dpynx = (dpynx & 0xffffffe0) | ((dpynx + dinc) & 0x1f);
1019953         if ((dpynx & 0x1f) == 0)
1020954            dpynx += dinc & 0xffffffe0;
1021         IOREG(tms, REG020_DPYNXL) = dpynx;
1022         IOREG(tms, REG020_DPYNXH) = dpynx >> 16;
955         IOREG(REG020_DPYNXL) = dpynx;
956         IOREG(REG020_DPYNXH) = dpynx >> 16;
1023957      }
1024958   }
1025959
r31176r31177
1030964
1031965   /* note that we add !master (0 or 1) as a attoseconds value; this makes no practical difference */
1032966   /* but helps ensure that masters are updated first before slaves */
1033   tms->scantimer->adjust(tms->screen->time_until_pos(vcount) + attotime(0, !master), vcount);
967   m_scantimer->adjust(m_screen->time_until_pos(vcount) + attotime(0, !master), vcount);
1034968}
1035969
1036970
1037void tms34010_get_display_params(device_t *cpu, tms34010_display_params *params)
971void tms340x0_device::get_display_params(tms34010_display_params *params)
1038972{
1039   tms34010_state *tms = get_safe_token(cpu);
973   params->enabled = ((SMART_IOREG(DPYCTL) & 0x8000) != 0);
974   params->vcount = SMART_IOREG(VCOUNT);
975   params->veblnk = SMART_IOREG(VEBLNK);
976   params->vsblnk = SMART_IOREG(VSBLNK);
977   params->heblnk = SMART_IOREG(HEBLNK) * m_config->pixperclock;
978   params->hsblnk = SMART_IOREG(HSBLNK) * m_config->pixperclock;
1040979
1041   params->enabled = ((SMART_IOREG(tms, DPYCTL) & 0x8000) != 0);
1042   params->vcount = SMART_IOREG(tms, VCOUNT);
1043   params->veblnk = SMART_IOREG(tms, VEBLNK);
1044   params->vsblnk = SMART_IOREG(tms, VSBLNK);
1045   params->heblnk = SMART_IOREG(tms, HEBLNK) * tms->config->pixperclock;
1046   params->hsblnk = SMART_IOREG(tms, HSBLNK) * tms->config->pixperclock;
1047
1048980   /* 34010 gets its address from DPYADR and DPYTAP */
1049   if (!tms->is_34020)
981   if (!m_is_34020)
1050982   {
1051      UINT16 dpyadr = IOREG(tms, REG_DPYADR);
1052      if (!(IOREG(tms, REG_DPYCTL) & 0x0400))
983      UINT16 dpyadr = IOREG(REG_DPYADR);
984      if (!(IOREG(REG_DPYCTL) & 0x0400))
1053985         dpyadr ^= 0xfffc;
1054986      params->rowaddr = dpyadr >> 4;
1055      params->coladdr = ((dpyadr & 0x007c) << 4) | (IOREG(tms, REG_DPYTAP) & 0x3fff);
1056      params->yoffset = (IOREG(tms, REG_DPYSTRT) - IOREG(tms, REG_DPYADR)) & 3;
987      params->coladdr = ((dpyadr & 0x007c) << 4) | (IOREG(REG_DPYTAP) & 0x3fff);
988      params->yoffset = (IOREG(REG_DPYSTRT) - IOREG(REG_DPYADR)) & 3;
1057989   }
1058990
1059991   /* 34020 gets its address from DPYNX */
1060992   else
1061993   {
1062      params->rowaddr = IOREG(tms, REG020_DPYNXH);
1063      params->coladdr = IOREG(tms, REG020_DPYNXL) & 0xffe0;
994      params->rowaddr = IOREG(REG020_DPYNXH);
995      params->coladdr = IOREG(REG020_DPYNXL) & 0xffe0;
1064996      params->yoffset = 0;
1065      if ((IOREG(tms, REG020_DINCL) & 0x1f) != 0)
1066         params->yoffset = (IOREG(tms, REG020_DPYNXL) & 0x1f) / (IOREG(tms, REG020_DINCL) & 0x1f);
997      if ((IOREG(REG020_DINCL) & 0x1f) != 0)
998         params->yoffset = (IOREG(REG020_DPYNXL) & 0x1f) / (IOREG(REG020_DINCL) & 0x1f);
1067999   }
10681000}
10691001
1070UINT32 tms34010_device::tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
1002UINT32 tms340x0_device::tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
10711003{
10721004   pen_t blackpen = screen.palette()->black_pen();
10731005   tms34010_display_params params;
1074   tms34010_state *tms = NULL;
1075   device_t *cpu;
10761006   int x;
10771007
1078   /* find the owning CPU */
1079   device_iterator iter(machine().root_device());
1080   for (cpu = iter.first(); cpu != NULL; cpu = iter.next())
1081   {
1082      device_type type = cpu->type();
1083      if (type == TMS34010 || type == TMS34020)
1084      {
1085         tms = get_safe_token(cpu);
1086         if (tms->config != NULL && tms->config->scanline_callback_ind16 != NULL && tms->screen == &screen)
1087            break;
1088         tms = NULL;
1089      }
1090   }
1091   if (tms == NULL)
1092      fatalerror("Unable to locate matching CPU for screen '%s'\n", screen.tag());
1093
10941008   /* get the display parameters for the screen */
1095   tms34010_get_display_params(tms->device, &params);
1009   get_display_params(&params);
10961010
10971011   /* if the display is enabled, call the scanline callback */
10981012   if (params.enabled)
10991013   {
11001014      /* call through to the callback */
11011015      LOG(("  Update: scan=%3d ROW=%04X COL=%04X\n", cliprect.min_y, params.rowaddr, params.coladdr));
1102      (*tms->config->scanline_callback_ind16)(screen, bitmap, cliprect.min_y, &params);
1016      (*m_config->scanline_callback_ind16)(screen, bitmap, cliprect.min_y, &params);
11031017   }
11041018
11051019   /* otherwise, just blank the current scanline */
r31176r31177
11161030
11171031}
11181032
1119UINT32 tms34010_device::tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
1033UINT32 tms340x0_device::tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
11201034{
11211035   pen_t blackpen = rgb_t::black;
11221036   tms34010_display_params params;
1123   tms34010_state *tms = NULL;
1124   device_t *cpu;
11251037   int x;
11261038
1127   /* find the owning CPU */
1128   device_iterator iter(machine().root_device());
1129   for (cpu = iter.first(); cpu != NULL; cpu = iter.next())
1130   {
1131      device_type type = cpu->type();
1132      if (type == TMS34010 || type == TMS34020)
1133      {
1134         tms = get_safe_token(cpu);
1135         if (tms->config != NULL && tms->config->scanline_callback_rgb32 != NULL && tms->screen == &screen)
1136            break;
1137         tms = NULL;
1138      }
1139   }
1140   if (tms == NULL)
1141      fatalerror("Unable to locate matching CPU for screen '%s'\n", screen.tag());
1142
11431039   /* get the display parameters for the screen */
1144   tms34010_get_display_params(tms->device, &params);
1040   get_display_params(&params);
11451041
11461042   /* if the display is enabled, call the scanline callback */
11471043   if (params.enabled)
11481044   {
11491045      /* call through to the callback */
11501046      LOG(("  Update: scan=%3d ROW=%04X COL=%04X\n", cliprect.min_y, params.rowaddr, params.coladdr));
1151      (*tms->config->scanline_callback_rgb32)(screen, bitmap, cliprect.min_y, &params);
1047      (*m_config->scanline_callback_rgb32)(screen, bitmap, cliprect.min_y, &params);
11521048   }
11531049
11541050   /* otherwise, just blank the current scanline */
r31176r31177
11861082
11871083WRITE16_MEMBER( tms34010_device::io_register_w )
11881084{
1189   tms34010_state *tms = get_safe_token(this);
11901085   int oldreg, newreg;
11911086
11921087   /* Set register */
1193   oldreg = IOREG(tms, offset);
1194   IOREG(tms, offset) = data;
1088   oldreg = IOREG(offset);
1089   IOREG(offset) = data;
11951090
11961091   switch (offset)
11971092   {
11981093      case REG_CONTROL:
1199         set_raster_op(tms);
1200         set_pixel_function(tms);
1094         set_raster_op();
1095         set_pixel_function();
12011096         break;
12021097
12031098      case REG_PSIZE:
1204         set_pixel_function(tms);
1099         set_pixel_function();
12051100
12061101         switch (data)
12071102         {
12081103            default:
1209            case 0x01: tms->pixelshift = 0; break;
1210            case 0x02: tms->pixelshift = 1; break;
1211            case 0x04: tms->pixelshift = 2; break;
1212            case 0x08: tms->pixelshift = 3; break;
1213            case 0x10: tms->pixelshift = 4; break;
1104            case 0x01: m_pixelshift = 0; break;
1105            case 0x02: m_pixelshift = 1; break;
1106            case 0x04: m_pixelshift = 2; break;
1107            case 0x08: m_pixelshift = 3; break;
1108            case 0x10: m_pixelshift = 4; break;
12141109         }
12151110         break;
12161111
r31176r31177
12191114         break;
12201115
12211116      case REG_DPYCTL:
1222         set_pixel_function(tms);
1117         set_pixel_function();
12231118         break;
12241119
12251120      case REG_HSTCTLH:
12261121         /* if the CPU is halting itself, stop execution right away */
12271122         if (mem_mask & 0xff00)
12281123         {
1229            if ((data & 0x8000) && !tms->external_host_access)
1230               tms->icount = 0;
1124            if ((data & 0x8000) && !m_external_host_access)
1125               m_icount = 0;
12311126
1232            tms->device->set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
1127            set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
12331128
12341129            /* NMI issued? */
12351130            if (data & 0x0100)
1236               tms->device->machine().scheduler().synchronize(FUNC(internal_interrupt_callback), 0, tms);
1131               machine().scheduler().synchronize(timer_expired_delegate(FUNC(tms340x0_device::internal_interrupt_callback), this), 0);
12371132         }
12381133         break;
12391134
r31176r31177
12411136         if (mem_mask & 0x00ff)
12421137         {
12431138            /* the TMS34010 can change MSGOUT, can set INTOUT, and can clear INTIN */
1244            if (!tms->external_host_access)
1139            if (!m_external_host_access)
12451140            {
12461141               newreg = (oldreg & 0xff8f) | (data & 0x0070);
12471142               newreg |= data & 0x0080;
r31176r31177
12551150               newreg &= data | ~0x0080;
12561151               newreg |= data & 0x0008;
12571152            }
1258            IOREG(tms, offset) = newreg;
1153            IOREG(offset) = newreg;
12591154
12601155            /* the TMS34010 can set output interrupt? */
12611156            if (!(oldreg & 0x0080) && (newreg & 0x0080))
12621157            {
1263               if (tms->config->output_int)
1264                  (*tms->config->output_int)(&space.device(), 1);
1158               if (m_config->output_int)
1159                  (*m_config->output_int)(&space.device(), 1);
12651160            }
12661161            else if ((oldreg & 0x0080) && !(newreg & 0x0080))
12671162            {
1268               if (tms->config->output_int)
1269                  (*tms->config->output_int)(&space.device(), 0);
1163               if (m_config->output_int)
1164                  (*m_config->output_int)(&space.device(), 0);
12701165            }
12711166
12721167            /* input interrupt? (should really be state-based, but the functions don't exist!) */
12731168            if (!(oldreg & 0x0008) && (newreg & 0x0008))
1274               tms->device->machine().scheduler().synchronize(FUNC(internal_interrupt_callback), TMS34010_HI, tms);
1169               machine().scheduler().synchronize(timer_expired_delegate(FUNC(tms340x0_device::internal_interrupt_callback), this), TMS34010_HI);
12751170            else if ((oldreg & 0x0008) && !(newreg & 0x0008))
1276               IOREG(tms, REG_INTPEND) &= ~TMS34010_HI;
1171               IOREG(REG_INTPEND) &= ~TMS34010_HI;
12771172         }
12781173         break;
12791174
12801175      case REG_CONVSP:
1281         tms->convsp = 1 << (~data & 0x1f);
1176         m_convsp = 1 << (~data & 0x1f);
12821177         break;
12831178
12841179      case REG_CONVDP:
1285         tms->convdp = 1 << (~data & 0x1f);
1180         m_convdp = 1 << (~data & 0x1f);
12861181         break;
12871182
12881183      case REG_INTENB:
1289         check_interrupt(tms);
1184         check_interrupt();
12901185         break;
12911186
12921187      case REG_INTPEND:
12931188         /* X1P, X2P and HIP are read-only */
12941189         /* WVP and DIP can only have 0's written to them */
1295         IOREG(tms, REG_INTPEND) = oldreg;
1190         IOREG(REG_INTPEND) = oldreg;
12961191         if (!(data & TMS34010_WV))
1297            IOREG(tms, REG_INTPEND) &= ~TMS34010_WV;
1192            IOREG(REG_INTPEND) &= ~TMS34010_WV;
12981193         if (!(data & TMS34010_DI))
1299            IOREG(tms, REG_INTPEND) &= ~TMS34010_DI;
1194            IOREG(REG_INTPEND) &= ~TMS34010_DI;
13001195         break;
13011196
13021197      case REG_HEBLNK:
13031198      case REG_HSBLNK:
13041199         if (oldreg != data)
1305            tms->hblank_stable = 0;
1200            m_hblank_stable = 0;
13061201         break;
13071202   }
13081203
13091204//  if (LOG_CONTROL_REGS)
1310//      logerror("%s: %s = %04X (%d)\n", tms->device->machine().describe_context(), ioreg_name[offset], IOREG(tms, offset), tms->screen.vpos());
1205//      logerror("%s: %s = %04X (%d)\n", machine().describe_context(), ioreg_name[offset], IOREG(offset), m_screen.vpos());
13111206}
13121207
13131208
r31176r31177
13381233
13391234WRITE16_MEMBER( tms34020_device::io_register_w )
13401235{
1341   tms34010_state *tms = get_safe_token(this);
13421236   int oldreg, newreg;
13431237
13441238   /* Set register */
1345   oldreg = IOREG(tms, offset);
1346   IOREG(tms, offset) = data;
1239   oldreg = IOREG(offset);
1240   IOREG(offset) = data;
13471241
13481242//  if (LOG_CONTROL_REGS)
1349//      logerror("%s: %s = %04X (%d)\n", device->machine().describe_context(), ioreg020_name[offset], IOREG(tms, offset), tms->screen.vpos());
1243//      logerror("%s: %s = %04X (%d)\n", machine().describe_context(), ioreg020_name[offset], IOREG(offset), m_screen.vpos());
13501244
13511245   switch (offset)
13521246   {
13531247      case REG020_CONTROL:
13541248      case REG020_CONTROL2:
1355         IOREG(tms, REG020_CONTROL) = data;
1356         IOREG(tms, REG020_CONTROL2) = data;
1357         set_raster_op(tms);
1358         set_pixel_function(tms);
1249         IOREG(REG020_CONTROL) = data;
1250         IOREG(REG020_CONTROL2) = data;
1251         set_raster_op();
1252         set_pixel_function();
13591253         break;
13601254
13611255      case REG020_PSIZE:
1362         set_pixel_function(tms);
1256         set_pixel_function();
13631257
13641258         switch (data)
13651259         {
13661260            default:
1367            case 0x01: tms->pixelshift = 0; break;
1368            case 0x02: tms->pixelshift = 1; break;
1369            case 0x04: tms->pixelshift = 2; break;
1370            case 0x08: tms->pixelshift = 3; break;
1371            case 0x10: tms->pixelshift = 4; break;
1372            case 0x20: tms->pixelshift = 5; break;
1261            case 0x01: m_pixelshift = 0; break;
1262            case 0x02: m_pixelshift = 1; break;
1263            case 0x04: m_pixelshift = 2; break;
1264            case 0x08: m_pixelshift = 3; break;
1265            case 0x10: m_pixelshift = 4; break;
1266            case 0x20: m_pixelshift = 5; break;
13731267         }
13741268         break;
13751269
r31176r31177
13791273         break;
13801274
13811275      case REG020_DPYCTL:
1382         set_pixel_function(tms);
1276         set_pixel_function();
13831277         break;
13841278
13851279      case REG020_HSTCTLH:
13861280         /* if the CPU is halting itself, stop execution right away */
1387         if ((data & 0x8000) && !tms->external_host_access)
1388            tms->icount = 0;
1389         tms->device->set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
1281         if ((data & 0x8000) && !m_external_host_access)
1282            m_icount = 0;
1283         set_input_line(INPUT_LINE_HALT, (data & 0x8000) ? ASSERT_LINE : CLEAR_LINE);
13901284
13911285         /* NMI issued? */
13921286         if (data & 0x0100)
1393            tms->device->machine().scheduler().synchronize(FUNC(internal_interrupt_callback), 0, tms);
1287            machine().scheduler().synchronize(timer_expired_delegate(FUNC(tms340x0_device::internal_interrupt_callback), this), 0);
13941288         break;
13951289
13961290      case REG020_HSTCTLL:
13971291         /* the TMS34010 can change MSGOUT, can set INTOUT, and can clear INTIN */
1398         if (!tms->external_host_access)
1292         if (!m_external_host_access)
13991293         {
14001294            newreg = (oldreg & 0xff8f) | (data & 0x0070);
14011295            newreg |= data & 0x0080;
r31176r31177
14091303            newreg &= data | ~0x0080;
14101304            newreg |= data & 0x0008;
14111305         }
1412         IOREG(tms, offset) = newreg;
1306         IOREG(offset) = newreg;
14131307
14141308         /* the TMS34010 can set output interrupt? */
14151309         if (!(oldreg & 0x0080) && (newreg & 0x0080))
14161310         {
1417            if (tms->config->output_int)
1418               (*tms->config->output_int)(&space.device(), 1);
1311            if (m_config->output_int)
1312               (*m_config->output_int)(&space.device(), 1);
14191313         }
14201314         else if ((oldreg & 0x0080) && !(newreg & 0x0080))
14211315         {
1422            if (tms->config->output_int)
1423               (*tms->config->output_int)(&space.device(), 0);
1316            if (m_config->output_int)
1317               (*m_config->output_int)(&space.device(), 0);
14241318         }
14251319
14261320         /* input interrupt? (should really be state-based, but the functions don't exist!) */
14271321         if (!(oldreg & 0x0008) && (newreg & 0x0008))
1428            tms->device->machine().scheduler().synchronize(FUNC(internal_interrupt_callback), TMS34010_HI, tms);
1322            machine().scheduler().synchronize(timer_expired_delegate(FUNC(tms340x0_device::internal_interrupt_callback), this), TMS34010_HI);
14291323         else if ((oldreg & 0x0008) && !(newreg & 0x0008))
1430            IOREG(tms, REG020_INTPEND) &= ~TMS34010_HI;
1324            IOREG(REG020_INTPEND) &= ~TMS34010_HI;
14311325         break;
14321326
14331327      case REG020_INTENB:
1434         check_interrupt(tms);
1328         check_interrupt();
14351329         break;
14361330
14371331      case REG020_INTPEND:
14381332         /* X1P, X2P and HIP are read-only */
14391333         /* WVP and DIP can only have 0's written to them */
1440         IOREG(tms, REG020_INTPEND) = oldreg;
1334         IOREG(REG020_INTPEND) = oldreg;
14411335         if (!(data & TMS34010_WV))
1442            IOREG(tms, REG020_INTPEND) &= ~TMS34010_WV;
1336            IOREG(REG020_INTPEND) &= ~TMS34010_WV;
14431337         if (!(data & TMS34010_DI))
1444            IOREG(tms, REG020_INTPEND) &= ~TMS34010_DI;
1338            IOREG(REG020_INTPEND) &= ~TMS34010_DI;
14451339         break;
14461340
14471341      case REG020_CONVSP:
14481342         if (data & 0x001f)
14491343         {
14501344            if (data & 0x1f00)
1451               tms->convsp = (1 << (~data & 0x1f)) + (1 << (~(data >> 8) & 0x1f));
1345               m_convsp = (1 << (~data & 0x1f)) + (1 << (~(data >> 8) & 0x1f));
14521346            else
1453               tms->convsp = 1 << (~data & 0x1f);
1347               m_convsp = 1 << (~data & 0x1f);
14541348         }
14551349         else
1456            tms->convsp = data;
1350            m_convsp = data;
14571351         break;
14581352
14591353      case REG020_CONVDP:
14601354         if (data & 0x001f)
14611355         {
14621356            if (data & 0x1f00)
1463               tms->convdp = (1 << (~data & 0x1f)) + (1 << (~(data >> 8) & 0x1f));
1357               m_convdp = (1 << (~data & 0x1f)) + (1 << (~(data >> 8) & 0x1f));
14641358            else
1465               tms->convdp = 1 << (~data & 0x1f);
1359               m_convdp = 1 << (~data & 0x1f);
14661360         }
14671361         else
1468            tms->convdp = data;
1362            m_convdp = data;
14691363         break;
14701364
14711365      case REG020_CONVMP:
14721366         if (data & 0x001f)
14731367         {
14741368            if (data & 0x1f00)
1475               tms->convmp = (1 << (~data & 0x1f)) + (1 << (~(data >> 8) & 0x1f));
1369               m_convmp = (1 << (~data & 0x1f)) + (1 << (~(data >> 8) & 0x1f));
14761370            else
1477               tms->convmp = 1 << (~data & 0x1f);
1371               m_convmp = 1 << (~data & 0x1f);
14781372         }
14791373         else
1480            tms->convmp = data;
1374            m_convmp = data;
14811375         break;
14821376
14831377      case REG020_DPYSTRT:
r31176r31177
14881382      case REG020_HEBLNK:
14891383      case REG020_HSBLNK:
14901384         if (oldreg != data)
1491            tms->hblank_stable = 0;
1385            m_hblank_stable = 0;
14921386         break;
14931387   }
14941388}
r31176r31177
15011395
15021396READ16_MEMBER( tms34010_device::io_register_r )
15031397{
1504   tms34010_state *tms = get_safe_token(this);
15051398   int result, total;
15061399
15071400//  if (LOG_CONTROL_REGS)
1508//      logerror("%s: read %s\n", device->machine().describe_context(), ioreg_name[offset]);
1401//      logerror("%s: read %s\n", machine().describe_context(), ioreg_name[offset]);
15091402
15101403   switch (offset)
15111404   {
15121405      case REG_HCOUNT:
15131406         /* scale the horizontal position from screen width to HTOTAL */
1514         result = tms->screen->hpos();
1515         total = IOREG(tms, REG_HTOTAL) + 1;
1516         result = result * total / tms->screen->width();
1407         result = m_screen->hpos();
1408         total = IOREG(REG_HTOTAL) + 1;
1409         result = result * total / m_screen->width();
15171410
15181411         /* offset by the HBLANK end */
1519         result += IOREG(tms, REG_HEBLNK);
1412         result += IOREG(REG_HEBLNK);
15201413
15211414         /* wrap around */
15221415         if (result > total)
r31176r31177
15241417         return result;
15251418
15261419      case REG_REFCNT:
1527         return (tms->device->total_cycles() / 16) & 0xfffc;
1420         return (total_cycles() / 16) & 0xfffc;
15281421
15291422      case REG_INTPEND:
1530         result = IOREG(tms, offset);
1423         result = IOREG(offset);
15311424
15321425         /* Cool Pool loops in mainline code on the appearance of the DI, even though they */
15331426         /* have an IRQ handler. For this reason, we return it signalled a bit early in order */
15341427         /* to make it past these loops. */
1535         if (SMART_IOREG(tms, VCOUNT) + 1 == SMART_IOREG(tms, DPYINT) &&
1536            tms->scantimer->remaining() < attotime::from_hz(40000000/8/3))
1428         if (SMART_IOREG(VCOUNT) + 1 == SMART_IOREG(DPYINT) &&
1429            m_scantimer->remaining() < attotime::from_hz(40000000/8/3))
15371430            result |= TMS34010_DI;
15381431         return result;
15391432   }
15401433
1541   return IOREG(tms, offset);
1434   return IOREG(offset);
15421435}
15431436
15441437
15451438READ16_MEMBER( tms34020_device::io_register_r )
15461439{
1547   tms34010_state *tms = get_safe_token(this);
15481440   int result, total;
15491441
15501442//  if (LOG_CONTROL_REGS)
1551//      logerror("%s: read %s\n", device->machine().describe_context(), ioreg_name[offset]);
1443//      logerror("%s: read %s\n", machine().describe_context(), ioreg_name[offset]);
15521444
15531445   switch (offset)
15541446   {
15551447      case REG020_HCOUNT:
15561448         /* scale the horizontal position from screen width to HTOTAL */
1557         result = tms->screen->hpos();
1558         total = IOREG(tms, REG020_HTOTAL) + 1;
1559         result = result * total / tms->screen->width();
1449         result = m_screen->hpos();
1450         total = IOREG(REG020_HTOTAL) + 1;
1451         result = result * total / m_screen->width();
15601452
15611453         /* offset by the HBLANK end */
1562         result += IOREG(tms, REG020_HEBLNK);
1454         result += IOREG(REG020_HEBLNK);
15631455
15641456         /* wrap around */
15651457         if (result > total)
r31176r31177
15681460
15691461      case REG020_REFADR:
15701462      {
1571         int refreshrate = (IOREG(tms, REG020_CONFIG) >> 8) & 7;
1463         int refreshrate = (IOREG(REG020_CONFIG) >> 8) & 7;
15721464         if (refreshrate < 6)
1573            return (tms->device->total_cycles() / refreshrate) & 0xffff;
1465            return (total_cycles() / refreshrate) & 0xffff;
15741466         break;
15751467      }
15761468   }
15771469
1578   return IOREG(tms, offset);
1470   return IOREG(offset);
15791471}
15801472
15811473
r31176r31177
15841476    SAVE STATE
15851477***************************************************************************/
15861478
1587static void tms34010_state_postload(tms34010_state *tms)
1479void tms340x0_device::tms34010_state_postload()
15881480{
1589   set_raster_op(tms);
1590   set_pixel_function(tms);
1481   set_raster_op();
1482   set_pixel_function();
15911483}
15921484
15931485
r31176r31177
15951487    HOST INTERFACE WRITES
15961488***************************************************************************/
15971489
1598WRITE16_MEMBER( tms34010_device::host_w )
1490WRITE16_MEMBER( tms340x0_device::host_w )
15991491{
16001492   int reg = offset;
1601   tms34010_state *tms = get_safe_token(this);
16021493   unsigned int addr;
16031494
16041495   switch (reg)
16051496   {
16061497      /* upper 16 bits of the address */
16071498      case TMS34010_HOST_ADDRESS_H:
1608         IOREG(tms, REG_HSTADRH) = data;
1499         IOREG(REG_HSTADRH) = data;
16091500         break;
16101501
16111502      /* lower 16 bits of the address */
16121503      case TMS34010_HOST_ADDRESS_L:
1613         IOREG(tms, REG_HSTADRL) = data;
1504         IOREG(REG_HSTADRL) = data;
16141505         break;
16151506
16161507      /* actual data */
16171508      case TMS34010_HOST_DATA:
16181509
16191510         /* write to the address */
1620         addr = (IOREG(tms, REG_HSTADRH) << 16) | IOREG(tms, REG_HSTADRL);
1621         TMS34010_WRMEM_WORD(tms, TOBYTE(addr & 0xfffffff0), data);
1511         addr = (IOREG(REG_HSTADRH) << 16) | IOREG(REG_HSTADRL);
1512         TMS34010_WRMEM_WORD(TOBYTE(addr & 0xfffffff0), data);
16221513
16231514         /* optional postincrement */
1624         if (IOREG(tms, REG_HSTCTLH) & 0x0800)
1515         if (IOREG(REG_HSTCTLH) & 0x0800)
16251516         {
16261517            addr += 0x10;
1627            IOREG(tms, REG_HSTADRH) = addr >> 16;
1628            IOREG(tms, REG_HSTADRL) = (UINT16)addr;
1518            IOREG(REG_HSTADRH) = addr >> 16;
1519            IOREG(REG_HSTADRL) = (UINT16)addr;
16291520         }
16301521         break;
16311522
16321523      /* control register */
16331524      case TMS34010_HOST_CONTROL:
16341525      {
1635         tms->external_host_access = TRUE;
1636         address_space &space = tms->device->space(AS_PROGRAM);
1637         if (mem_mask&0xff00) io_register_w(space, REG_HSTCTLH, data & 0xff00, 0xff00);
1638         if (mem_mask&0x00ff) io_register_w(space, REG_HSTCTLL, data & 0x00ff, 0x00ff);
1639         tms->external_host_access = FALSE;
1526         m_external_host_access = TRUE;
1527         if (mem_mask&0xff00) io_register_w(*m_program, REG_HSTCTLH, data & 0xff00, 0xff00);
1528         if (mem_mask&0x00ff) io_register_w(*m_program, REG_HSTCTLL, data & 0x00ff, 0x00ff);
1529         m_external_host_access = FALSE;
16401530         break;
16411531      }
16421532
r31176r31177
16531543    HOST INTERFACE READS
16541544***************************************************************************/
16551545
1656READ16_MEMBER( tms34010_device::host_r )
1546READ16_MEMBER( tms340x0_device::host_r )
16571547{
16581548   int reg = offset;
1659   tms34010_state *tms = get_safe_token(this);
16601549   unsigned int addr;
16611550   int result = 0;
16621551
r31176r31177
16661555   {
16671556      /* upper 16 bits of the address */
16681557      case TMS34010_HOST_ADDRESS_H:
1669         result = IOREG(tms, REG_HSTADRH);
1558         result = IOREG(REG_HSTADRH);
16701559         break;
16711560
16721561      /* lower 16 bits of the address */
16731562      case TMS34010_HOST_ADDRESS_L:
1674         result = IOREG(tms, REG_HSTADRL);
1563         result = IOREG(REG_HSTADRL);
16751564         break;
16761565
16771566      /* actual data */
16781567      case TMS34010_HOST_DATA:
16791568
16801569         /* read from the address */
1681         addr = (IOREG(tms, REG_HSTADRH) << 16) | IOREG(tms, REG_HSTADRL);
1682         result = TMS34010_RDMEM_WORD(tms, TOBYTE(addr & 0xfffffff0));
1570         addr = (IOREG(REG_HSTADRH) << 16) | IOREG(REG_HSTADRL);
1571         result = TMS34010_RDMEM_WORD(TOBYTE(addr & 0xfffffff0));
16831572
16841573         /* optional postincrement (it says preincrement, but data is preloaded, so it
16851574            is effectively a postincrement */
1686         if (IOREG(tms, REG_HSTCTLH) & 0x1000)
1575         if (IOREG(REG_HSTCTLH) & 0x1000)
16871576         {
16881577            addr += 0x10;
1689            IOREG(tms, REG_HSTADRH) = addr >> 16;
1690            IOREG(tms, REG_HSTADRL) = (UINT16)addr;
1578            IOREG(REG_HSTADRH) = addr >> 16;
1579            IOREG(REG_HSTADRL) = (UINT16)addr;
16911580         }
16921581         break;
16931582
16941583      /* control register */
16951584      case TMS34010_HOST_CONTROL:
1696         result = (IOREG(tms, REG_HSTCTLH) & 0xff00) | (IOREG(tms, REG_HSTCTLL) & 0x00ff);
1585         result = (IOREG(REG_HSTCTLH) & 0xff00) | (IOREG(REG_HSTCTLL) & 0x00ff);
16971586         break;
16981587
16991588      /* error case */
r31176r31177
17061595}
17071596
17081597
1709
1710/**************************************************************************
1711 * Generic set_info
1712 **************************************************************************/
1713
1714static CPU_SET_INFO( tms34010 )
1598void tms340x0_device::state_string_export(const device_state_entry &entry, astring &string)
17151599{
1716   tms34010_state *tms = get_safe_token(device);
1717
1718   switch (state)
1719   {
1720      /* --- the following bits of info are set as 64-bit signed integers --- */
1721      case CPUINFO_INT_INPUT_STATE + 0:               set_irq_line(tms, 0, info->i);      break;
1722      case CPUINFO_INT_INPUT_STATE + 1:               set_irq_line(tms, 1, info->i);      break;
1723   }
1724}
1725
1726
1727
1728/**************************************************************************
1729 * Generic get_info
1730 **************************************************************************/
1731
1732CPU_EXPORT_STRING( tms34010 )
1733{
1734   tms34010_state *tms = get_safe_token(device);
1735
17361600   switch (entry.index())
17371601   {
17381602      case STATE_GENFLAGS:
17391603         string.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
1740            tms->st & 0x80000000 ? 'N':'.',
1741            tms->st & 0x40000000 ? 'C':'.',
1742            tms->st & 0x20000000 ? 'Z':'.',
1743            tms->st & 0x10000000 ? 'V':'.',
1744            tms->st & 0x02000000 ? 'P':'.',
1745            tms->st & 0x00200000 ? 'I':'.',
1746            tms->st & 0x00000800 ? 'E':'.',
1747            tms->st & 0x00000400 ? 'F':'.',
1748            tms->st & 0x00000200 ? 'F':'.',
1749            tms->st & 0x00000100 ? 'F':'.',
1750            tms->st & 0x00000080 ? 'F':'.',
1751            tms->st & 0x00000040 ? 'F':'.',
1752            tms->st & 0x00000020 ? 'E':'.',
1753            tms->st & 0x00000010 ? 'F':'.',
1754            tms->st & 0x00000008 ? 'F':'.',
1755            tms->st & 0x00000004 ? 'F':'.',
1756            tms->st & 0x00000002 ? 'F':'.',
1757            tms->st & 0x00000001 ? 'F':'.');
1604            m_st & 0x80000000 ? 'N':'.',
1605            m_st & 0x40000000 ? 'C':'.',
1606            m_st & 0x20000000 ? 'Z':'.',
1607            m_st & 0x10000000 ? 'V':'.',
1608            m_st & 0x02000000 ? 'P':'.',
1609            m_st & 0x00200000 ? 'I':'.',
1610            m_st & 0x00000800 ? 'E':'.',
1611            m_st & 0x00000400 ? 'F':'.',
1612            m_st & 0x00000200 ? 'F':'.',
1613            m_st & 0x00000100 ? 'F':'.',
1614            m_st & 0x00000080 ? 'F':'.',
1615            m_st & 0x00000040 ? 'F':'.',
1616            m_st & 0x00000020 ? 'E':'.',
1617            m_st & 0x00000010 ? 'F':'.',
1618            m_st & 0x00000008 ? 'F':'.',
1619            m_st & 0x00000004 ? 'F':'.',
1620            m_st & 0x00000002 ? 'F':'.',
1621            m_st & 0x00000001 ? 'F':'.');
17581622         break;
17591623   }
17601624}
17611625
1762CPU_GET_INFO( tms34010 )
1763{
1764   tms34010_state *tms = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
17651626
1766   switch (state)
1767   {
1768      /* --- the following bits of info are returned as 64-bit signed integers --- */
1769      case CPUINFO_INT_CONTEXT_SIZE:                  info->i = sizeof(tms34010_state);   break;
1770      case CPUINFO_INT_INPUT_LINES:                   info->i = 2;                        break;
1771      case CPUINFO_INT_DEFAULT_IRQ_VECTOR:            info->i = 0;                        break;
1772      case CPUINFO_INT_ENDIANNESS:                    info->i = ENDIANNESS_LITTLE;        break;
1773      case CPUINFO_INT_CLOCK_MULTIPLIER:              info->i = 1;                        break;
1774      case CPUINFO_INT_CLOCK_DIVIDER:                 info->i = 8;                        break;
1775      case CPUINFO_INT_MIN_INSTRUCTION_BYTES:         info->i = 2;                        break;
1776      case CPUINFO_INT_MAX_INSTRUCTION_BYTES:         info->i = 10;                       break;
1777      case CPUINFO_INT_MIN_CYCLES:                    info->i = 1;                        break;
1778      case CPUINFO_INT_MAX_CYCLES:                    info->i = 10000;                    break;
1779
1780      case CPUINFO_INT_DATABUS_WIDTH + AS_PROGRAM:            info->i = 16;                       break;
1781      case CPUINFO_INT_ADDRBUS_WIDTH + AS_PROGRAM:        info->i = 32;                       break;
1782      case CPUINFO_INT_ADDRBUS_SHIFT + AS_PROGRAM:        info->i = 3;                        break;
1783
1784      case CPUINFO_INT_INPUT_STATE + 0:               info->i = (IOREG(tms, REG_INTPEND) & TMS34010_INT1) ? ASSERT_LINE : CLEAR_LINE; break;
1785      case CPUINFO_INT_INPUT_STATE + 1:               info->i = (IOREG(tms, REG_INTPEND) & TMS34010_INT2) ? ASSERT_LINE : CLEAR_LINE; break;
1786
1787      /* --- the following bits of info are returned as pointers to functions --- */
1788      case CPUINFO_FCT_SET_INFO:      info->setinfo = CPU_SET_INFO_NAME(tms34010);        break;
1789      case CPUINFO_FCT_INIT:          info->init = CPU_INIT_NAME(tms34010);               break;
1790      case CPUINFO_FCT_RESET:         info->reset = CPU_RESET_NAME(tms34010);             break;
1791      case CPUINFO_FCT_EXIT:          info->exit = CPU_EXIT_NAME(tms34010);               break;
1792      case CPUINFO_FCT_EXECUTE:       info->execute = CPU_EXECUTE_NAME(tms34010);         break;
1793      case CPUINFO_FCT_BURN:          info->burn = NULL;                                  break;
1794      case CPUINFO_FCT_DISASSEMBLE:   info->disassemble = CPU_DISASSEMBLE_NAME(tms34010); break;
1795      case CPUINFO_FCT_EXPORT_STRING: info->export_string = CPU_EXPORT_STRING_NAME(tms34010); break;
1796
1797      /* --- the following bits of info are returned as pointers --- */
1798      case CPUINFO_PTR_INSTRUCTION_COUNTER:           info->icount = &tms->icount;        break;
1799
1800      /* --- the following bits of info are returned as NULL-terminated strings --- */
1801      case CPUINFO_STR_NAME:                          strcpy(info->s, "TMS34010");        break;
1802      case CPUINFO_STR_SHORTNAME:                     strcpy(info->s, "tms34010");        break;
1803      case CPUINFO_STR_FAMILY:                    strcpy(info->s, "Texas Instruments 340x0"); break;
1804      case CPUINFO_STR_VERSION:                   strcpy(info->s, "1.0");             break;
1805      case CPUINFO_STR_SOURCE_FILE:                       strcpy(info->s, __FILE__);          break;
1806      case CPUINFO_STR_CREDITS:                   strcpy(info->s, "Copyright Alex Pasadyn/Zsolt Vasvari\nParts based on code by Aaron Giles"); break;
1807   }
1808}
1809
1810
1811/**************************************************************************
1812 * CPU-specific set_info
1813 **************************************************************************/
1814
1815CPU_GET_INFO( tms34020 )
1627offs_t tms34010_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
18161628{
1817   switch (state)
1818   {
1819      /* --- the following bits of info are returned as 64-bit signed integers --- */
1820      case CPUINFO_INT_CLOCK_DIVIDER:                 info->i = 4;                        break;
1629   extern CPU_DISASSEMBLE( tms34010 );
18211630
1822      /* --- the following bits of info are returned as pointers to data or functions --- */
1823      case CPUINFO_FCT_RESET:         info->reset = CPU_RESET_NAME(tms34020);             break;
1824      case CPUINFO_FCT_DISASSEMBLE:   info->disassemble = CPU_DISASSEMBLE_NAME(tms34020); break;
1825
1826      /* --- the following bits of info are returned as NULL-terminated strings --- */
1827      case CPUINFO_STR_NAME:                          strcpy(info->s, "TMS34020");        break;
1828      case CPUINFO_STR_SHORTNAME:                     strcpy(info->s, "tms34020");        break;
1829
1830      default:                                        CPU_GET_INFO_CALL(tms34010);        break;
1831   }
1631   return CPU_DISASSEMBLE_NAME(tms34010)(this, buffer, pc, oprom, opram, options);
18321632}
18331633
1834tms34010_device::tms34010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
1835   : legacy_cpu_device(mconfig, type, tag, owner, clock, CPU_GET_INFO_NAME(tms34010))
1836{
1837}
18381634
1839tms34010_device::tms34010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, cpu_get_info_func get_info)
1840   : legacy_cpu_device(mconfig, type, tag, owner, clock, get_info)
1635offs_t tms34020_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
18411636{
1842}
1637   extern CPU_DISASSEMBLE( tms34020 );
18431638
1844const device_type TMS34010 = &legacy_device_creator<tms34010_device>;
1845
1846
1847
1848tms34020_device::tms34020_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
1849   : tms34010_device(mconfig, type, tag, owner, clock, CPU_GET_INFO_NAME(tms34020))
1850{
1639   return CPU_DISASSEMBLE_NAME(tms34020)(this, buffer, pc, oprom, opram, options);
18511640}
18521641
1853const device_type TMS34020 = &legacy_device_creator<tms34020_device>;
trunk/src/emu/cpu/tms34010/34010gfx.c
r31176r31177
1111
1212
1313#define LOG_GFX_OPS 0
14#define LOGGFX(x) do { if (LOG_GFX_OPS && tms->device->machine().input().code_pressed(KEYCODE_L)) logerror x; } while (0)
14#define LOGGFX(x) do { if (LOG_GFX_OPS && machine().input().code_pressed(KEYCODE_L)) logerror x; } while (0)
1515
1616
1717/* Graphics Instructions */
1818
19static void line(tms34010_state *tms, UINT16 op)
19void tms340x0_device::line(UINT16 op)
2020{
21   if (!P_FLAG(tms))
21   if (!P_FLAG())
2222   {
23      if (WINDOW_CHECKING(tms) != 0 && WINDOW_CHECKING(tms) != 3)
24         logerror("LINE XY  %08X - Window Checking Mode %d not supported\n", tms->pc, WINDOW_CHECKING(tms));
23      if (WINDOW_CHECKING() != 0 && WINDOW_CHECKING() != 3)
24         logerror("LINE XY  %08X - Window Checking Mode %d not supported\n", m_pc, WINDOW_CHECKING());
2525
26      tms->st |= STBIT_P;
27      TEMP(tms) = (op & 0x80) ? 1 : 0;  /* boundary value depends on the algorithm */
28      LOGGFX(("%08X(%3d):LINE (%d,%d)-(%d,%d)\n", tms->pc, tms->screen->vpos(), DADDR_X(tms), DADDR_Y(tms), DADDR_X(tms) + DYDX_X(tms), DADDR_Y(tms) + DYDX_Y(tms)));
26      m_st |= STBIT_P;
27      TEMP() = (op & 0x80) ? 1 : 0;  /* boundary value depends on the algorithm */
28      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()));
2929   }
3030
31   if (COUNT(tms) > 0)
31   if (COUNT() > 0)
3232   {
3333      INT16 x1,y1;
3434
35      COUNT(tms)--;
36      if (WINDOW_CHECKING(tms) != 3 ||
37         (DADDR_X(tms) >= WSTART_X(tms) && DADDR_X(tms) <= WEND_X(tms) &&
38            DADDR_Y(tms) >= WSTART_Y(tms) && DADDR_Y(tms) <= WEND_Y(tms)))
39         WPIXEL(tms,DXYTOL(tms,DADDR_XY(tms)),COLOR1(tms));
35      COUNT()--;
36      if (WINDOW_CHECKING() != 3 ||
37         (DADDR_X() >= WSTART_X() && DADDR_X() <= WEND_X() &&
38            DADDR_Y() >= WSTART_Y() && DADDR_Y() <= WEND_Y()))
39         WPIXEL(DXYTOL(DADDR_XY()),COLOR1());
4040
41      if (SADDR(tms) >= TEMP(tms))
41      if (SADDR() >= TEMP())
4242      {
43         SADDR(tms) += DYDX_Y(tms)*2 - DYDX_X(tms)*2;
44         x1 = INC1_X(tms);
45         y1 = INC1_Y(tms);
43         SADDR() += DYDX_Y()*2 - DYDX_X()*2;
44         x1 = INC1_X();
45         y1 = INC1_Y();
4646      }
4747      else
4848      {
49         SADDR(tms) += DYDX_Y(tms)*2;
50         x1 = INC2_X(tms);
51         y1 = INC2_Y(tms);
49         SADDR() += DYDX_Y()*2;
50         x1 = INC2_X();
51         y1 = INC2_Y();
5252      }
53      DADDR_X(tms) += x1;
54      DADDR_Y(tms) += y1;
53      DADDR_X() += x1;
54      DADDR_Y() += y1;
5555
56      COUNT_UNKNOWN_CYCLES(tms,2);
57      tms->pc -= 0x10;  /* not done yet, check for interrupts and restart instruction */
56      COUNT_UNKNOWN_CYCLES(2);
57      m_pc -= 0x10;  /* not done yet, check for interrupts and restart instruction */
5858      return;
5959   }
60   tms->st &= ~STBIT_P;
60   m_st &= ~STBIT_P;
6161}
6262
6363
r31176r31177
7070* directions (left->right/right->left, top->bottom/bottom->top)
7171*/
7272
73static int apply_window(tms34010_state *tms, const char *inst_name,int srcbpp, UINT32 *srcaddr, XY *dst, int *dx, int *dy)
73int tms340x0_device::apply_window(const char *inst_name,int srcbpp, UINT32 *srcaddr, XY *dst, int *dx, int *dy)
7474{
7575   /* apply the window */
76   if (WINDOW_CHECKING(tms) == 0)
76   if (WINDOW_CHECKING() == 0)
7777      return 0;
7878   else
7979   {
r31176r31177
8383      int ey = sy + *dy - 1;
8484      int diff, cycles = 3;
8585
86      if (WINDOW_CHECKING(tms) == 2)
87         logerror("%08x: %s apply_window window mode %d not supported!\n", tms->device->pc(), inst_name, WINDOW_CHECKING(tms));
86      if (WINDOW_CHECKING() == 2)
87         logerror("%08x: %s apply_window window mode %d not supported!\n", pc(), inst_name, WINDOW_CHECKING());
8888
89      CLR_V(tms);
90      if (WINDOW_CHECKING(tms) == 1)
91         SET_V_LOG(tms, 1);
89      CLR_V();
90      if (WINDOW_CHECKING() == 1)
91         SET_V_LOG(1);
9292
9393      /* clip X */
94      diff = WSTART_X(tms) - sx;
94      diff = WSTART_X() - sx;
9595      if (diff > 0)
9696      {
9797         if (srcaddr)
9898            *srcaddr += diff * srcbpp;
9999         sx += diff;
100         SET_V_LOG(tms, 1);
100         SET_V_LOG(1);
101101      }
102      diff = ex - WEND_X(tms);
102      diff = ex - WEND_X();
103103      if (diff > 0)
104104      {
105105         ex -= diff;
106         SET_V_LOG(tms, 1);
106         SET_V_LOG(1);
107107      }
108108
109109
110110      /* clip Y */
111      diff = WSTART_Y(tms) - sy;
111      diff = WSTART_Y() - sy;
112112      if (diff > 0)
113113      {
114114         if (srcaddr)
115            *srcaddr += diff * tms->convsp;
115            *srcaddr += diff * m_convsp;
116116
117117         sy += diff;
118         SET_V_LOG(tms, 1);
118         SET_V_LOG(1);
119119      }
120      diff = ey - WEND_Y(tms);
120      diff = ey - WEND_Y();
121121      if (diff > 0)
122122      {
123123         ey -= diff;
124         SET_V_LOG(tms, 1);
124         SET_V_LOG(1);
125125      }
126126
127127      /* compute cycles */
r31176r31177
166166
167167*******************************************************************/
168168
169static int compute_fill_cycles(int left_partials, int right_partials, int full_words, int op_timing)
169int tms340x0_device::compute_fill_cycles(int left_partials, int right_partials, int full_words, int op_timing)
170170{
171171   int dstwords;
172172
r31176r31177
177177   return (dstwords * op_timing);
178178}
179179
180static int compute_pixblt_cycles(int left_partials, int right_partials, int full_words, int op_timing)
180int tms340x0_device::compute_pixblt_cycles(int left_partials, int right_partials, int full_words, int op_timing)
181181{
182182   int srcwords, dstwords;
183183
r31176r31177
189189   return (dstwords * op_timing + srcwords * 2) + 2;
190190}
191191
192static int compute_pixblt_b_cycles(int left_partials, int right_partials, int full_words, int rows, int op_timing, int bpp)
192int tms340x0_device::compute_pixblt_b_cycles(int left_partials, int right_partials, int full_words, int rows, int op_timing, int bpp)
193193{
194194   int srcwords, dstwords;
195195
r31176r31177
203203
204204
205205/* Shift register handling */
206static void memory_w(address_space &space, offs_t offset,UINT16 data)
206void tms340x0_device::memory_w(address_space &space, offs_t offset,UINT16 data)
207207{
208208   space.write_word(offset, data);
209209}
210210
211static UINT16 memory_r(address_space &space, offs_t offset)
211UINT16 tms340x0_device::memory_r(address_space &space, offs_t offset)
212212{
213213   return space.read_word(offset);
214214}
215215
216static void shiftreg_w(address_space &space, offs_t offset,UINT16 data)
216void tms340x0_device::shiftreg_w(address_space &space, offs_t offset,UINT16 data)
217217{
218   tms34010_state *tms = get_safe_token(&space.device());
219   if (tms->config->from_shiftreg)
220      (*tms->config->from_shiftreg)(space, (UINT32)(offset << 3) & ~15, &tms->shiftreg[0]);
218   if (m_config->from_shiftreg)
219      (*m_config->from_shiftreg)(space, (UINT32)(offset << 3) & ~15, &m_shiftreg[0]);
221220   else
222      logerror("From ShiftReg function not set. PC = %08X\n", tms->pc);
221      logerror("From ShiftReg function not set. PC = %08X\n", m_pc);
223222}
224223
225static UINT16 shiftreg_r(address_space &space, offs_t offset)
224UINT16 tms340x0_device::shiftreg_r(address_space &space, offs_t offset)
226225{
227   tms34010_state *tms = get_safe_token(&space.device());
228   if (tms->config->to_shiftreg)
229      (*tms->config->to_shiftreg)(space, (UINT32)(offset << 3) & ~15, &tms->shiftreg[0]);
226   if (m_config->to_shiftreg)
227      (*m_config->to_shiftreg)(space, (UINT32)(offset << 3) & ~15, &m_shiftreg[0]);
230228   else
231      logerror("To ShiftReg function not set. PC = %08X\n", tms->pc);
232   return tms->shiftreg[0];
229      logerror("To ShiftReg function not set. PC = %08X\n", m_pc);
230   return m_shiftreg[0];
233231}
234232
235static UINT16 dummy_shiftreg_r(address_space &space, offs_t offset)
233UINT16 tms340x0_device::dummy_shiftreg_r(address_space &space, offs_t offset)
236234{
237   tms34010_state *tms = get_safe_token(&space.device());
238   return tms->shiftreg[0];
235   return m_shiftreg[0];
239236}
240237
241238
242239
243240/* Pixel operations */
244static UINT32 pixel_op00(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix; }
245static UINT32 pixel_op01(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & dstpix; }
246static UINT32 pixel_op02(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & ~dstpix; }
247static UINT32 pixel_op03(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return 0; }
248static UINT32 pixel_op04(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | ~dstpix) & mask; }
249static UINT32 pixel_op05(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix ^ dstpix) & mask; }
250static UINT32 pixel_op06(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~dstpix & mask; }
251static UINT32 pixel_op07(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix | dstpix) & mask; }
252static UINT32 pixel_op08(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | dstpix) & mask; }
253static UINT32 pixel_op09(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return dstpix & mask; }
254static UINT32 pixel_op10(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix ^ dstpix) & mask; }
255static UINT32 pixel_op11(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
256static UINT32 pixel_op12(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return mask; }
257static UINT32 pixel_op13(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
258static UINT32 pixel_op14(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix & dstpix) & mask; }
259static UINT32 pixel_op15(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix ^ mask; }
260static UINT32 pixel_op16(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix + dstpix) & mask; }
261static UINT32 pixel_op17(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix + (dstpix & mask); return (tmp > mask) ? mask : tmp; }
262static UINT32 pixel_op18(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (dstpix - srcpix) & mask; }
263static UINT32 pixel_op19(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix - (dstpix & mask); return (tmp < 0) ? 0 : tmp; }
264static UINT32 pixel_op20(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix > dstpix) ? srcpix : dstpix; }
265static UINT32 pixel_op21(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix < dstpix) ? srcpix : dstpix; }
241UINT32 tms340x0_device::pixel_op00(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix; }
242UINT32 tms340x0_device::pixel_op01(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & dstpix; }
243UINT32 tms340x0_device::pixel_op02(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & ~dstpix; }
244UINT32 tms340x0_device::pixel_op03(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return 0; }
245UINT32 tms340x0_device::pixel_op04(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | ~dstpix) & mask; }
246UINT32 tms340x0_device::pixel_op05(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix ^ dstpix) & mask; }
247UINT32 tms340x0_device::pixel_op06(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~dstpix & mask; }
248UINT32 tms340x0_device::pixel_op07(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix | dstpix) & mask; }
249UINT32 tms340x0_device::pixel_op08(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | dstpix) & mask; }
250UINT32 tms340x0_device::pixel_op09(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return dstpix & mask; }
251UINT32 tms340x0_device::pixel_op10(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix ^ dstpix) & mask; }
252UINT32 tms340x0_device::pixel_op11(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
253UINT32 tms340x0_device::pixel_op12(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return mask; }
254UINT32 tms340x0_device::pixel_op13(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
255UINT32 tms340x0_device::pixel_op14(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix & dstpix) & mask; }
256UINT32 tms340x0_device::pixel_op15(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix ^ mask; }
257UINT32 tms340x0_device::pixel_op16(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix + dstpix) & mask; }
258UINT32 tms340x0_device::pixel_op17(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix + (dstpix & mask); return (tmp > mask) ? mask : tmp; }
259UINT32 tms340x0_device::pixel_op18(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (dstpix - srcpix) & mask; }
260UINT32 tms340x0_device::pixel_op19(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix - (dstpix & mask); return (tmp < 0) ? 0 : tmp; }
261UINT32 tms340x0_device::pixel_op20(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix > dstpix) ? srcpix : dstpix; }
262UINT32 tms340x0_device::pixel_op21(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix < dstpix) ? srcpix : dstpix; }
266263
267static UINT32 (*const pixel_op_table[])(UINT32, UINT32, UINT32) =
264const tms340x0_device::pixel_op_func tms340x0_device::s_pixel_op_table[32] =
268265{
269   pixel_op00, pixel_op01, pixel_op02, pixel_op03, pixel_op04, pixel_op05, pixel_op06, pixel_op07,
270   pixel_op08, pixel_op09, pixel_op10, pixel_op11, pixel_op12, pixel_op13, pixel_op14, pixel_op15,
271   pixel_op16, pixel_op17, pixel_op18, pixel_op19, pixel_op20, pixel_op21, pixel_op00, pixel_op00,
272   pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00
266   &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,
267   &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,
268   &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,
269   &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
273270};
274static const UINT8 pixel_op_timing_table[] =
271const UINT8 tms340x0_device::s_pixel_op_timing_table[33] =
275272{
276273   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
277274};
278static UINT32 (*pixel_op)(UINT32, UINT32, UINT32);
279static UINT32 pixel_op_timing;
280275
281276
282/* Blitters/fillers */
283static void pixblt_1_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
284static void pixblt_2_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
285static void pixblt_4_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
286static void pixblt_8_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
287static void pixblt_16_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
288static void pixblt_r_1_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
289static void pixblt_r_2_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
290static void pixblt_r_4_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
291static void pixblt_r_8_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
292static void pixblt_r_16_op0(tms34010_state *tms, int src_is_linear, int dst_is_linear);
293static void pixblt_b_1_op0(tms34010_state *tms, int dst_is_linear);
294static void pixblt_b_2_op0(tms34010_state *tms, int dst_is_linear);
295static void pixblt_b_4_op0(tms34010_state *tms, int dst_is_linear);
296static void pixblt_b_8_op0(tms34010_state *tms, int dst_is_linear);
297static void pixblt_b_16_op0(tms34010_state *tms, int dst_is_linear);
298static void fill_1_op0(tms34010_state *tms, int dst_is_linear);
299static void fill_2_op0(tms34010_state *tms, int dst_is_linear);
300static void fill_4_op0(tms34010_state *tms, int dst_is_linear);
301static void fill_8_op0(tms34010_state *tms, int dst_is_linear);
302static void fill_16_op0(tms34010_state *tms, int dst_is_linear);
303
304static void pixblt_1_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
305static void pixblt_2_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
306static void pixblt_4_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
307static void pixblt_8_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
308static void pixblt_16_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
309static void pixblt_r_1_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
310static void pixblt_r_2_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
311static void pixblt_r_4_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
312static void pixblt_r_8_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
313static void pixblt_r_16_op0_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
314static void pixblt_b_1_op0_trans(tms34010_state *tms, int dst_is_linear);
315static void pixblt_b_2_op0_trans(tms34010_state *tms, int dst_is_linear);
316static void pixblt_b_4_op0_trans(tms34010_state *tms, int dst_is_linear);
317static void pixblt_b_8_op0_trans(tms34010_state *tms, int dst_is_linear);
318static void pixblt_b_16_op0_trans(tms34010_state *tms, int dst_is_linear);
319static void fill_1_op0_trans(tms34010_state *tms, int dst_is_linear);
320static void fill_2_op0_trans(tms34010_state *tms, int dst_is_linear);
321static void fill_4_op0_trans(tms34010_state *tms, int dst_is_linear);
322static void fill_8_op0_trans(tms34010_state *tms, int dst_is_linear);
323static void fill_16_op0_trans(tms34010_state *tms, int dst_is_linear);
324
325static void pixblt_1_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
326static void pixblt_2_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
327static void pixblt_4_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
328static void pixblt_8_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
329static void pixblt_16_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
330static void pixblt_r_1_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
331static void pixblt_r_2_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
332static void pixblt_r_4_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
333static void pixblt_r_8_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
334static void pixblt_r_16_opx(tms34010_state *tms, int src_is_linear, int dst_is_linear);
335static void pixblt_b_1_opx(tms34010_state *tms, int dst_is_linear);
336static void pixblt_b_2_opx(tms34010_state *tms, int dst_is_linear);
337static void pixblt_b_4_opx(tms34010_state *tms, int dst_is_linear);
338static void pixblt_b_8_opx(tms34010_state *tms, int dst_is_linear);
339static void pixblt_b_16_opx(tms34010_state *tms, int dst_is_linear);
340static void fill_1_opx(tms34010_state *tms, int dst_is_linear);
341static void fill_2_opx(tms34010_state *tms, int dst_is_linear);
342static void fill_4_opx(tms34010_state *tms, int dst_is_linear);
343static void fill_8_opx(tms34010_state *tms, int dst_is_linear);
344static void fill_16_opx(tms34010_state *tms, int dst_is_linear);
345
346static void pixblt_1_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
347static void pixblt_2_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
348static void pixblt_4_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
349static void pixblt_8_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
350static void pixblt_16_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
351static void pixblt_r_1_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
352static void pixblt_r_2_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
353static void pixblt_r_4_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
354static void pixblt_r_8_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
355static void pixblt_r_16_opx_trans(tms34010_state *tms, int src_is_linear, int dst_is_linear);
356static void pixblt_b_1_opx_trans(tms34010_state *tms, int dst_is_linear);
357static void pixblt_b_2_opx_trans(tms34010_state *tms, int dst_is_linear);
358static void pixblt_b_4_opx_trans(tms34010_state *tms, int dst_is_linear);
359static void pixblt_b_8_opx_trans(tms34010_state *tms, int dst_is_linear);
360static void pixblt_b_16_opx_trans(tms34010_state *tms, int dst_is_linear);
361static void fill_1_opx_trans(tms34010_state *tms, int dst_is_linear);
362static void fill_2_opx_trans(tms34010_state *tms, int dst_is_linear);
363static void fill_4_opx_trans(tms34010_state *tms, int dst_is_linear);
364static void fill_8_opx_trans(tms34010_state *tms, int dst_is_linear);
365static void fill_16_opx_trans(tms34010_state *tms, int dst_is_linear);
366
367
368277/* tables */
369static void (*const pixblt_op_table[])(tms34010_state *, int, int) =
278const tms340x0_device::pixblt_op_func tms340x0_device::s_pixblt_op_table[] =
370279{
371   pixblt_1_op0,   pixblt_1_op0_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
372   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
373   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
374   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
375   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
376   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
377   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
378   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
379   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
380   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
381   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
382   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
383   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
384   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
385   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
386   pixblt_1_opx,   pixblt_1_opx_trans,     pixblt_1_opx,   pixblt_1_opx_trans,
280   &tms340x0_device::pixblt_1_op0,   &tms340x0_device::pixblt_1_op0_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
281   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
282   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_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,
387296
388   pixblt_2_op0,   pixblt_2_op0_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
389   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
390   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
391   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
392   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
393   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
394   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
395   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
396   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
397   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
398   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
399   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
400   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
401   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
402   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
403   pixblt_2_opx,   pixblt_2_opx_trans,     pixblt_2_opx,   pixblt_2_opx_trans,
297   &tms340x0_device::pixblt_2_op0,   &tms340x0_device::pixblt_2_op0_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
298   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
299   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_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,
404313
405   pixblt_4_op0,   pixblt_4_op0_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
406   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
407   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
408   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
409   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
410   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
411   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
412   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
413   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
414   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
415   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
416   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
417   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
418   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
419   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
420   pixblt_4_opx,   pixblt_4_opx_trans,     pixblt_4_opx,   pixblt_4_opx_trans,
314   &tms340x0_device::pixblt_4_op0,   &tms340x0_device::pixblt_4_op0_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
315   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
316   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_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,
421330
422   pixblt_8_op0,   pixblt_8_op0_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
423   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
424   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
425   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
426   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
427   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
428   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
429   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
430   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
431   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
432   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
433   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
434   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
435   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
436   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
437   pixblt_8_opx,   pixblt_8_opx_trans,     pixblt_8_opx,   pixblt_8_opx_trans,
331   &tms340x0_device::pixblt_8_op0,   &tms340x0_device::pixblt_8_op0_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
332   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
333   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_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,
438347
439   pixblt_16_op0,  pixblt_16_op0_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
440   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
441   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
442   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
443   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
444   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
445   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
446   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
447   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
448   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
449   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
450   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
451   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
452   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
453   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans,
454   pixblt_16_opx,  pixblt_16_opx_trans,    pixblt_16_opx,  pixblt_16_opx_trans
348   &tms340x0_device::pixblt_16_op0,  &tms340x0_device::pixblt_16_op0_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
349   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
350   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_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
455364};
456365
457static void (*const pixblt_r_op_table[])(tms34010_state *, int, int) =
366const tms340x0_device::pixblt_op_func tms340x0_device::s_pixblt_r_op_table[] =
458367{
459   pixblt_r_1_op0, pixblt_r_1_op0_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
460   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
461   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
462   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
463   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
464   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
465   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
466   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
467   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
468   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
469   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
470   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
471   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
472   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
473   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
474   pixblt_r_1_opx, pixblt_r_1_opx_trans,   pixblt_r_1_opx, pixblt_r_1_opx_trans,
368   &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,
369   &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,
370   &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,
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,
475384
476   pixblt_r_2_op0, pixblt_r_2_op0_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
477   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
478   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
479   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
480   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
481   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
482   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
483   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
484   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
485   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
486   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
487   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
488   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
489   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
490   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
491   pixblt_r_2_opx, pixblt_r_2_opx_trans,   pixblt_r_2_opx, pixblt_r_2_opx_trans,
385   &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,
386   &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,
387   &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,
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,
492401
493   pixblt_r_4_op0, pixblt_r_4_op0_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
494   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
495   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
496   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
497   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
498   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
499   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
500   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
501   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
502   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
503   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
504   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
505   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
506   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
507   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
508   pixblt_r_4_opx, pixblt_r_4_opx_trans,   pixblt_r_4_opx, pixblt_r_4_opx_trans,
402   &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,
403   &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,
404   &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,
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,
509418
510   pixblt_r_8_op0, pixblt_r_8_op0_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
511   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
512   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
513   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
514   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
515   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
516   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
517   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
518   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
519   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
520   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
521   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
522   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
523   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
524   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
525   pixblt_r_8_opx, pixblt_r_8_opx_trans,   pixblt_r_8_opx, pixblt_r_8_opx_trans,
419   &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,
420   &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,
421   &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,
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,
526435
527   pixblt_r_16_op0,pixblt_r_16_op0_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
528   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
529   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
530   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
531   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
532   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
533   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
534   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
535   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
536   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
537   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
538   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
539   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
540   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
541   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans,
542   pixblt_r_16_opx,pixblt_r_16_opx_trans,  pixblt_r_16_opx,pixblt_r_16_opx_trans
436   &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,
437   &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,
438   &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,
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
543452};
544453
545static void (*const pixblt_b_op_table[])(tms34010_state *, int) =
454const tms340x0_device::pixblt_b_op_func tms340x0_device::s_pixblt_b_op_table[] =
546455{
547   pixblt_b_1_op0, pixblt_b_1_op0_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
548   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
549   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
550   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
551   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
552   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
553   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
554   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
555   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
556   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
557   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
558   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
559   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
560   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
561   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
562   pixblt_b_1_opx, pixblt_b_1_opx_trans,   pixblt_b_1_opx, pixblt_b_1_opx_trans,
456   &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,
457   &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,
458   &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,
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,
563472
564   pixblt_b_2_op0, pixblt_b_2_op0_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
565   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
566   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
567   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
568   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
569   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
570   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
571   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
572   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
573   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
574   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
575   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
576   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
577   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
578   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
579   pixblt_b_2_opx, pixblt_b_2_opx_trans,   pixblt_b_2_opx, pixblt_b_2_opx_trans,
473   &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,
474   &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,
475   &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,
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,
580489
581   pixblt_b_4_op0, pixblt_b_4_op0_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
582   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
583   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
584   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
585   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
586   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
587   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
588   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
589   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
590   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
591   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
592   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
593   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
594   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
595   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
596   pixblt_b_4_opx, pixblt_b_4_opx_trans,   pixblt_b_4_opx, pixblt_b_4_opx_trans,
490   &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,
491   &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,
492   &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,
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,
597506
598   pixblt_b_8_op0, pixblt_b_8_op0_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
599   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
600   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
601   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
602   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
603   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
604   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
605   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
606   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
607   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
608   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
609   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
610   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
611   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
612   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
613   pixblt_b_8_opx, pixblt_b_8_opx_trans,   pixblt_b_8_opx, pixblt_b_8_opx_trans,
507   &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,
508   &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,
509   &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,
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,
614523
615   pixblt_b_16_op0,pixblt_b_16_op0_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
616   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
617   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
618   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
619   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
620   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
621   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
622   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
623   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
624   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
625   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
626   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
627   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
628   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
629   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans,
630   pixblt_b_16_opx,pixblt_b_16_opx_trans,  pixblt_b_16_opx,pixblt_b_16_opx_trans
524   &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,
525   &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,
526   &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,
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
631540};
632541
633static void (*const fill_op_table[])(tms34010_state *tms, int) =
542const tms340x0_device::pixblt_b_op_func tms340x0_device::s_fill_op_table[] =
634543{
635   fill_1_op0,     fill_1_op0_trans,       fill_1_opx,     fill_1_opx_trans,
636   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
637   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
638   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
639   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
640   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
641   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
642   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
643   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
644   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
645   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
646   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
647   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
648   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
649   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
650   fill_1_opx,     fill_1_opx_trans,       fill_1_opx,     fill_1_opx_trans,
544   &tms340x0_device::fill_1_op0,     &tms340x0_device::fill_1_op0_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
545   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
546   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_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,
651560
652   fill_2_op0,     fill_2_op0_trans,       fill_2_opx,     fill_2_opx_trans,
653   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
654   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
655   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
656   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
657   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
658   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
659   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
660   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
661   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
662   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
663   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
664   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
665   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
666   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
667   fill_2_opx,     fill_2_opx_trans,       fill_2_opx,     fill_2_opx_trans,
561   &tms340x0_device::fill_2_op0,     &tms340x0_device::fill_2_op0_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
562   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
563   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_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,
668577
669   fill_4_op0,     fill_4_op0_trans,       fill_4_opx,     fill_4_opx_trans,
670   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
671   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
672   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
673   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
674   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
675   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
676   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
677   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
678   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
679   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
680   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
681   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
682   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
683   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
684   fill_4_opx,     fill_4_opx_trans,       fill_4_opx,     fill_4_opx_trans,
578   &tms340x0_device::fill_4_op0,     &tms340x0_device::fill_4_op0_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
579   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
580   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_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,
685594
686   fill_8_op0,     fill_8_op0_trans,       fill_8_opx,     fill_8_opx_trans,
687   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
688   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
689   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
690   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
691   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
692   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
693   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
694   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
695   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
696   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
697   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
698   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
699   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
700   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
701   fill_8_opx,     fill_8_opx_trans,       fill_8_opx,     fill_8_opx_trans,
595   &tms340x0_device::fill_8_op0,     &tms340x0_device::fill_8_op0_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
596   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
597   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_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,
702611
703   fill_16_op0,    fill_16_op0_trans,      fill_16_opx,    fill_16_opx_trans,
704   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
705   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
706   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
707   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
708   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
709   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
710   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
711   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
712   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
713   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
714   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
715   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
716   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
717   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans,
718   fill_16_opx,    fill_16_opx_trans,      fill_16_opx,    fill_16_opx_trans
612   &tms340x0_device::fill_16_op0,    &tms340x0_device::fill_16_op0_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
613   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
614   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_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
719628};
720629
721630
r31176r31177
768677#undef PIXEL_OP
769678
770679
771#define PIXEL_OP(src, mask, pixel)      pixel = (*pixel_op)(src, mask, pixel)
772#define PIXEL_OP_TIMING                 pixel_op_timing
680#define PIXEL_OP(src, mask, pixel)      pixel = (this->*m_pixel_op)(src, mask, pixel)
681#define PIXEL_OP_TIMING                 m_pixel_op_timing
773682#define PIXEL_OP_REQUIRES_SOURCE        1
774683#define TRANSPARENCY                    0
775684
r31176r31177
861770#undef PIXEL_OP
862771
863772
864#define PIXEL_OP(src, mask, pixel)      pixel = (*pixel_op)(src, mask, pixel)
773#define PIXEL_OP(src, mask, pixel)      pixel = (this->*m_pixel_op)(src, mask, pixel)
865774#define PIXEL_OP_REQUIRES_SOURCE        1
866#define PIXEL_OP_TIMING                 (2+pixel_op_timing)
775#define PIXEL_OP_TIMING                 (2+m_pixel_op_timing)
867776#define TRANSPARENCY                    1
868777
869778   /* 1bpp cases */
r31176r31177
912821};
913822
914823
915static void pixblt_b_l(tms34010_state *tms, UINT16 op)
824void tms340x0_device::pixblt_b_l(UINT16 op)
916825{
917   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
918   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
919   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
826   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
827   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
828   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
920829   int ix = trans | (rop << 1) | (psize << 6);
921   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):PIXBLT B,L (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
922   pixel_op = pixel_op_table[rop];
923   pixel_op_timing = pixel_op_timing_table[rop];
924   (*pixblt_b_op_table[ix])(tms, 1);
830   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));
831   m_pixel_op = s_pixel_op_table[rop];
832   m_pixel_op_timing = s_pixel_op_timing_table[rop];
833   (this->*s_pixblt_b_op_table[ix])(1);
925834}
926835
927static void pixblt_b_xy(tms34010_state *tms, UINT16 op)
836void tms340x0_device::pixblt_b_xy(UINT16 op)
928837{
929   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
930   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
931   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
838   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
839   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
840   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
932841   int ix = trans | (rop << 1) | (psize << 6);
933   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):PIXBLT B,XY (%d,%d) (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DADDR_X(tms), DADDR_Y(tms), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
934   pixel_op = pixel_op_table[rop];
935   pixel_op_timing = pixel_op_timing_table[rop];
936   (*pixblt_b_op_table[ix])(tms, 0);
842   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));
843   m_pixel_op = s_pixel_op_table[rop];
844   m_pixel_op_timing = s_pixel_op_timing_table[rop];
845   (this->*s_pixblt_b_op_table[ix])(0);
937846}
938847
939static void pixblt_l_l(tms34010_state *tms, UINT16 op)
848void tms340x0_device::pixblt_l_l(UINT16 op)
940849{
941   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
942   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
943   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
944   int pbh = (IOREG(tms, REG_CONTROL) >> 8) & 1;
850   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
851   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
852   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
853   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
945854   int ix = trans | (rop << 1) | (psize << 6);
946   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):PIXBLT L,L (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
947   pixel_op = pixel_op_table[rop];
948   pixel_op_timing = pixel_op_timing_table[rop];
855   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));
856   m_pixel_op = s_pixel_op_table[rop];
857   m_pixel_op_timing = s_pixel_op_timing_table[rop];
949858   if (!pbh)
950      (*pixblt_op_table[ix])(tms, 1, 1);
859      (this->*s_pixblt_op_table[ix])(1, 1);
951860   else
952      (*pixblt_r_op_table[ix])(tms, 1, 1);
861      (this->*s_pixblt_r_op_table[ix])(1, 1);
953862}
954863
955static void pixblt_l_xy(tms34010_state *tms, UINT16 op)
864void tms340x0_device::pixblt_l_xy(UINT16 op)
956865{
957   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
958   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
959   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
960   int pbh = (IOREG(tms, REG_CONTROL) >> 8) & 1;
866   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
867   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
868   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
869   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
961870   int ix = trans | (rop << 1) | (psize << 6);
962   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):PIXBLT L,XY (%d,%d) (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DADDR_X(tms), DADDR_Y(tms), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
963   pixel_op = pixel_op_table[rop];
964   pixel_op_timing = pixel_op_timing_table[rop];
871   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));
872   m_pixel_op = s_pixel_op_table[rop];
873   m_pixel_op_timing = s_pixel_op_timing_table[rop];
965874   if (!pbh)
966      (*pixblt_op_table[ix])(tms, 1, 0);
875      (this->*s_pixblt_op_table[ix])(1, 0);
967876   else
968      (*pixblt_r_op_table[ix])(tms, 1, 0);
877      (this->*s_pixblt_r_op_table[ix])(1, 0);
969878}
970879
971static void pixblt_xy_l(tms34010_state *tms, UINT16 op)
880void tms340x0_device::pixblt_xy_l(UINT16 op)
972881{
973   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
974   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
975   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
976   int pbh = (IOREG(tms, REG_CONTROL) >> 8) & 1;
882   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
883   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
884   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
885   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
977886   int ix = trans | (rop << 1) | (psize << 6);
978   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):PIXBLT XY,L (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
979   pixel_op = pixel_op_table[rop];
980   pixel_op_timing = pixel_op_timing_table[rop];
887   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));
888   m_pixel_op = s_pixel_op_table[rop];
889   m_pixel_op_timing = s_pixel_op_timing_table[rop];
981890   if (!pbh)
982      (*pixblt_op_table[ix])(tms, 0, 1);
891      (this->*s_pixblt_op_table[ix])(0, 1);
983892   else
984      (*pixblt_r_op_table[ix])(tms, 0, 1);
893      (this->*s_pixblt_r_op_table[ix])(0, 1);
985894}
986895
987static void pixblt_xy_xy(tms34010_state *tms, UINT16 op)
896void tms340x0_device::pixblt_xy_xy(UINT16 op)
988897{
989   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
990   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
991   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
992   int pbh = (IOREG(tms, REG_CONTROL) >> 8) & 1;
898   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
899   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
900   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
901   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
993902   int ix = trans | (rop << 1) | (psize << 6);
994   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):PIXBLT XY,XY (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
995   pixel_op = pixel_op_table[rop];
996   pixel_op_timing = pixel_op_timing_table[rop];
903   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));
904   m_pixel_op = s_pixel_op_table[rop];
905   m_pixel_op_timing = s_pixel_op_timing_table[rop];
997906   if (!pbh)
998      (*pixblt_op_table[ix])(tms, 0, 0);
907      (this->*s_pixblt_op_table[ix])(0, 0);
999908   else
1000      (*pixblt_r_op_table[ix])(tms, 0, 0);
909      (this->*s_pixblt_r_op_table[ix])(0, 0);
1001910}
1002911
1003static void fill_l(tms34010_state *tms, UINT16 op)
912void tms340x0_device::fill_l(UINT16 op)
1004913{
1005   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
1006   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
1007   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
914   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
915   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
916   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
1008917   int ix = trans | (rop << 1) | (psize << 6);
1009   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):FILL L (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
1010   pixel_op = pixel_op_table[rop];
1011   pixel_op_timing = pixel_op_timing_table[rop];
1012   (*fill_op_table[ix])(tms, 1);
918   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));
919   m_pixel_op = s_pixel_op_table[rop];
920   m_pixel_op_timing = s_pixel_op_timing_table[rop];
921   (this->*s_fill_op_table[ix])(1);
1013922}
1014923
1015static void fill_xy(tms34010_state *tms, UINT16 op)
924void tms340x0_device::fill_xy(UINT16 op)
1016925{
1017   int psize = pixelsize_lookup[IOREG(tms, REG_PSIZE) & 0x1f];
1018   int trans = (IOREG(tms, REG_CONTROL) & 0x20) >> 5;
1019   int rop = (IOREG(tms, REG_CONTROL) >> 10) & 0x1f;
926   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
927   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
928   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
1020929   int ix = trans | (rop << 1) | (psize << 6);
1021   if (!P_FLAG(tms)) LOGGFX(("%08X(%3d):FILL XY (%d,%d) (%dx%d) depth=%d\n", tms->pc, tms->screen->vpos(), DADDR_X(tms), DADDR_Y(tms), DYDX_X(tms), DYDX_Y(tms), IOREG(tms, REG_PSIZE) ? IOREG(tms, REG_PSIZE) : 32));
1022   pixel_op = pixel_op_table[rop];
1023   pixel_op_timing = pixel_op_timing_table[rop];
1024   (*fill_op_table[ix])(tms, 0);
930   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));
931   m_pixel_op = s_pixel_op_table[rop];
932   m_pixel_op_timing = s_pixel_op_timing_table[rop];
933   (this->*s_fill_op_table[ix])(0);
1025934}
1026935
1027936
r31176r31177
1034943#define PIXELS_PER_WORD (16 / BITS_PER_PIXEL)
1035944#define PIXEL_MASK ((1 << BITS_PER_PIXEL) - 1)
1036945
1037static void FUNCTION_NAME(pixblt)(tms34010_state *tms, int src_is_linear, int dst_is_linear)
946void FUNCTION_NAME(tms340x0_device::pixblt)(int src_is_linear, int dst_is_linear)
1038947{
1039948   /* if this is the first time through, perform the operation */
1040   if (!P_FLAG(tms))
949   if (!P_FLAG())
1041950   {
1042951      int dx, dy, x, y, /*words,*/ yreverse;
1043      void (*word_write)(address_space &space,offs_t address,UINT16 data);
1044      UINT16 (*word_read)(address_space &space,offs_t address);
952      word_write_func word_write;
953      word_read_func word_read;
1045954      UINT32 readwrites = 0;
1046955      UINT32 saddr, daddr;
1047956      XY dstxy = { 0 };
1048957
1049958      /* determine read/write functions */
1050      if (IOREG(tms, REG_DPYCTL) & 0x0800)
959      if (IOREG(REG_DPYCTL) & 0x0800)
1051960      {
1052         word_write = shiftreg_w;
1053         word_read = shiftreg_r;
961         word_write = &tms340x0_device::shiftreg_w;
962         word_read = &tms340x0_device::shiftreg_r;
1054963      }
1055964      else
1056965      {
1057         word_write = memory_w;
1058         word_read = memory_r;
966         word_write = &tms340x0_device::memory_w;
967         word_read = &tms340x0_device::memory_r;
1059968      }
1060969
1061970      /* compute the starting addresses */
1062      saddr = src_is_linear ? SADDR(tms) : SXYTOL(tms,SADDR_XY(tms));
971      saddr = src_is_linear ? SADDR() : SXYTOL(SADDR_XY());
1063972
1064973      /* compute the bounds of the operation */
1065      dx = (INT16)DYDX_X(tms);
1066      dy = (INT16)DYDX_Y(tms);
974      dx = (INT16)DYDX_X();
975      dy = (INT16)DYDX_Y();
1067976
1068977      /* apply the window for non-linear destinations */
1069      tms->gfxcycles = 7 + (src_is_linear ? 0 : 2);
978      m_gfxcycles = 7 + (src_is_linear ? 0 : 2);
1070979      if (!dst_is_linear)
1071980      {
1072         dstxy = DADDR_XY(tms);
1073         tms->gfxcycles += 2 + (!src_is_linear) + apply_window(tms, "PIXBLT", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
1074         daddr = DXYTOL(tms,dstxy);
981         dstxy = DADDR_XY();
982         m_gfxcycles += 2 + (!src_is_linear) + apply_window("PIXBLT", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
983         daddr = DXYTOL(dstxy);
1075984      }
1076985      else
1077         daddr = DADDR(tms);
986         daddr = DADDR();
1078987      daddr &= ~(BITS_PER_PIXEL - 1);
1079      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(tms), DPTCH(tms)));
988      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
1080989
1081990      /* bail if we're clipped */
1082991      if (dx <= 0 || dy <= 0)
1083992         return;
1084993
1085994      /* window mode 1: just return and interrupt if we are within the window */
1086      if (WINDOW_CHECKING(tms) == 1 && !dst_is_linear)
995      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
1087996      {
1088         CLR_V(tms);
1089         DADDR_XY(tms) = dstxy;
1090         DYDX_X(tms) = dx;
1091         DYDX_Y(tms) = dy;
1092         IOREG(tms, REG_INTPEND) |= TMS34010_WV;
1093         check_interrupt(tms);
997         CLR_V();
998         DADDR_XY() = dstxy;
999         DYDX_X() = dx;
1000         DYDX_Y() = dy;
1001         IOREG(REG_INTPEND) |= TMS34010_WV;
1002         check_interrupt();
10941003         return;
10951004      }
10961005
10971006      /* handle flipping the addresses */
1098      yreverse = (IOREG(tms, REG_CONTROL) >> 9) & 1;
1007      yreverse = (IOREG(REG_CONTROL) >> 9) & 1;
10991008      if (!src_is_linear || !dst_is_linear)
11001009      {
11011010         if (yreverse)
11021011         {
1103            saddr += (dy - 1) * tms->convsp;
1104            daddr += (dy - 1) * tms->convdp;
1012            saddr += (dy - 1) * m_convsp;
1013            daddr += (dy - 1) * m_convdp;
11051014         }
11061015      }
11071016
1108      tms->st |= STBIT_P;
1017      m_st |= STBIT_P;
11091018
11101019      /* loop over rows */
11111020      for (y = 0; y < dy; y++)
r31176r31177
11171026         UINT32 srcword, dstword = 0;
11181027
11191028         /* fetch the initial source word */
1120         srcword = (*word_read)(*tms->program, srcwordaddr++ << 1);
1029         srcword = (this->*word_read)(*m_program, srcwordaddr++ << 1);
11211030         readwrites++;
11221031
11231032         /* fetch the initial dest word */
11241033         if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY || (daddr & 0x0f) != 0)
11251034         {
1126            dstword = (*word_read)(*tms->program, dstwordaddr << 1);
1035            dstword = (this->*word_read)(*m_program, dstwordaddr << 1);
11271036            readwrites++;
11281037         }
11291038
r31176r31177
11361045            /* fetch more words if necessary */
11371046            if (srcbit + BITS_PER_PIXEL > 16)
11381047            {
1139               srcword |= (*word_read)(*tms->program, srcwordaddr++ << 1) << 16;
1048               srcword |= (this->*word_read)(*m_program, srcwordaddr++ << 1) << 16;
11401049               readwrites++;
11411050            }
11421051
r31176r31177
11531062            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
11541063               if (dstbit + BITS_PER_PIXEL > 16)
11551064               {
1156                  dstword |= (*word_read)(*tms->program, (dstwordaddr + 1) << 1) << 16;
1065                  dstword |= (this->*word_read)(*m_program, (dstwordaddr + 1) << 1) << 16;
11571066                  readwrites++;
11581067               }
11591068
r31176r31177
11681077            dstbit += BITS_PER_PIXEL;
11691078            if (dstbit > 16)
11701079            {
1171               (*word_write)(*tms->program, dstwordaddr++ << 1, dstword);
1080               (this->*word_write)(*m_program, dstwordaddr++ << 1, dstword);
11721081               readwrites++;
11731082               dstbit -= 16;
11741083               dstword >>= 16;
r31176r31177
11811090            /* if we're right-partial, read and mask the remaining bits */
11821091            if (dstbit != 16)
11831092            {
1184               UINT16 origdst = (*word_read)(*tms->program, dstwordaddr << 1);
1093               UINT16 origdst = (this->*word_read)(*m_program, dstwordaddr << 1);
11851094               UINT16 mask = 0xffff << dstbit;
11861095               dstword = (dstword & ~mask) | (origdst & mask);
11871096               readwrites++;
11881097            }
11891098
1190            (*word_write)(*tms->program, dstwordaddr++ << 1, dstword);
1099            (this->*word_write)(*m_program, dstwordaddr++ << 1, dstword);
11911100            readwrites++;
11921101         }
11931102
r31176r31177
12121121            full_words /= PIXELS_PER_WORD;
12131122
12141123         /* compute cycles */
1215         tms->gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1124         m_gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
12161125
12171126         /* use word addresses each row */
12181127         swordaddr = saddr >> 4;
12191128         dwordaddr = daddr >> 4;
12201129
12211130         /* fetch the initial source word */
1222         srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1131         srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
12231132         srcmask = PIXEL_MASK << (saddr & 15);
12241133
12251134         /* handle the left partial word */
12261135         if (left_partials != 0)
12271136         {
12281137            /* fetch the destination word */
1229            dstword = (*word_read)(*tms->program, dwordaddr << 1);
1138            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
12301139            dstmask = PIXEL_MASK << (daddr & 15);
12311140
12321141            /* loop over partials */
r31176r31177
12351144               /* fetch another word if necessary */
12361145               if (srcmask == 0)
12371146               {
1238                  srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1147                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
12391148                  srcmask = PIXEL_MASK;
12401149               }
12411150
r31176r31177
12571166            }
12581167
12591168            /* write the result */
1260            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1169            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
12611170         }
12621171
12631172         /* loop over full words */
r31176r31177
12651174         {
12661175            /* fetch the destination word (if necessary) */
12671176            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1268               dstword = (*word_read)(*tms->program, dwordaddr << 1);
1177               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
12691178            else
12701179               dstword = 0;
12711180            dstmask = PIXEL_MASK;
r31176r31177
12761185               /* fetch another word if necessary */
12771186               if (srcmask == 0)
12781187               {
1279                  srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1188                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
12801189                  srcmask = PIXEL_MASK;
12811190               }
12821191
r31176r31177
12981207            }
12991208
13001209            /* write the result */
1301            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1210            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
13021211         }
13031212
13041213         /* handle the right partial word */
13051214         if (right_partials != 0)
13061215         {
13071216            /* fetch the destination word */
1308            dstword = (*word_read)(*tms->program, dwordaddr << 1);
1217            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
13091218            dstmask = PIXEL_MASK;
13101219
13111220            /* loop over partials */
r31176r31177
13151224               if (srcmask == 0)
13161225               {
13171226      LOGGFX(("  right fetch @ %08x\n", swordaddr));
1318                  srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1227                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
13191228                  srcmask = PIXEL_MASK;
13201229               }
13211230
r31176r31177
13371246            }
13381247
13391248            /* write the result */
1340            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1249            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
13411250         }
13421251#endif
13431252
13441253         /* update for next row */
13451254         if (!yreverse)
13461255         {
1347            saddr += SPTCH(tms);
1348            daddr += DPTCH(tms);
1256            saddr += SPTCH();
1257            daddr += DPTCH();
13491258         }
13501259         else
13511260         {
1352            saddr -= SPTCH(tms);
1353            daddr -= DPTCH(tms);
1261            saddr -= SPTCH();
1262            daddr -= DPTCH();
13541263         }
13551264      }
13561265
1357      tms->gfxcycles += readwrites * 2 + dx * dy * (PIXEL_OP_TIMING - 2);
1266      m_gfxcycles += readwrites * 2 + dx * dy * (PIXEL_OP_TIMING - 2);
13581267
1359      LOGGFX(("  (%d cycles)\n", tms->gfxcycles));
1268      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
13601269   }
13611270
13621271   /* eat cycles */
1363   if (tms->gfxcycles > tms->icount)
1272   if (m_gfxcycles > m_icount)
13641273   {
1365      tms->gfxcycles -= tms->icount;
1366      tms->icount = 0;
1367      tms->pc -= 0x10;
1274      m_gfxcycles -= m_icount;
1275      m_icount = 0;
1276      m_pc -= 0x10;
13681277   }
13691278   else
13701279   {
1371      tms->icount -= tms->gfxcycles;
1372      tms->st &= ~STBIT_P;
1280      m_icount -= m_gfxcycles;
1281      m_st &= ~STBIT_P;
13731282      if (src_is_linear && dst_is_linear)
1374         SADDR(tms) += DYDX_Y(tms) * SPTCH(tms);
1283         SADDR() += DYDX_Y() * SPTCH();
13751284      else if (src_is_linear)
1376         SADDR(tms) += DYDX_Y(tms) * SPTCH(tms);
1285         SADDR() += DYDX_Y() * SPTCH();
13771286      else
1378         SADDR_Y(tms) += DYDX_Y(tms);
1287         SADDR_Y() += DYDX_Y();
13791288      if (dst_is_linear)
1380         DADDR(tms) += DYDX_Y(tms) * DPTCH(tms);
1289         DADDR() += DYDX_Y() * DPTCH();
13811290      else
1382         DADDR_Y(tms) += DYDX_Y(tms);
1291         DADDR_Y() += DYDX_Y();
13831292   }
13841293}
13851294
1386static void FUNCTION_NAME(pixblt_r)(tms34010_state *tms, int src_is_linear, int dst_is_linear)
1295void FUNCTION_NAME(tms340x0_device::pixblt_r)(int src_is_linear, int dst_is_linear)
13871296{
13881297   /* if this is the first time through, perform the operation */
1389   if (!P_FLAG(tms))
1298   if (!P_FLAG())
13901299   {
13911300      int dx, dy, x, y, words, yreverse;
1392      void (*word_write)(address_space &space,offs_t address,UINT16 data);
1393      UINT16 (*word_read)(address_space &space,offs_t address);
1301      word_write_func word_write;
1302      word_read_func word_read;
13941303      UINT32 saddr, daddr;
13951304      XY dstxy = { 0 };
13961305
13971306      /* determine read/write functions */
1398      if (IOREG(tms, REG_DPYCTL) & 0x0800)
1307      if (IOREG(REG_DPYCTL) & 0x0800)
13991308      {
1400         word_write = shiftreg_w;
1401         word_read = shiftreg_r;
1309         word_write = &tms340x0_device::shiftreg_w;
1310         word_read = &tms340x0_device::shiftreg_r;
14021311      }
14031312      else
14041313      {
1405         word_write = memory_w;
1406         word_read = memory_r;
1314         word_write = &tms340x0_device::memory_w;
1315         word_read = &tms340x0_device::memory_r;
14071316      }
14081317
14091318      /* compute the starting addresses */
1410      saddr = src_is_linear ? SADDR(tms) : SXYTOL(tms,SADDR_XY(tms));
1319      saddr = src_is_linear ? SADDR() : SXYTOL(SADDR_XY());
14111320if ((saddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd saddr\n", BITS_PER_PIXEL);
14121321      saddr &= ~(BITS_PER_PIXEL - 1);
14131322
14141323      /* compute the bounds of the operation */
1415      dx = (INT16)DYDX_X(tms);
1416      dy = (INT16)DYDX_Y(tms);
1324      dx = (INT16)DYDX_X();
1325      dy = (INT16)DYDX_Y();
14171326
14181327      /* apply the window for non-linear destinations */
1419      tms->gfxcycles = 7 + (src_is_linear ? 0 : 2);
1328      m_gfxcycles = 7 + (src_is_linear ? 0 : 2);
14201329      if (!dst_is_linear)
14211330      {
1422         dstxy = DADDR_XY(tms);
1423         tms->gfxcycles += 2 + (!src_is_linear) + apply_window(tms, "PIXBLT R", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
1424         daddr = DXYTOL(tms,dstxy);
1331         dstxy = DADDR_XY();
1332         m_gfxcycles += 2 + (!src_is_linear) + apply_window("PIXBLT R", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
1333         daddr = DXYTOL(dstxy);
14251334      }
14261335      else
1427         daddr = DADDR(tms);
1336         daddr = DADDR();
14281337if ((daddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd daddr\n", BITS_PER_PIXEL);
14291338      daddr &= ~(BITS_PER_PIXEL - 1);
1430      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(tms), DPTCH(tms)));
1339      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
14311340
14321341      /* bail if we're clipped */
14331342      if (dx <= 0 || dy <= 0)
14341343         return;
14351344
14361345      /* window mode 1: just return and interrupt if we are within the window */
1437      if (WINDOW_CHECKING(tms) == 1 && !dst_is_linear)
1346      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
14381347      {
1439         CLR_V(tms);
1440         DADDR_XY(tms) = dstxy;
1441         DYDX_X(tms) = dx;
1442         DYDX_Y(tms) = dy;
1443         IOREG(tms, REG_INTPEND) |= TMS34010_WV;
1444         check_interrupt(tms);
1348         CLR_V();
1349         DADDR_XY() = dstxy;
1350         DYDX_X() = dx;
1351         DYDX_Y() = dy;
1352         IOREG(REG_INTPEND) |= TMS34010_WV;
1353         check_interrupt();
14451354         return;
14461355      }
14471356
14481357      /* handle flipping the addresses */
1449      yreverse = (IOREG(tms, REG_CONTROL) >> 9) & 1;
1358      yreverse = (IOREG(REG_CONTROL) >> 9) & 1;
14501359      if (!src_is_linear || !dst_is_linear)
14511360      {
14521361         saddr += dx * BITS_PER_PIXEL;
14531362         daddr += dx * BITS_PER_PIXEL;
14541363         if (yreverse)
14551364         {
1456            saddr += (dy - 1) * tms->convsp;
1457            daddr += (dy - 1) * tms->convdp;
1365            saddr += (dy - 1) * m_convsp;
1366            daddr += (dy - 1) * m_convdp;
14581367         }
14591368      }
14601369
1461      tms->st |= STBIT_P;
1370      m_st |= STBIT_P;
14621371
14631372      /* loop over rows */
14641373      for (y = 0; y < dy; y++)
r31176r31177
14811390            full_words /= PIXELS_PER_WORD;
14821391
14831392         /* compute cycles */
1484         tms->gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1393         m_gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
14851394
14861395         /* use word addresses each row */
14871396         swordaddr = (saddr + 15) >> 4;
14881397         dwordaddr = (daddr + 15) >> 4;
14891398
14901399         /* fetch the initial source word */
1491         srcword = (*word_read)(*tms->program, --swordaddr << 1);
1400         srcword = (this->*word_read)(*m_program, --swordaddr << 1);
14921401         srcmask = PIXEL_MASK << ((saddr - BITS_PER_PIXEL) & 15);
14931402
14941403         /* handle the right partial word */
14951404         if (right_partials != 0)
14961405         {
14971406            /* fetch the destination word */
1498            dstword = (*word_read)(*tms->program, --dwordaddr << 1);
1407            dstword = (this->*word_read)(*m_program, --dwordaddr << 1);
14991408            dstmask = PIXEL_MASK << ((daddr - BITS_PER_PIXEL) & 15);
15001409
15011410            /* loop over partials */
r31176r31177
15041413               /* fetch source pixel if necessary */
15051414               if (srcmask == 0)
15061415               {
1507                  srcword = (*word_read)(*tms->program, --swordaddr << 1);
1416                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
15081417                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
15091418               }
15101419
r31176r31177
15261435            }
15271436
15281437            /* write the result */
1529            (*word_write)(*tms->program, dwordaddr << 1, dstword);
1438            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
15301439         }
15311440
15321441         /* loop over full words */
r31176r31177
15351444            /* fetch the destination word (if necessary) */
15361445            dwordaddr--;
15371446            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1538               dstword = (*word_read)(*tms->program, dwordaddr << 1);
1447               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
15391448            else
15401449               dstword = 0;
15411450            dstmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
r31176r31177
15461455               /* fetch source pixel if necessary */
15471456               if (srcmask == 0)
15481457               {
1549                  srcword = (*word_read)(*tms->program, --swordaddr << 1);
1458                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
15501459                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
15511460               }
15521461
r31176r31177
15681477            }
15691478
15701479            /* write the result */
1571            (*word_write)(*tms->program, dwordaddr << 1, dstword);
1480            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
15721481         }
15731482
15741483         /* handle the left partial word */
15751484         if (left_partials != 0)
15761485         {
15771486            /* fetch the destination word */
1578            dstword = (*word_read)(*tms->program, --dwordaddr << 1);
1487            dstword = (this->*word_read)(*m_program, --dwordaddr << 1);
15791488            dstmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
15801489
15811490            /* loop over partials */
r31176r31177
15841493               /* fetch the source pixel if necessary */
15851494               if (srcmask == 0)
15861495               {
1587                  srcword = (*word_read)(*tms->program, --swordaddr << 1);
1496                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
15881497                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
15891498               }
15901499
r31176r31177
16061515            }
16071516
16081517            /* write the result */
1609            (*word_write)(*tms->program, dwordaddr << 1, dstword);
1518            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
16101519         }
16111520
16121521         /* update for next row */
16131522         if (!yreverse)
16141523         {
1615            saddr += SPTCH(tms);
1616            daddr += DPTCH(tms);
1524            saddr += SPTCH();
1525            daddr += DPTCH();
16171526         }
16181527         else
16191528         {
1620            saddr -= SPTCH(tms);
1621            daddr -= DPTCH(tms);
1529            saddr -= SPTCH();
1530            daddr -= DPTCH();
16221531         }
16231532      }
1624      LOGGFX(("  (%d cycles)\n", tms->gfxcycles));
1533      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
16251534   }
16261535
16271536   /* eat cycles */
1628   if (tms->gfxcycles > tms->icount)
1537   if (m_gfxcycles > m_icount)
16291538   {
1630      tms->gfxcycles -= tms->icount;
1631      tms->icount = 0;
1632      tms->pc -= 0x10;
1539      m_gfxcycles -= m_icount;
1540      m_icount = 0;
1541      m_pc -= 0x10;
16331542   }
16341543   else
16351544   {
1636      tms->icount -= tms->gfxcycles;
1637      tms->st &= ~STBIT_P;
1545      m_icount -= m_gfxcycles;
1546      m_st &= ~STBIT_P;
16381547      if (src_is_linear && dst_is_linear)
1639         SADDR(tms) += DYDX_Y(tms) * SPTCH(tms);
1548         SADDR() += DYDX_Y() * SPTCH();
16401549      else if (src_is_linear)
1641         SADDR(tms) += DYDX_Y(tms) * SPTCH(tms);
1550         SADDR() += DYDX_Y() * SPTCH();
16421551      else
1643         SADDR_Y(tms) += DYDX_Y(tms);
1552         SADDR_Y() += DYDX_Y();
16441553      if (dst_is_linear)
1645         DADDR(tms) += DYDX_Y(tms) * DPTCH(tms);
1554         DADDR() += DYDX_Y() * DPTCH();
16461555      else
1647         DADDR_Y(tms) += DYDX_Y(tms);
1556         DADDR_Y() += DYDX_Y();
16481557   }
16491558}
16501559
1651static void FUNCTION_NAME(pixblt_b)(tms34010_state *tms, int dst_is_linear)
1560void FUNCTION_NAME(tms340x0_device::pixblt_b)(int dst_is_linear)
16521561{
16531562   /* if this is the first time through, perform the operation */
1654   if (!P_FLAG(tms))
1563   if (!P_FLAG())
16551564   {
16561565      int dx, dy, x, y, words, left_partials, right_partials, full_words;
1657      void (*word_write)(address_space &space,offs_t address,UINT16 data);
1658      UINT16 (*word_read)(address_space &space,offs_t address);
1566      word_write_func word_write;
1567      word_read_func word_read;
16591568      UINT32 saddr, daddr;
16601569      XY dstxy = { 0 };
16611570
16621571      /* determine read/write functions */
1663      if (IOREG(tms, REG_DPYCTL) & 0x0800)
1572      if (IOREG(REG_DPYCTL) & 0x0800)
16641573      {
1665         word_write = shiftreg_w;
1666         word_read = shiftreg_r;
1574         word_write = &tms340x0_device::shiftreg_w;
1575         word_read = &tms340x0_device::shiftreg_r;
16671576      }
16681577      else
16691578      {
1670         word_write = memory_w;
1671         word_read = memory_r;
1579         word_write = &tms340x0_device::memory_w;
1580         word_read = &tms340x0_device::memory_r;
16721581      }
16731582
16741583      /* compute the starting addresses */
1675      saddr = SADDR(tms);
1584      saddr = SADDR();
16761585
16771586      /* compute the bounds of the operation */
1678      dx = (INT16)DYDX_X(tms);
1679      dy = (INT16)DYDX_Y(tms);
1587      dx = (INT16)DYDX_X();
1588      dy = (INT16)DYDX_Y();
16801589
16811590      /* apply the window for non-linear destinations */
1682      tms->gfxcycles = 4;
1591      m_gfxcycles = 4;
16831592      if (!dst_is_linear)
16841593      {
1685         dstxy = DADDR_XY(tms);
1686         tms->gfxcycles += 2 + apply_window(tms, "PIXBLT B", 1, &saddr, &dstxy, &dx, &dy);
1687         daddr = DXYTOL(tms,dstxy);
1594         dstxy = DADDR_XY();
1595         m_gfxcycles += 2 + apply_window("PIXBLT B", 1, &saddr, &dstxy, &dx, &dy);
1596         daddr = DXYTOL(dstxy);
16881597      }
16891598      else
1690         daddr = DADDR(tms);
1599         daddr = DADDR();
16911600      daddr &= ~(BITS_PER_PIXEL - 1);
1692      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(tms), DPTCH(tms)));
1601      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
16931602
16941603      /* bail if we're clipped */
16951604      if (dx <= 0 || dy <= 0)
16961605         return;
16971606
16981607      /* window mode 1: just return and interrupt if we are within the window */
1699      if (WINDOW_CHECKING(tms) == 1 && !dst_is_linear)
1608      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
17001609      {
1701         CLR_V(tms);
1702         DADDR_XY(tms) = dstxy;
1703         DYDX_X(tms) = dx;
1704         DYDX_Y(tms) = dy;
1705         IOREG(tms, REG_INTPEND) |= TMS34010_WV;
1706         check_interrupt(tms);
1610         CLR_V();
1611         DADDR_XY() = dstxy;
1612         DYDX_X() = dx;
1613         DYDX_Y() = dy;
1614         IOREG(REG_INTPEND) |= TMS34010_WV;
1615         check_interrupt();
17071616         return;
17081617      }
17091618
r31176r31177
17171626         full_words /= PIXELS_PER_WORD;
17181627
17191628      /* compute cycles */
1720      tms->gfxcycles += compute_pixblt_b_cycles(left_partials, right_partials, full_words, dy, PIXEL_OP_TIMING, BITS_PER_PIXEL);
1721      tms->st |= STBIT_P;
1629      m_gfxcycles += compute_pixblt_b_cycles(left_partials, right_partials, full_words, dy, PIXEL_OP_TIMING, BITS_PER_PIXEL);
1630      m_st |= STBIT_P;
17221631
17231632      /* loop over rows */
17241633      for (y = 0; y < dy; y++)
r31176r31177
17311640         dwordaddr = daddr >> 4;
17321641
17331642         /* fetch the initial source word */
1734         srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1643         srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
17351644         srcmask = 1 << (saddr & 15);
17361645
17371646         /* handle the left partial word */
17381647         if (left_partials != 0)
17391648         {
17401649            /* fetch the destination word */
1741            dstword = (*word_read)(*tms->program, dwordaddr << 1);
1650            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
17421651            dstmask = PIXEL_MASK << (daddr & 15);
17431652
17441653            /* loop over partials */
17451654            for (x = 0; x < left_partials; x++)
17461655            {
17471656               /* process the pixel */
1748               pixel = (srcword & srcmask) ? COLOR1(tms) : COLOR0(tms);
1657               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
17491658               pixel &= dstmask;
17501659               PIXEL_OP(dstword, dstmask, pixel);
17511660               if (!TRANSPARENCY || pixel != 0)
r31176r31177
17551664               srcmask <<= 1;
17561665               if (srcmask == 0)
17571666               {
1758                  srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1667                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
17591668                  srcmask = 0x0001;
17601669               }
17611670
r31176r31177
17641673            }
17651674
17661675            /* write the result */
1767            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1676            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
17681677         }
17691678
17701679         /* loop over full words */
r31176r31177
17721681         {
17731682            /* fetch the destination word (if necessary) */
17741683            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1775               dstword = (*word_read)(*tms->program, dwordaddr << 1);
1684               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
17761685            else
17771686               dstword = 0;
17781687            dstmask = PIXEL_MASK;
r31176r31177
17811690            for (x = 0; x < PIXELS_PER_WORD; x++)
17821691            {
17831692               /* process the pixel */
1784               pixel = (srcword & srcmask) ? COLOR1(tms) : COLOR0(tms);
1693               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
17851694               pixel &= dstmask;
17861695               PIXEL_OP(dstword, dstmask, pixel);
17871696               if (!TRANSPARENCY || pixel != 0)
r31176r31177
17911700               srcmask <<= 1;
17921701               if (srcmask == 0)
17931702               {
1794                  srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1703                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
17951704                  srcmask = 0x0001;
17961705               }
17971706
r31176r31177
18001709            }
18011710
18021711            /* write the result */
1803            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1712            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
18041713         }
18051714
18061715         /* handle the right partial word */
18071716         if (right_partials != 0)
18081717         {
18091718            /* fetch the destination word */
1810            dstword = (*word_read)(*tms->program, dwordaddr << 1);
1719            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
18111720            dstmask = PIXEL_MASK;
18121721
18131722            /* loop over partials */
18141723            for (x = 0; x < right_partials; x++)
18151724            {
18161725               /* process the pixel */
1817               pixel = (srcword & srcmask) ? COLOR1(tms) : COLOR0(tms);
1726               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
18181727               pixel &= dstmask;
18191728               PIXEL_OP(dstword, dstmask, pixel);
18201729               if (!TRANSPARENCY || pixel != 0)
r31176r31177
18241733               srcmask <<= 1;
18251734               if (srcmask == 0)
18261735               {
1827                  srcword = (*word_read)(*tms->program, swordaddr++ << 1);
1736                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
18281737                  srcmask = 0x0001;
18291738               }
18301739
r31176r31177
18331742            }
18341743
18351744            /* write the result */
1836            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1745            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
18371746         }
18381747
18391748         /* update for next row */
1840         saddr += SPTCH(tms);
1841         daddr += DPTCH(tms);
1749         saddr += SPTCH();
1750         daddr += DPTCH();
18421751      }
1843      LOGGFX(("  (%d cycles)\n", tms->gfxcycles));
1752      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
18441753   }
18451754
18461755   /* eat cycles */
1847   if (tms->gfxcycles > tms->icount)
1756   if (m_gfxcycles > m_icount)
18481757   {
1849      tms->gfxcycles -= tms->icount;
1850      tms->icount = 0;
1851      tms->pc -= 0x10;
1758      m_gfxcycles -= m_icount;
1759      m_icount = 0;
1760      m_pc -= 0x10;
18521761   }
18531762   else
18541763   {
1855      tms->icount -= tms->gfxcycles;
1856      tms->st &= ~STBIT_P;
1857      SADDR(tms) += DYDX_Y(tms) * SPTCH(tms);
1764      m_icount -= m_gfxcycles;
1765      m_st &= ~STBIT_P;
1766      SADDR() += DYDX_Y() * SPTCH();
18581767      if (dst_is_linear)
1859         DADDR(tms) += DYDX_Y(tms) * DPTCH(tms);
1768         DADDR() += DYDX_Y() * DPTCH();
18601769      else
1861         DADDR_Y(tms) += DYDX_Y(tms);
1770         DADDR_Y() += DYDX_Y();
18621771   }
18631772}
18641773
1865static void FUNCTION_NAME(fill)(tms34010_state *tms, int dst_is_linear)
1774void FUNCTION_NAME(tms340x0_device::fill)(int dst_is_linear)
18661775{
18671776   /* if this is the first time through, perform the operation */
1868   if (!P_FLAG(tms))
1777   if (!P_FLAG())
18691778   {
18701779      int dx, dy, x, y, words, left_partials, right_partials, full_words;
1871      void (*word_write)(address_space &space,offs_t address,UINT16 data);
1872      UINT16 (*word_read)(address_space &space,offs_t address);
1780      word_write_func word_write;
1781      word_read_func word_read;
18731782      UINT32 daddr;
18741783      XY dstxy = { 0 };
18751784
18761785      /* determine read/write functions */
1877      if (IOREG(tms, REG_DPYCTL) & 0x0800)
1786      if (IOREG(REG_DPYCTL) & 0x0800)
18781787      {
1879         word_write = shiftreg_w;
1880         word_read = dummy_shiftreg_r;
1788         word_write = &tms340x0_device::shiftreg_w;
1789         word_read = &tms340x0_device::dummy_shiftreg_r;
18811790      }
18821791      else
18831792      {
1884         word_write = memory_w;
1885         word_read = memory_r;
1793         word_write = &tms340x0_device::memory_w;
1794         word_read = &tms340x0_device::memory_r;
18861795      }
18871796
18881797      /* compute the bounds of the operation */
1889      dx = (INT16)DYDX_X(tms);
1890      dy = (INT16)DYDX_Y(tms);
1798      dx = (INT16)DYDX_X();
1799      dy = (INT16)DYDX_Y();
18911800
18921801      /* apply the window for non-linear destinations */
1893      tms->gfxcycles = 4;
1802      m_gfxcycles = 4;
18941803      if (!dst_is_linear)
18951804      {
1896         dstxy = DADDR_XY(tms);
1897         tms->gfxcycles += 2 + apply_window(tms, "FILL", 0, NULL, &dstxy, &dx, &dy);
1898         daddr = DXYTOL(tms,dstxy);
1805         dstxy = DADDR_XY();
1806         m_gfxcycles += 2 + apply_window("FILL", 0, NULL, &dstxy, &dx, &dy);
1807         daddr = DXYTOL(dstxy);
18991808      }
19001809      else
1901         daddr = DADDR(tms);
1810         daddr = DADDR();
19021811      daddr &= ~(BITS_PER_PIXEL - 1);
19031812      LOGGFX(("  daddr=%08X\n", daddr));
19041813
r31176r31177
19071816         return;
19081817
19091818      /* window mode 1: just return and interrupt if we are within the window */
1910      if (WINDOW_CHECKING(tms) == 1 && !dst_is_linear)
1819      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
19111820      {
1912         CLR_V(tms);
1913         DADDR_XY(tms) = dstxy;
1914         DYDX_X(tms) = dx;
1915         DYDX_Y(tms) = dy;
1916         IOREG(tms, REG_INTPEND) |= TMS34010_WV;
1917         check_interrupt(tms);
1821         CLR_V();
1822         DADDR_XY() = dstxy;
1823         DYDX_X() = dx;
1824         DYDX_Y() = dy;
1825         IOREG(REG_INTPEND) |= TMS34010_WV;
1826         check_interrupt();
19181827         return;
19191828      }
19201829
r31176r31177
19281837         full_words /= PIXELS_PER_WORD;
19291838
19301839      /* compute cycles */
1931      tms->gfxcycles += 2;
1932      tms->st |= STBIT_P;
1840      m_gfxcycles += 2;
1841      m_st |= STBIT_P;
19331842
19341843      /* loop over rows */
19351844      for (y = 0; y < dy; y++)
r31176r31177
19411850         dwordaddr = daddr >> 4;
19421851
19431852         /* compute cycles */
1944         tms->gfxcycles += compute_fill_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1853         m_gfxcycles += compute_fill_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
19451854
19461855         /* handle the left partial word */
19471856         if (left_partials != 0)
19481857         {
19491858            /* fetch the destination word */
1950            dstword = (*word_read)(*tms->program, dwordaddr << 1);
1859            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
19511860            dstmask = PIXEL_MASK << (daddr & 15);
19521861
19531862            /* loop over partials */
19541863            for (x = 0; x < left_partials; x++)
19551864            {
19561865               /* process the pixel */
1957               pixel = COLOR1(tms) & dstmask;
1866               pixel = COLOR1() & dstmask;
19581867               PIXEL_OP(dstword, dstmask, pixel);
19591868               if (!TRANSPARENCY || pixel != 0)
19601869                  dstword = (dstword & ~dstmask) | pixel;
r31176r31177
19641873            }
19651874
19661875            /* write the result */
1967            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1876            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
19681877         }
19691878
19701879         /* loop over full words */
r31176r31177
19721881         {
19731882            /* fetch the destination word (if necessary) */
19741883            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1975               dstword = (*word_read)(*tms->program, dwordaddr << 1);
1884               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
19761885            else
19771886               dstword = 0;
19781887            dstmask = PIXEL_MASK;
r31176r31177
19811890            for (x = 0; x < PIXELS_PER_WORD; x++)
19821891            {
19831892               /* process the pixel */
1984               pixel = COLOR1(tms) & dstmask;
1893               pixel = COLOR1() & dstmask;
19851894               PIXEL_OP(dstword, dstmask, pixel);
19861895               if (!TRANSPARENCY || pixel != 0)
19871896                  dstword = (dstword & ~dstmask) | pixel;
r31176r31177
19911900            }
19921901
19931902            /* write the result */
1994            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1903            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
19951904         }
19961905
19971906         /* handle the right partial word */
19981907         if (right_partials != 0)
19991908         {
20001909            /* fetch the destination word */
2001            dstword = (*word_read)(*tms->program, dwordaddr << 1);
1910            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
20021911            dstmask = PIXEL_MASK;
20031912
20041913            /* loop over partials */
20051914            for (x = 0; x < right_partials; x++)
20061915            {
20071916               /* process the pixel */
2008               pixel = COLOR1(tms) & dstmask;
1917               pixel = COLOR1() & dstmask;
20091918               PIXEL_OP(dstword, dstmask, pixel);
20101919               if (!TRANSPARENCY || pixel != 0)
20111920                  dstword = (dstword & ~dstmask) | pixel;
r31176r31177
20151924            }
20161925
20171926            /* write the result */
2018            (*word_write)(*tms->program, dwordaddr++ << 1, dstword);
1927            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
20191928         }
20201929
20211930         /* update for next row */
2022         daddr += DPTCH(tms);
1931         daddr += DPTCH();
20231932      }
20241933
2025      LOGGFX(("  (%d cycles)\n", tms->gfxcycles));
1934      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
20261935   }
20271936
20281937   /* eat cycles */
2029   if (tms->gfxcycles > tms->icount)
1938   if (m_gfxcycles > m_icount)
20301939   {
2031      tms->gfxcycles -= tms->icount;
2032      tms->icount = 0;
2033      tms->pc -= 0x10;
1940      m_gfxcycles -= m_icount;
1941      m_icount = 0;
1942      m_pc -= 0x10;
20341943   }
20351944   else
20361945   {
2037      tms->icount -= tms->gfxcycles;
2038      tms->st &= ~STBIT_P;
1946      m_icount -= m_gfxcycles;
1947      m_st &= ~STBIT_P;
20391948      if (dst_is_linear)
2040         DADDR(tms) += DYDX_Y(tms) * DPTCH(tms);
1949         DADDR() += DYDX_Y() * DPTCH();
20411950      else
2042         DADDR_Y(tms) += DYDX_Y(tms);
1951         DADDR_Y() += DYDX_Y();
20431952   }
20441953}
20451954
trunk/src/emu/cpu/tms34010/34010fld.c
r31176r31177
1313    FIELD WRITE FUNCTIONS
1414***************************************************************************/
1515
16static void wfield_01(tms34010_state *tms, offs_t offset, UINT32 data)
16void tms340x0_device::wfield_01(offs_t offset, UINT32 data)
1717{
18   WFIELDMAC(tms,0x01,16);
18   WFIELDMAC(0x01,16);
1919}
2020
21static void wfield_02(tms34010_state *tms, offs_t offset, UINT32 data)
21void tms340x0_device::wfield_02(offs_t offset, UINT32 data)
2222{
23   WFIELDMAC(tms,0x03,15);
23   WFIELDMAC(0x03,15);
2424}
2525
26static void wfield_03(tms34010_state *tms, offs_t offset, UINT32 data)
26void tms340x0_device::wfield_03(offs_t offset, UINT32 data)
2727{
28   WFIELDMAC(tms,0x07,14);
28   WFIELDMAC(0x07,14);
2929}
3030
31static void wfield_04(tms34010_state *tms, offs_t offset, UINT32 data)
31void tms340x0_device::wfield_04(offs_t offset, UINT32 data)
3232{
33   WFIELDMAC(tms,0x0f,13);
33   WFIELDMAC(0x0f,13);
3434}
3535
36static void wfield_05(tms34010_state *tms, offs_t offset, UINT32 data)
36void tms340x0_device::wfield_05(offs_t offset, UINT32 data)
3737{
38   WFIELDMAC(tms,0x1f,12);
38   WFIELDMAC(0x1f,12);
3939}
4040
41static void wfield_06(tms34010_state *tms, offs_t offset, UINT32 data)
41void tms340x0_device::wfield_06(offs_t offset, UINT32 data)
4242{
43   WFIELDMAC(tms,0x3f,11);
43   WFIELDMAC(0x3f,11);
4444}
4545
46static void wfield_07(tms34010_state *tms, offs_t offset, UINT32 data)
46void tms340x0_device::wfield_07(offs_t offset, UINT32 data)
4747{
48   WFIELDMAC(tms,0x7f,10);
48   WFIELDMAC(0x7f,10);
4949}
5050
51static void wfield_08(tms34010_state *tms, offs_t offset, UINT32 data)
51void tms340x0_device::wfield_08(offs_t offset, UINT32 data)
5252{
53   WFIELDMAC_8(tms);
53   WFIELDMAC_8();
5454}
5555
56static void wfield_09(tms34010_state *tms, offs_t offset, UINT32 data)
56void tms340x0_device::wfield_09(offs_t offset, UINT32 data)
5757{
58   WFIELDMAC(tms,0x1ff,8);
58   WFIELDMAC(0x1ff,8);
5959}
6060
61static void wfield_10(tms34010_state *tms, offs_t offset, UINT32 data)
61void tms340x0_device::wfield_10(offs_t offset, UINT32 data)
6262{
63   WFIELDMAC(tms,0x3ff,7);
63   WFIELDMAC(0x3ff,7);
6464}
6565
66static void wfield_11(tms34010_state *tms, offs_t offset, UINT32 data)
66void tms340x0_device::wfield_11(offs_t offset, UINT32 data)
6767{
68   WFIELDMAC(tms,0x7ff,6);
68   WFIELDMAC(0x7ff,6);
6969}
7070
71static void wfield_12(tms34010_state *tms, offs_t offset, UINT32 data)
71void tms340x0_device::wfield_12(offs_t offset, UINT32 data)
7272{
73   WFIELDMAC(tms,0xfff,5);
73   WFIELDMAC(0xfff,5);
7474}
7575
76static void wfield_13(tms34010_state *tms, offs_t offset, UINT32 data)
76void tms340x0_device::wfield_13(offs_t offset, UINT32 data)
7777{
78   WFIELDMAC(tms,0x1fff,4);
78   WFIELDMAC(0x1fff,4);
7979}
8080
81static void wfield_14(tms34010_state *tms, offs_t offset, UINT32 data)
81void tms340x0_device::wfield_14(offs_t offset, UINT32 data)
8282{
83   WFIELDMAC(tms,0x3fff,3);
83   WFIELDMAC(0x3fff,3);
8484}
8585
86static void wfield_15(tms34010_state *tms, offs_t offset, UINT32 data)
86void tms340x0_device::wfield_15(offs_t offset, UINT32 data)
8787{
88   WFIELDMAC(tms,0x7fff,2);
88   WFIELDMAC(0x7fff,2);
8989}
9090
91static void wfield_16(tms34010_state *tms, offs_t offset, UINT32 data)
91void tms340x0_device::wfield_16(offs_t offset, UINT32 data)
9292{
9393   if (offset & 0x0f)
9494   {
95      WFIELDMAC(tms,0xffff,1);
95      WFIELDMAC(0xffff,1);
9696   }
9797   else
9898   {
99      TMS34010_WRMEM_WORD(tms,TOBYTE(offset),data);
99      TMS34010_WRMEM_WORD(TOBYTE(offset),data);
100100   }
101101}
102102
103static void wfield_17(tms34010_state *tms, offs_t offset, UINT32 data)
103void tms340x0_device::wfield_17(offs_t offset, UINT32 data)
104104{
105   WFIELDMAC(tms,0x1ffff,0);
105   WFIELDMAC(0x1ffff,0);
106106}
107107
108static void wfield_18(tms34010_state *tms, offs_t offset, UINT32 data)
108void tms340x0_device::wfield_18(offs_t offset, UINT32 data)
109109{
110   WFIELDMAC_BIG(tms,0x3ffff,15);
110   WFIELDMAC_BIG(0x3ffff,15);
111111}
112112
113static void wfield_19(tms34010_state *tms, offs_t offset, UINT32 data)
113void tms340x0_device::wfield_19(offs_t offset, UINT32 data)
114114{
115   WFIELDMAC_BIG(tms,0x7ffff,14);
115   WFIELDMAC_BIG(0x7ffff,14);
116116}
117117
118static void wfield_20(tms34010_state *tms, offs_t offset, UINT32 data)
118void tms340x0_device::wfield_20(offs_t offset, UINT32 data)
119119{
120   WFIELDMAC_BIG(tms,0xfffff,13);
120   WFIELDMAC_BIG(0xfffff,13);
121121}
122122
123static void wfield_21(tms34010_state *tms, offs_t offset, UINT32 data)
123void tms340x0_device::wfield_21(offs_t offset, UINT32 data)
124124{
125   WFIELDMAC_BIG(tms,0x1fffff,12);
125   WFIELDMAC_BIG(0x1fffff,12);
126126}
127127
128static void wfield_22(tms34010_state *tms, offs_t offset, UINT32 data)
128void tms340x0_device::wfield_22(offs_t offset, UINT32 data)
129129{
130   WFIELDMAC_BIG(tms,0x3fffff,11);
130   WFIELDMAC_BIG(0x3fffff,11);
131131}
132132
133static void wfield_23(tms34010_state *tms, offs_t offset, UINT32 data)
133void tms340x0_device::wfield_23(offs_t offset, UINT32 data)
134134{
135   WFIELDMAC_BIG(tms,0x7fffff,10);
135   WFIELDMAC_BIG(0x7fffff,10);
136136}
137137
138static void wfield_24(tms34010_state *tms, offs_t offset, UINT32 data)
138void tms340x0_device::wfield_24(offs_t offset, UINT32 data)
139139{
140   WFIELDMAC_BIG(tms,0xffffff,9);
140   WFIELDMAC_BIG(0xffffff,9);
141141}
142142
143static void wfield_25(tms34010_state *tms, offs_t offset, UINT32 data)
143void tms340x0_device::wfield_25(offs_t offset, UINT32 data)
144144{
145   WFIELDMAC_BIG(tms,0x1ffffff,8);
145   WFIELDMAC_BIG(0x1ffffff,8);
146146}
147147
148static void wfield_26(tms34010_state *tms, offs_t offset, UINT32 data)
148void tms340x0_device::wfield_26(offs_t offset, UINT32 data)
149149{
150   WFIELDMAC_BIG(tms,0x3ffffff,7);
150   WFIELDMAC_BIG(0x3ffffff,7);
151151}
152152
153static void wfield_27(tms34010_state *tms, offs_t offset, UINT32 data)
153void tms340x0_device::wfield_27(offs_t offset, UINT32 data)
154154{
155   WFIELDMAC_BIG(tms,0x7ffffff,6);
155   WFIELDMAC_BIG(0x7ffffff,6);
156156}
157157
158static void wfield_28(tms34010_state *tms, offs_t offset, UINT32 data)
158void tms340x0_device::wfield_28(offs_t offset, UINT32 data)
159159{
160   WFIELDMAC_BIG(tms,0xfffffff,5);
160   WFIELDMAC_BIG(0xfffffff,5);
161161}
162162
163static void wfield_29(tms34010_state *tms, offs_t offset, UINT32 data)
163void tms340x0_device::wfield_29(offs_t offset, UINT32 data)
164164{
165   WFIELDMAC_BIG(tms,0x1fffffff,4);
165   WFIELDMAC_BIG(0x1fffffff,4);
166166}
167167
168static void wfield_30(tms34010_state *tms, offs_t offset, UINT32 data)
168void tms340x0_device::wfield_30(offs_t offset, UINT32 data)
169169{
170   WFIELDMAC_BIG(tms,0x3fffffff,3);
170   WFIELDMAC_BIG(0x3fffffff,3);
171171}
172172
173static void wfield_31(tms34010_state *tms, offs_t offset, UINT32 data)
173void tms340x0_device::wfield_31(offs_t offset, UINT32 data)
174174{
175   WFIELDMAC_BIG(tms,0x7fffffff,2);
175   WFIELDMAC_BIG(0x7fffffff,2);
176176}
177177
178static void wfield_32(tms34010_state *tms, offs_t offset, UINT32 data)
178void tms340x0_device::wfield_32(offs_t offset, UINT32 data)
179179{
180   WFIELDMAC_32(tms);
180   WFIELDMAC_32();
181181}
182182
183183
184static void (*const tms34010_wfield_functions[32])(tms34010_state *tms, offs_t offset, UINT32 data) =
184const tms340x0_device::wfield_func tms340x0_device::s_wfield_functions[32] =
185185{
186   wfield_32, wfield_01, wfield_02, wfield_03, wfield_04, wfield_05,
187   wfield_06, wfield_07, wfield_08, wfield_09, wfield_10, wfield_11,
188   wfield_12, wfield_13, wfield_14, wfield_15, wfield_16, wfield_17,
189   wfield_18, wfield_19, wfield_20, wfield_21, wfield_22, wfield_23,
190   wfield_24, wfield_25, wfield_26, wfield_27, wfield_28, wfield_29,
191   wfield_30, wfield_31
186   &tms340x0_device::wfield_32, &tms340x0_device::wfield_01, &tms340x0_device::wfield_02, &tms340x0_device::wfield_03, &tms340x0_device::wfield_04, &tms340x0_device::wfield_05,
187   &tms340x0_device::wfield_06, &tms340x0_device::wfield_07, &tms340x0_device::wfield_08, &tms340x0_device::wfield_09, &tms340x0_device::wfield_10, &tms340x0_device::wfield_11,
188   &tms340x0_device::wfield_12, &tms340x0_device::wfield_13, &tms340x0_device::wfield_14, &tms340x0_device::wfield_15, &tms340x0_device::wfield_16, &tms340x0_device::wfield_17,
189   &tms340x0_device::wfield_18, &tms340x0_device::wfield_19, &tms340x0_device::wfield_20, &tms340x0_device::wfield_21, &tms340x0_device::wfield_22, &tms340x0_device::wfield_23,
190   &tms340x0_device::wfield_24, &tms340x0_device::wfield_25, &tms340x0_device::wfield_26, &tms340x0_device::wfield_27, &tms340x0_device::wfield_28, &tms340x0_device::wfield_29,
191   &tms340x0_device::wfield_30, &tms340x0_device::wfield_31
192192};
193193
194194
r31176r31177
197197    FIELD READ FUNCTIONS (ZERO-EXTEND)
198198***************************************************************************/
199199
200static UINT32 rfield_z_01(tms34010_state *tms, offs_t offset)
200UINT32 tms340x0_device::rfield_z_01(offs_t offset)
201201{
202202   UINT32 ret;
203   RFIELDMAC(tms,0x01,16);
203   RFIELDMAC(0x01,16);
204204   return ret;
205205}
206206
207static UINT32 rfield_z_02(tms34010_state *tms, offs_t offset)
207UINT32 tms340x0_device::rfield_z_02(offs_t offset)
208208{
209209   UINT32 ret;
210   RFIELDMAC(tms,0x03,15);
210   RFIELDMAC(0x03,15);
211211   return ret;
212212}
213213
214static UINT32 rfield_z_03(tms34010_state *tms, offs_t offset)
214UINT32 tms340x0_device::rfield_z_03(offs_t offset)
215215{
216216   UINT32 ret;
217   RFIELDMAC(tms,0x07,14);
217   RFIELDMAC(0x07,14);
218218   return ret;
219219}
220220
221static UINT32 rfield_z_04(tms34010_state *tms, offs_t offset)
221UINT32 tms340x0_device::rfield_z_04(offs_t offset)
222222{
223223   UINT32 ret;
224   RFIELDMAC(tms,0x0f,13);
224   RFIELDMAC(0x0f,13);
225225   return ret;
226226}
227227
228static UINT32 rfield_z_05(tms34010_state *tms, offs_t offset)
228UINT32 tms340x0_device::rfield_z_05(offs_t offset)
229229{
230230   UINT32 ret;
231   RFIELDMAC(tms,0x1f,12);
231   RFIELDMAC(0x1f,12);
232232   return ret;
233233}
234234
235static UINT32 rfield_z_06(tms34010_state *tms, offs_t offset)
235UINT32 tms340x0_device::rfield_z_06(offs_t offset)
236236{
237237   UINT32 ret;
238   RFIELDMAC(tms,0x3f,11);
238   RFIELDMAC(0x3f,11);
239239   return ret;
240240}
241241
242static UINT32 rfield_z_07(tms34010_state *tms, offs_t offset)
242UINT32 tms340x0_device::rfield_z_07(offs_t offset)
243243{
244244   UINT32 ret;
245   RFIELDMAC(tms,0x7f,10);
245   RFIELDMAC(0x7f,10);
246246   return ret;
247247}
248248
249static UINT32 rfield_z_08(tms34010_state *tms, offs_t offset)
249UINT32 tms340x0_device::rfield_z_08(offs_t offset)
250250{
251251   UINT32 ret;
252   RFIELDMAC_8(tms);
252   RFIELDMAC_8();
253253   return ret;
254254}
255255
256static UINT32 rfield_z_09(tms34010_state *tms, offs_t offset)
256UINT32 tms340x0_device::rfield_z_09(offs_t offset)
257257{
258258   UINT32 ret;
259   RFIELDMAC(tms,0x1ff,8);
259   RFIELDMAC(0x1ff,8);
260260   return ret;
261261}
262262
263static UINT32 rfield_z_10(tms34010_state *tms, offs_t offset)
263UINT32 tms340x0_device::rfield_z_10(offs_t offset)
264264{
265265   UINT32 ret;
266   RFIELDMAC(tms,0x3ff,7);
266   RFIELDMAC(0x3ff,7);
267267   return ret;
268268}
269269
270static UINT32 rfield_z_11(tms34010_state *tms, offs_t offset)
270UINT32 tms340x0_device::rfield_z_11(offs_t offset)
271271{
272272   UINT32 ret;
273   RFIELDMAC(tms,0x7ff,6);
273   RFIELDMAC(0x7ff,6);
274274   return ret;
275275}
276276
277static UINT32 rfield_z_12(tms34010_state *tms, offs_t offset)
277UINT32 tms340x0_device::rfield_z_12(offs_t offset)
278278{
279279   UINT32 ret;
280   RFIELDMAC(tms,0xfff,5);
280   RFIELDMAC(0xfff,5);
281281   return ret;
282282}
283283
284static UINT32 rfield_z_13(tms34010_state *tms, offs_t offset)
284UINT32 tms340x0_device::rfield_z_13(offs_t offset)
285285{
286286   UINT32 ret;
287   RFIELDMAC(tms,0x1fff,4);
287   RFIELDMAC(0x1fff,4);
288288   return ret;
289289}
290290
291static UINT32 rfield_z_14(tms34010_state *tms, offs_t offset)
291UINT32 tms340x0_device::rfield_z_14(offs_t offset)
292292{
293293   UINT32 ret;
294   RFIELDMAC(tms,0x3fff,3);
294   RFIELDMAC(0x3fff,3);
295295   return ret;
296296}
297297
298static UINT32 rfield_z_15(tms34010_state *tms, offs_t offset)
298UINT32 tms340x0_device::rfield_z_15(offs_t offset)
299299{
300300   UINT32 ret;
301   RFIELDMAC(tms,0x7fff,2);
301   RFIELDMAC(0x7fff,2);
302302   return ret;
303303}
304304
305static UINT32 rfield_z_16(tms34010_state *tms, offs_t offset)
305UINT32 tms340x0_device::rfield_z_16(offs_t offset)
306306{
307307   UINT32 ret;
308308   if (offset & 0x0f)
309309   {
310      RFIELDMAC(tms,0xffff,1);
310      RFIELDMAC(0xffff,1);
311311   }
312312
313313   else
314      ret = TMS34010_RDMEM_WORD(tms,TOBYTE(offset));
314      ret = TMS34010_RDMEM_WORD(TOBYTE(offset));
315315   return ret;
316316}
317317
318static UINT32 rfield_z_17(tms34010_state *tms, offs_t offset)
318UINT32 tms340x0_device::rfield_z_17(offs_t offset)
319319{
320320   UINT32 ret;
321   RFIELDMAC(tms,0x1ffff,0);
321   RFIELDMAC(0x1ffff,0);
322322   return ret;
323323}
324324
325static UINT32 rfield_z_18(tms34010_state *tms, offs_t offset)
325UINT32 tms340x0_device::rfield_z_18(offs_t offset)
326326{
327327   UINT32 ret;
328   RFIELDMAC_BIG(tms,0x3ffff,15);
328   RFIELDMAC_BIG(0x3ffff,15);
329329   return ret;
330330}
331331
332static UINT32 rfield_z_19(tms34010_state *tms, offs_t offset)
332UINT32 tms340x0_device::rfield_z_19(offs_t offset)
333333{
334334   UINT32 ret;
335   RFIELDMAC_BIG(tms,0x7ffff,14);
335   RFIELDMAC_BIG(0x7ffff,14);
336336   return ret;
337337}
338338
339static UINT32 rfield_z_20(tms34010_state *tms, offs_t offset)
339UINT32 tms340x0_device::rfield_z_20(offs_t offset)
340340{
341341   UINT32 ret;
342   RFIELDMAC_BIG(tms,0xfffff,13);
342   RFIELDMAC_BIG(0xfffff,13);
343343   return ret;
344344}
345345
346static UINT32 rfield_z_21(tms34010_state *tms, offs_t offset)
346UINT32 tms340x0_device::rfield_z_21(offs_t offset)
347347{
348348   UINT32 ret;
349   RFIELDMAC_BIG(tms,0x1fffff,12);
349   RFIELDMAC_BIG(0x1fffff,12);
350350   return ret;
351351}
352352
353static UINT32 rfield_z_22(tms34010_state *tms, offs_t offset)
353UINT32 tms340x0_device::rfield_z_22(offs_t offset)
354354{
355355   UINT32 ret;
356   RFIELDMAC_BIG(tms,0x3fffff,11);
356   RFIELDMAC_BIG(0x3fffff,11);
357357   return ret;
358358}
359359
360static UINT32 rfield_z_23(tms34010_state *tms, offs_t offset)
360UINT32 tms340x0_device::rfield_z_23(offs_t offset)
361361{
362362   UINT32 ret;
363   RFIELDMAC_BIG(tms,0x7fffff,10);
363   RFIELDMAC_BIG(0x7fffff,10);
364364   return ret;
365365}
366366
367static UINT32 rfield_z_24(tms34010_state *tms, offs_t offset)
367UINT32 tms340x0_device::rfield_z_24(offs_t offset)
368368{
369369   UINT32 ret;
370   RFIELDMAC_BIG(tms,0xffffff,9);
370   RFIELDMAC_BIG(0xffffff,9);
371371   return ret;
372372}
373373
374static UINT32 rfield_z_25(tms34010_state *tms, offs_t offset)
374UINT32 tms340x0_device::rfield_z_25(offs_t offset)
375375{
376376   UINT32 ret;
377   RFIELDMAC_BIG(tms,0x1ffffff,8);
377   RFIELDMAC_BIG(0x1ffffff,8);
378378   return ret;
379379}
380380
381static UINT32 rfield_z_26(tms34010_state *tms, offs_t offset)
381UINT32 tms340x0_device::rfield_z_26(offs_t offset)
382382{
383383   UINT32 ret;
384   RFIELDMAC_BIG(tms,0x3ffffff,7);
384   RFIELDMAC_BIG(0x3ffffff,7);
385385   return ret;
386386}
387387
388static UINT32 rfield_z_27(tms34010_state *tms, offs_t offset)
388UINT32 tms340x0_device::rfield_z_27(offs_t offset)
389389{
390390   UINT32 ret;
391   RFIELDMAC_BIG(tms,0x7ffffff,6);
391   RFIELDMAC_BIG(0x7ffffff,6);
392392   return ret;
393393}
394394
395static UINT32 rfield_z_28(tms34010_state *tms, offs_t offset)
395UINT32 tms340x0_device::rfield_z_28(offs_t offset)
396396{
397397   UINT32 ret;
398   RFIELDMAC_BIG(tms,0xfffffff,5);
398   RFIELDMAC_BIG(0xfffffff,5);
399399   return ret;
400400}
401401
402static UINT32 rfield_z_29(tms34010_state *tms, offs_t offset)
402UINT32 tms340x0_device::rfield_z_29(offs_t offset)
403403{
404404   UINT32 ret;
405   RFIELDMAC_BIG(tms,0x1fffffff,4);
405   RFIELDMAC_BIG(0x1fffffff,4);
406406   return ret;
407407}
408408
409static UINT32 rfield_z_30(tms34010_state *tms, offs_t offset)
409UINT32 tms340x0_device::rfield_z_30(offs_t offset)
410410{
411411   UINT32 ret;
412   RFIELDMAC_BIG(tms,0x3fffffff,3);
412   RFIELDMAC_BIG(0x3fffffff,3);
413413   return ret;
414414}
415415
416static UINT32 rfield_z_31(tms34010_state *tms, offs_t offset)
416UINT32 tms340x0_device::rfield_z_31(offs_t offset)
417417{
418418   UINT32 ret;
419   RFIELDMAC_BIG(tms,0x7fffffff,2);
419   RFIELDMAC_BIG(0x7fffffff,2);
420420   return ret;
421421}
422422
423static UINT32 rfield_32(tms34010_state *tms, offs_t offset)
423UINT32 tms340x0_device::rfield_32(offs_t offset)
424424{
425   RFIELDMAC_32(tms);
425   RFIELDMAC_32();
426426}
427427
428428
r31176r31177
430430    FIELD READ FUNCTIONS (SIGN-EXTEND)
431431***************************************************************************/
432432
433static UINT32 rfield_s_01(tms34010_state *tms, offs_t offset)
433UINT32 tms340x0_device::rfield_s_01(offs_t offset)
434434{
435435   UINT32 ret;
436   RFIELDMAC(tms,0x01,16);
436   RFIELDMAC(0x01,16);
437437   return ((INT32)(ret << 31)) >> 31;
438438}
439439
440static UINT32 rfield_s_02(tms34010_state *tms, offs_t offset)
440UINT32 tms340x0_device::rfield_s_02(offs_t offset)
441441{
442442   UINT32 ret;
443   RFIELDMAC(tms,0x03,15);
443   RFIELDMAC(0x03,15);
444444   return ((INT32)(ret << 30)) >> 30;
445445}
446446
447static UINT32 rfield_s_03(tms34010_state *tms, offs_t offset)
447UINT32 tms340x0_device::rfield_s_03(offs_t offset)
448448{
449449   UINT32 ret;
450   RFIELDMAC(tms,0x07,14);
450   RFIELDMAC(0x07,14);
451451   return ((INT32)(ret << 29)) >> 29;
452452}
453453
454static UINT32 rfield_s_04(tms34010_state *tms, offs_t offset)
454UINT32 tms340x0_device::rfield_s_04(offs_t offset)
455455{
456456   UINT32 ret;
457   RFIELDMAC(tms,0x0f,13);
457   RFIELDMAC(0x0f,13);
458458   return ((INT32)(ret << 28)) >> 28;
459459}
460460
461static UINT32 rfield_s_05(tms34010_state *tms, offs_t offset)
461UINT32 tms340x0_device::rfield_s_05(offs_t offset)
462462{
463463   UINT32 ret;
464   RFIELDMAC(tms,0x1f,12);
464   RFIELDMAC(0x1f,12);
465465   return ((INT32)(ret << 27)) >> 27;
466466}
467467
468static UINT32 rfield_s_06(tms34010_state *tms, offs_t offset)
468UINT32 tms340x0_device::rfield_s_06(offs_t offset)
469469{
470470   UINT32 ret;
471   RFIELDMAC(tms,0x3f,11);
471   RFIELDMAC(0x3f,11);
472472   return ((INT32)(ret << 26)) >> 26;
473473}
474474
475static UINT32 rfield_s_07(tms34010_state *tms, offs_t offset)
475UINT32 tms340x0_device::rfield_s_07(offs_t offset)
476476{
477477   UINT32 ret;
478   RFIELDMAC(tms,0x7f,10);
478   RFIELDMAC(0x7f,10);
479479   return ((INT32)(ret << 25)) >> 25;
480480}
481481
482static UINT32 rfield_s_08(tms34010_state *tms, offs_t offset)
482UINT32 tms340x0_device::rfield_s_08(offs_t offset)
483483{
484484   UINT32 ret;
485485   if (offset & 0x07)
486486   {
487      RFIELDMAC(tms,0xff,9);
487      RFIELDMAC(0xff,9);
488488   }
489489
490490   else
491      ret = TMS34010_RDMEM(tms,TOBYTE(offset));
491      ret = TMS34010_RDMEM(TOBYTE(offset));
492492   return (INT32)(INT8)ret;
493493}
494494
495static UINT32 rfield_s_09(tms34010_state *tms, offs_t offset)
495UINT32 tms340x0_device::rfield_s_09(offs_t offset)
496496{
497497   UINT32 ret;
498   RFIELDMAC(tms,0x1ff,8);
498   RFIELDMAC(0x1ff,8);
499499   return ((INT32)(ret << 23)) >> 23;
500500}
501501
502static UINT32 rfield_s_10(tms34010_state *tms, offs_t offset)
502UINT32 tms340x0_device::rfield_s_10(offs_t offset)
503503{
504504   UINT32 ret;
505   RFIELDMAC(tms,0x3ff,7);
505   RFIELDMAC(0x3ff,7);
506506   return ((INT32)(ret << 22)) >> 22;
507507}
508508
509static UINT32 rfield_s_11(tms34010_state *tms, offs_t offset)
509UINT32 tms340x0_device::rfield_s_11(offs_t offset)
510510{
511511   UINT32 ret;
512   RFIELDMAC(tms,0x7ff,6);
512   RFIELDMAC(0x7ff,6);
513513   return ((INT32)(ret << 21)) >> 21;
514514}
515515
516static UINT32 rfield_s_12(tms34010_state *tms, offs_t offset)
516UINT32 tms340x0_device::rfield_s_12(offs_t offset)
517517{
518518   UINT32 ret;
519   RFIELDMAC(tms,0xfff,5);
519   RFIELDMAC(0xfff,5);
520520   return ((INT32)(ret << 20)) >> 20;
521521}
522522
523static UINT32 rfield_s_13(tms34010_state *tms, offs_t offset)
523UINT32 tms340x0_device::rfield_s_13(offs_t offset)
524524{
525525   UINT32 ret;
526   RFIELDMAC(tms,0x1fff,4);
526   RFIELDMAC(0x1fff,4);
527527   return ((INT32)(ret << 19)) >> 19;
528528}
529529
530static UINT32 rfield_s_14(tms34010_state *tms, offs_t offset)
530UINT32 tms340x0_device::rfield_s_14(offs_t offset)
531531{
532532   UINT32 ret;
533   RFIELDMAC(tms,0x3fff,3);
533   RFIELDMAC(0x3fff,3);
534534   return ((INT32)(ret << 18)) >> 18;
535535}
536536
537static UINT32 rfield_s_15(tms34010_state *tms, offs_t offset)
537UINT32 tms340x0_device::rfield_s_15(offs_t offset)
538538{
539539   UINT32 ret;
540   RFIELDMAC(tms,0x7fff,2);
540   RFIELDMAC(0x7fff,2);
541541   return ((INT32)(ret << 17)) >> 17;
542542}
543543
544static UINT32 rfield_s_16(tms34010_state *tms, offs_t offset)
544UINT32 tms340x0_device::rfield_s_16(offs_t offset)
545545{
546546   UINT32 ret;
547547   if (offset & 0x0f)
548548   {
549      RFIELDMAC(tms,0xffff,1);
549      RFIELDMAC(0xffff,1);
550550   }
551551
552552   else
553553   {
554      ret = TMS34010_RDMEM_WORD(tms,TOBYTE(offset));
554      ret = TMS34010_RDMEM_WORD(TOBYTE(offset));
555555   }
556556
557557   return (INT32)(INT16)ret;
558558}
559559
560static UINT32 rfield_s_17(tms34010_state *tms, offs_t offset)
560UINT32 tms340x0_device::rfield_s_17(offs_t offset)
561561{
562562   UINT32 ret;
563   RFIELDMAC(tms,0x1ffff,0);
563   RFIELDMAC(0x1ffff,0);
564564   return ((INT32)(ret << 15)) >> 15;
565565}
566566
567static UINT32 rfield_s_18(tms34010_state *tms, offs_t offset)
567UINT32 tms340x0_device::rfield_s_18(offs_t offset)
568568{
569569   UINT32 ret;
570   RFIELDMAC_BIG(tms,0x3ffff,15);
570   RFIELDMAC_BIG(0x3ffff,15);
571571   return ((INT32)(ret << 14)) >> 14;
572572}
573573
574static UINT32 rfield_s_19(tms34010_state *tms, offs_t offset)
574UINT32 tms340x0_device::rfield_s_19(offs_t offset)
575575{
576576   UINT32 ret;
577   RFIELDMAC_BIG(tms,0x7ffff,14);
577   RFIELDMAC_BIG(0x7ffff,14);
578578   return ((INT32)(ret << 13)) >> 13;
579579}
580580
581static UINT32 rfield_s_20(tms34010_state *tms, offs_t offset)
581UINT32 tms340x0_device::rfield_s_20(offs_t offset)
582582{
583583   UINT32 ret;
584   RFIELDMAC_BIG(tms,0xfffff,13);
584   RFIELDMAC_BIG(0xfffff,13);
585585   return ((INT32)(ret << 12)) >> 12;
586586}
587587
588static UINT32 rfield_s_21(tms34010_state *tms, offs_t offset)
588UINT32 tms340x0_device::rfield_s_21(offs_t offset)
589589{
590590   UINT32 ret;
591   RFIELDMAC_BIG(tms,0x1fffff,12);
591   RFIELDMAC_BIG(0x1fffff,12);
592592   return ((INT32)(ret << 11)) >> 11;
593593}
594594
595static UINT32 rfield_s_22(tms34010_state *tms, offs_t offset)
595UINT32 tms340x0_device::rfield_s_22(offs_t offset)
596596{
597597   UINT32 ret;
598   RFIELDMAC_BIG(tms,0x3fffff,11);
598   RFIELDMAC_BIG(0x3fffff,11);
599599   return ((INT32)(ret << 10)) >> 10;
600600}
601601
602static UINT32 rfield_s_23(tms34010_state *tms, offs_t offset)
602UINT32 tms340x0_device::rfield_s_23(offs_t offset)
603603{
604604   UINT32 ret;
605   RFIELDMAC_BIG(tms,0x7fffff,10);
605   RFIELDMAC_BIG(0x7fffff,10);
606606   return ((INT32)(ret << 9)) >> 9;
607607}
608608
609static UINT32 rfield_s_24(tms34010_state *tms, offs_t offset)
609UINT32 tms340x0_device::rfield_s_24(offs_t offset)
610610{
611611   UINT32 ret;
612   RFIELDMAC_BIG(tms,0xffffff,9);
612   RFIELDMAC_BIG(0xffffff,9);
613613   return ((INT32)(ret << 8)) >> 8;
614614}
615615
616static UINT32 rfield_s_25(tms34010_state *tms, offs_t offset)
616UINT32 tms340x0_device::rfield_s_25(offs_t offset)
617617{
618618   UINT32 ret;
619   RFIELDMAC_BIG(tms,0x1ffffff,8);
619   RFIELDMAC_BIG(0x1ffffff,8);
620620   return ((INT32)(ret << 7)) >> 7;
621621}
622622
623static UINT32 rfield_s_26(tms34010_state *tms, offs_t offset)
623UINT32 tms340x0_device::rfield_s_26(offs_t offset)
624624{
625625   UINT32 ret;
626   RFIELDMAC_BIG(tms,0x3ffffff,7);
626   RFIELDMAC_BIG(0x3ffffff,7);
627627   return ((INT32)(ret << 6)) >> 6;
628628}
629629
630static UINT32 rfield_s_27(tms34010_state *tms, offs_t offset)
630UINT32 tms340x0_device::rfield_s_27(offs_t offset)
631631{
632632   UINT32 ret;
633   RFIELDMAC_BIG(tms,0x7ffffff,6);
633   RFIELDMAC_BIG(0x7ffffff,6);
634634   return ((INT32)(ret << 5)) >> 5;
635635}
636636
637static UINT32 rfield_s_28(tms34010_state *tms, offs_t offset)
637UINT32 tms340x0_device::rfield_s_28(offs_t offset)
638638{
639639   UINT32 ret;
640   RFIELDMAC_BIG(tms,0xfffffff,5);
640   RFIELDMAC_BIG(0xfffffff,5);
641641   return ((INT32)(ret << 4)) >> 4;
642642}
643643
644static UINT32 rfield_s_29(tms34010_state *tms, offs_t offset)
644UINT32 tms340x0_device::rfield_s_29(offs_t offset)
645645{
646646   UINT32 ret;
647   RFIELDMAC_BIG(tms,0x1fffffff,4);
647   RFIELDMAC_BIG(0x1fffffff,4);
648648   return ((INT32)(ret << 3)) >> 3;
649649}
650650
651static UINT32 rfield_s_30(tms34010_state *tms, offs_t offset)
651UINT32 tms340x0_device::rfield_s_30(offs_t offset)
652652{
653653   UINT32 ret;
654   RFIELDMAC_BIG(tms,0x3fffffff,3);
654   RFIELDMAC_BIG(0x3fffffff,3);
655655   return ((INT32)(ret << 2)) >> 2;
656656}
657657
658static UINT32 rfield_s_31(tms34010_state *tms, offs_t offset)
658UINT32 tms340x0_device::rfield_s_31(offs_t offset)
659659{
660660   UINT32 ret;
661   RFIELDMAC_BIG(tms,0x7fffffff,2);
661   RFIELDMAC_BIG(0x7fffffff,2);
662662   return ((INT32)(ret << 1)) >> 1;
663663}
664664
665static UINT32 (*const tms34010_rfield_functions[64])(tms34010_state *tms, offs_t offset) =
665const tms340x0_device::rfield_func tms340x0_device::s_rfield_functions[64] =
666666{
667   rfield_32  , rfield_z_01, rfield_z_02, rfield_z_03, rfield_z_04, rfield_z_05,
668   rfield_z_06, rfield_z_07, rfield_z_08, rfield_z_09, rfield_z_10, rfield_z_11,
669   rfield_z_12, rfield_z_13, rfield_z_14, rfield_z_15, rfield_z_16, rfield_z_17,
670   rfield_z_18, rfield_z_19, rfield_z_20, rfield_z_21, rfield_z_22, rfield_z_23,
671   rfield_z_24, rfield_z_25, rfield_z_26, rfield_z_27, rfield_z_28, rfield_z_29,
672   rfield_z_30, rfield_z_31,
673   rfield_32  , rfield_s_01, rfield_s_02, rfield_s_03, rfield_s_04, rfield_s_05,
674   rfield_s_06, rfield_s_07, rfield_s_08, rfield_s_09, rfield_s_10, rfield_s_11,
675   rfield_s_12, rfield_s_13, rfield_s_14, rfield_s_15, rfield_s_16, rfield_s_17,
676   rfield_s_18, rfield_s_19, rfield_s_20, rfield_s_21, rfield_s_22, rfield_s_23,
677   rfield_s_24, rfield_s_25, rfield_s_26, rfield_s_27, rfield_s_28, rfield_s_29,
678   rfield_s_30, rfield_s_31
667   &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,
668   &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,
669   &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,
670   &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,
671   &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,
672   &tms340x0_device::rfield_z_30, &tms340x0_device::rfield_z_31,
673   &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,
674   &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,
675   &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,
676   &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,
677   &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,
678   &tms340x0_device::rfield_s_30, &tms340x0_device::rfield_s_31
679679};
trunk/src/emu/cpu/tms34010/34010ops.h
r31176r31177
1919    MEMORY I/O MACROS
2020***************************************************************************/
2121
22#define TMS34010_RDMEM(T,A)         ((unsigned)(T)->program->read_byte (A))
23#define TMS34010_RDMEM_WORD(T,A)    ((unsigned)(T)->program->read_word (A))
24INLINE UINT32 TMS34010_RDMEM_DWORD(tms34010_state *tms, offs_t A)
22#define TMS34010_RDMEM(A)         ((unsigned)m_program->read_byte (A))
23#define TMS34010_RDMEM_WORD(A)    ((unsigned)m_program->read_word (A))
24inline UINT32 tms340x0_device::TMS34010_RDMEM_DWORD(offs_t A)
2525{
26   UINT32 result = tms->program->read_word(A);
27   return result | (tms->program->read_word(A+2)<<16);
26   UINT32 result = m_program->read_word(A);
27   return result | (m_program->read_word(A+2)<<16);
2828}
2929
30#define TMS34010_WRMEM(T,A,V)       ((T)->program->write_byte(A,V))
31#define TMS34010_WRMEM_WORD(T,A,V)  ((T)->program->write_word(A,V))
32INLINE void TMS34010_WRMEM_DWORD(tms34010_state *tms, offs_t A,UINT32 V)
30#define TMS34010_WRMEM(A,V)       (m_program->write_byte(A,V))
31#define TMS34010_WRMEM_WORD(A,V)  (m_program->write_word(A,V))
32inline void tms340x0_device::TMS34010_WRMEM_DWORD(offs_t A, UINT32 V)
3333{
34   tms->program->write_word(A,V);
35   tms->program->write_word(A+2,V>>16);
34   m_program->write_word(A,V);
35   m_program->write_word(A+2,V>>16);
3636}
3737
3838
3939
4040/* IO registers accessor */
41#define IOREG(T,reg)                ((T)->IOregs[reg])
42#define SMART_IOREG(T,reg)          ((T)->IOregs[(T)->is_34020 ? (int)REG020_##reg : (int)REG_##reg])
43#define PBH(T)                      (IOREG(T, REG_CONTROL) & 0x0100)
44#define PBV(T)                      (IOREG(T, REG_CONTROL) & 0x0200)
41#define IOREG(reg)                (m_IOregs[reg])
42#define SMART_IOREG(reg)          (m_IOregs[m_is_34020 ? (int)REG020_##reg : (int)REG_##reg])
43#define PBH()                     (IOREG(REG_CONTROL) & 0x0100)
44#define PBV()                     (IOREG(REG_CONTROL) & 0x0200)
4545
4646
4747
r31176r31177
4949    FIELD WRITE MACROS
5050***************************************************************************/
5151
52#define WFIELDMAC(T,MASK,MAX)                                                       \
52#define WFIELDMAC(MASK,MAX)                                                         \
5353   UINT32 shift = offset & 0x0f;                                                   \
5454   UINT32 masked_data = data & (MASK);                                             \
5555   UINT32 old;                                                                     \
r31176r31177
5858                                                               \
5959   if (shift >= MAX)                                                               \
6060   {                                                                               \
61      old = (UINT32)TMS34010_RDMEM_DWORD(T, offset) & ~((MASK) << shift);             \
62      TMS34010_WRMEM_DWORD(T, offset, (masked_data << shift) | old);                  \
61      old = (UINT32)TMS34010_RDMEM_DWORD(offset) & ~((MASK) << shift);            \
62      TMS34010_WRMEM_DWORD(offset, (masked_data << shift) | old);                 \
6363   }                                                                               \
6464   else                                                                            \
6565   {                                                                               \
66      old = (UINT32)TMS34010_RDMEM_WORD(T, offset) & ~((MASK) << shift);          \
67      TMS34010_WRMEM_WORD(T, offset, ((masked_data & (MASK)) << shift) | old);        \
66      old = (UINT32)TMS34010_RDMEM_WORD(offset) & ~((MASK) << shift);             \
67      TMS34010_WRMEM_WORD(offset, ((masked_data & (MASK)) << shift) | old);       \
6868   }
69#define WFIELDMAC_BIG(T,MASK,MAX)                                                       \
69
70#define WFIELDMAC_BIG(MASK,MAX)                                                     \
7071   UINT32 shift = offset & 0x0f;                                                   \
7172   UINT32 masked_data = data & (MASK);                                             \
7273   UINT32 old;                                                                     \
7374                                                               \
7475   offset = TOBYTE(offset & 0xfffffff0);                                           \
7576                                                               \
76   old = (UINT32)TMS34010_RDMEM_DWORD(T, offset) & ~(UINT32)((MASK) << shift);     \
77   TMS34010_WRMEM_DWORD(T, offset, (UINT32)(masked_data << shift) | old);              \
77   old = (UINT32)TMS34010_RDMEM_DWORD(offset) & ~(UINT32)((MASK) << shift);        \
78   TMS34010_WRMEM_DWORD(offset, (UINT32)(masked_data << shift) | old);             \
7879   if (shift >= MAX)                                                               \
7980   {                                                                               \
8081      shift = 32 - shift;                                                         \
81      old = (UINT32)TMS34010_RDMEM_WORD(T, offset + 4) & ~((MASK) >> shift);          \
82      TMS34010_WRMEM_WORD(T, offset, (masked_data >> shift) | old);                   \
82      old = (UINT32)TMS34010_RDMEM_WORD(offset + 4) & ~((MASK) >> shift);         \
83      TMS34010_WRMEM_WORD(offset, (masked_data >> shift) | old);                  \
8384   }
84#define WFIELDMAC_8(T)                                                                  \
85
86#define WFIELDMAC_8()                                                               \
8587   if (offset & 0x07)                                                              \
8688   {                                                                               \
87      WFIELDMAC(T,0xff,9);                                                            \
89      WFIELDMAC(0xff,9);                                                          \
8890   }                                                                               \
8991   else                                                                            \
90      TMS34010_WRMEM(T, TOBYTE(offset), data);
91#define RFIELDMAC_8(T)                                                              \
92      TMS34010_WRMEM(TOBYTE(offset), data);
93
94#define RFIELDMAC_8()                                                               \
9295   if (offset & 0x07)                                                              \
9396   {                                                                               \
94      RFIELDMAC(T,0xff,9);                                                            \
97      RFIELDMAC(0xff,9);                                                          \
9598   }                                                                               \
9699   else                                                                            \
97      return TMS34010_RDMEM(T, TOBYTE(offset));
98#define WFIELDMAC_32(T)                                                             \
100      return TMS34010_RDMEM(TOBYTE(offset));
101
102#define WFIELDMAC_32()                                                              \
99103   if (offset & 0x0f)                                                              \
100104   {                                                                               \
101105      UINT32 shift = offset&0x0f;                                                 \
102106      UINT32 old;                                                                 \
103107      UINT32 hiword;                                                              \
104108      offset &= 0xfffffff0;                                                       \
105      old =    ((UINT32) TMS34010_RDMEM_DWORD (T, TOBYTE(offset     ))&(0xffffffff>>(0x20-shift)));   \
106      hiword = ((UINT32) TMS34010_RDMEM_DWORD (T, TOBYTE(offset+0x20))&(0xffffffff<<shift));      \
107      TMS34010_WRMEM_DWORD(T, TOBYTE(offset     ),(data<<      shift) |old);          \
108      TMS34010_WRMEM_DWORD(T, TOBYTE(offset+0x20),(data>>(0x20-shift))|hiword);       \
109      old =    ((UINT32) TMS34010_RDMEM_DWORD (TOBYTE(offset     ))&(0xffffffff>>(0x20-shift)));   \
110      hiword = ((UINT32) TMS34010_RDMEM_DWORD (TOBYTE(offset+0x20))&(0xffffffff<<shift));      \
111      TMS34010_WRMEM_DWORD(TOBYTE(offset     ),(data<<      shift) |old);          \
112      TMS34010_WRMEM_DWORD(TOBYTE(offset+0x20),(data>>(0x20-shift))|hiword);       \
109113   }                                                                               \
110114   else                                                                            \
111      TMS34010_WRMEM_DWORD(T, TOBYTE(offset),data);
115      TMS34010_WRMEM_DWORD(TOBYTE(offset),data);
112116
113117
114118/***************************************************************************
115119    FIELD READ MACROS
116120***************************************************************************/
117121
118#define RFIELDMAC(T,MASK,MAX)                                                           \
122#define RFIELDMAC(MASK,MAX)                                                         \
119123   UINT32 shift = offset & 0x0f;                                                   \
120124   offset = TOBYTE(offset & 0xfffffff0);                                           \
121125                                                               \
122126   if (shift >= MAX)                                                               \
123      ret = (TMS34010_RDMEM_DWORD(T, offset) >> shift) & (MASK);                      \
127      ret = (TMS34010_RDMEM_DWORD(offset) >> shift) & (MASK);                     \
124128   else                                                                            \
125      ret = (TMS34010_RDMEM_WORD(T, offset) >> shift) & (MASK);
126#define RFIELDMAC_BIG(T,MASK,MAX)                                                       \
129      ret = (TMS34010_RDMEM_WORD(offset) >> shift) & (MASK);
130
131#define RFIELDMAC_BIG(MASK,MAX)                                                     \
127132   UINT32 shift = offset & 0x0f;                                                   \
128133   offset = TOBYTE(offset & 0xfffffff0);                                           \
129134                                                               \
130   ret = (UINT32)TMS34010_RDMEM_DWORD(T, offset) >> shift;                         \
135   ret = (UINT32)TMS34010_RDMEM_DWORD(offset) >> shift;                            \
131136   if (shift >= MAX)                                                               \
132      ret |= (TMS34010_RDMEM_WORD(T, offset + 4) << (32 - shift));                    \
137      ret |= (TMS34010_RDMEM_WORD(offset + 4) << (32 - shift));                   \
133138   ret &= MASK;
134#define RFIELDMAC_32(T)                                                             \
139
140#define RFIELDMAC_32()                                                              \
135141   if (offset&0x0f)                                                                \
136142   {                                                                               \
137143      UINT32 shift = offset&0x0f;                                                 \
138144      offset &= 0xfffffff0;                                                       \
139      return (((UINT32)TMS34010_RDMEM_DWORD (T, TOBYTE(offset     ))>>      shift) |  \
140                  (TMS34010_RDMEM_DWORD (T, TOBYTE(offset+0x20))<<(0x20-shift)));\
145      return (((UINT32)TMS34010_RDMEM_DWORD (TOBYTE(offset     ))>>      shift) |  \
146                  (TMS34010_RDMEM_DWORD (TOBYTE(offset+0x20))<<(0x20-shift)));\
141147   }                                                                               \
142148   else                                                                            \
143      return TMS34010_RDMEM_DWORD(T, TOBYTE(offset));
149      return TMS34010_RDMEM_DWORD(TOBYTE(offset));
144150
145151
146152#endif /* __34010OPS_H__ */
trunk/src/emu/cpu/tms34010/tms34010.h
r31176r31177
188188};
189189
190190
191struct tms34010_config
191struct tms340x0_config
192192{
193193   UINT8   halt_on_reset;                      /* /HCS pin, which determines HALT state after reset */
194194   const char *screen_tag;                     /* the screen operated on */
r31176r31177
202202};
203203
204204
205/* PUBLIC FUNCTIONS - 34010 */
206void tms34010_get_display_params(device_t *cpu, tms34010_display_params *params);
205#define MCFG_TMS340X0_CONFIG(_config) \
206   tms340x0_device::set_tms340x0_config(*device, &_config);
207207
208class tms34010_device : public legacy_cpu_device
208
209class tms340x0_device : public cpu_device
209210{
210211public:
211   tms34010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
212   tms34010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, cpu_get_info_func get_info);
212   // construction/destruction
213   tms340x0_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname);
213214
215   static void set_tms340x0_config(device_t &device, const tms340x0_config *config) { downcast<tms340x0_device &>(device).m_config = config; }
216
217   void get_display_params(tms34010_display_params *params);
218   void tms34010_state_postload();
219
214220   UINT32 tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
215221   UINT32 tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
216   /* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */
217   DECLARE_WRITE16_MEMBER( io_register_w );
218   DECLARE_READ16_MEMBER( io_register_r );
219222
223   virtual DECLARE_WRITE16_MEMBER(io_register_w) = 0;
224   virtual DECLARE_READ16_MEMBER(io_register_r) = 0;
225
220226   DECLARE_WRITE16_MEMBER(host_w);
221227   DECLARE_READ16_MEMBER(host_r);
228
229   TIMER_CALLBACK_MEMBER(internal_interrupt_callback);
230   TIMER_CALLBACK_MEMBER(scanline_callback);
231
232protected:
233   // device-level overrides
234   virtual void device_start();
235   virtual void device_reset();
236
237   // device_execute_interface overrides
238   virtual UINT32 execute_min_cycles() const { return 1; }
239   virtual UINT32 execute_max_cycles() const { return 10000; }
240   virtual UINT32 execute_input_lines() const { return 2; }
241   virtual void execute_run();
242   virtual void execute_set_input(int inputnum, int state);
243
244   // device_memory_interface overrides
245   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
246
247   // device_state_interface overrides
248   virtual void state_string_export(const device_state_entry &entry, astring &string);
249
250   // device_disasm_interface overrides
251   virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
252   virtual UINT32 disasm_max_opcode_bytes() const { return 10; }
253
254   typedef void (tms340x0_device::*pixel_write_func)(offs_t offset, UINT32 data);
255   typedef UINT32 (tms340x0_device::*pixel_read_func)(offs_t offset);
256   typedef UINT32 (tms340x0_device::*raster_op_func)(UINT32 newpix, UINT32 oldpix);
257   typedef void (tms340x0_device::*wfield_func)(offs_t offset, UINT32 data);
258   typedef UINT32 (tms340x0_device::*rfield_func)(offs_t offset);
259   typedef void (tms340x0_device::*opcode_func)(UINT16 op);
260   typedef UINT32 (tms340x0_device::*pixel_op_func)(UINT32, UINT32, UINT32);
261   typedef void (tms340x0_device::*pixblt_op_func)(int, int);
262   typedef void (tms340x0_device::*pixblt_b_op_func)(int);
263   typedef void (tms340x0_device::*word_write_func)(address_space &space, offs_t offset,UINT16 data);
264   typedef UINT16 (tms340x0_device::*word_read_func)(address_space &space, offs_t offset);
265
266   static const wfield_func s_wfield_functions[32];
267   static const rfield_func s_rfield_functions[64];
268   static const opcode_func s_opcode_table[65536 >> 4];
269   static const pixel_op_func s_pixel_op_table[32];
270   static const UINT8 s_pixel_op_timing_table[33];
271   static const pixblt_op_func s_pixblt_op_table[];
272   static const pixblt_op_func s_pixblt_r_op_table[];
273   static const pixblt_b_op_func s_pixblt_b_op_table[];
274   static const pixblt_b_op_func s_fill_op_table[];
275   static const pixel_write_func s_pixel_write_ops[4][6];
276   static const pixel_read_func s_pixel_read_ops[6];
277   static const raster_op_func s_raster_ops[32];
278
279   address_space_config m_program_config;
280
281   UINT32           m_pc;
282   UINT32           m_ppc;
283   UINT32           m_st;
284   pixel_write_func m_pixel_write;
285   pixel_read_func  m_pixel_read;
286   raster_op_func   m_raster_op;
287   pixel_op_func    m_pixel_op;
288   UINT32           m_pixel_op_timing;
289   UINT32           m_convsp;
290   UINT32           m_convdp;
291   UINT32           m_convmp;
292   INT32            m_gfxcycles;
293   UINT8            m_pixelshift;
294   UINT8            m_is_34020;
295   UINT8            m_reset_deferred;
296   UINT8            m_hblank_stable;
297   UINT8            m_external_host_access;
298   UINT8            m_executing;
299   address_space *m_program;
300   direct_read_data *m_direct;
301   const tms340x0_config *m_config;
302   screen_device *m_screen;
303   emu_timer *m_scantimer;
304   int m_icount;
305
306   struct XY
307   {
308#ifdef LSB_FIRST
309      INT16 x;
310      INT16 y;
311#else
312      INT16 y;
313      INT16 x;
314#endif
315   };
316
317   /* A registers 0-15 map to regs[0]-regs[15] */
318   /* B registers 0-15 map to regs[30]-regs[15] */
319   union
320   {
321      INT32 reg;
322      XY xy;
323   } m_regs[31];
324
325   UINT16 m_IOregs[64];
326   UINT16              m_shiftreg[(8 * 512 * sizeof(UINT16))/2];
327
328   UINT32 TMS34010_RDMEM_DWORD(offs_t A);
329   void TMS34010_WRMEM_DWORD(offs_t A, UINT32 V);
330   void SET_ST(UINT32 st);
331   void RESET_ST();
332   UINT32 ROPCODE();
333   INT16 PARAM_WORD();
334   INT32 PARAM_LONG();
335   INT16 PARAM_WORD_NO_INC();
336   INT32 PARAM_LONG_NO_INC();
337   UINT32 RBYTE(offs_t offset);
338   void WBYTE(offs_t offset, UINT32 data);
339   UINT32 RLONG(offs_t offset);
340   void WLONG(offs_t offset, UINT32 data);
341   void PUSH(UINT32 data);
342   INT32 POP();
343   UINT32 read_pixel_1(offs_t offset);
344   UINT32 read_pixel_2(offs_t offset);
345   UINT32 read_pixel_4(offs_t offset);
346   UINT32 read_pixel_8(offs_t offset);
347   UINT32 read_pixel_16(offs_t offset);
348   UINT32 read_pixel_32(offs_t offset);
349   UINT32 read_pixel_shiftreg(offs_t offset);
350   void write_pixel_1(offs_t offset, UINT32 data);
351   void write_pixel_2(offs_t offset, UINT32 data);
352   void write_pixel_4(offs_t offset, UINT32 data);
353   void write_pixel_8(offs_t offset, UINT32 data);
354   void write_pixel_16(offs_t offset, UINT32 data);
355   void write_pixel_32(offs_t offset, UINT32 data);
356   void write_pixel_t_1(offs_t offset, UINT32 data);
357   void write_pixel_t_2(offs_t offset, UINT32 data);
358   void write_pixel_t_4(offs_t offset, UINT32 data);
359   void write_pixel_t_8(offs_t offset, UINT32 data);
360   void write_pixel_t_16(offs_t offset, UINT32 data);
361   void write_pixel_t_32(offs_t offset, UINT32 data);
362   void write_pixel_r_1(offs_t offset, UINT32 data);
363   void write_pixel_r_2(offs_t offset, UINT32 data);
364   void write_pixel_r_4(offs_t offset, UINT32 data);
365   void write_pixel_r_8(offs_t offset, UINT32 data);
366   void write_pixel_r_16(offs_t offset, UINT32 data);
367   void write_pixel_r_32(offs_t offset, UINT32 data);
368   void write_pixel_r_t_1(offs_t offset, UINT32 data);
369   void write_pixel_r_t_2(offs_t offset, UINT32 data);
370   void write_pixel_r_t_4(offs_t offset, UINT32 data);
371   void write_pixel_r_t_8(offs_t offset, UINT32 data);
372   void write_pixel_r_t_16(offs_t offset, UINT32 data);
373   void write_pixel_r_t_32(offs_t offset, UINT32 data);
374   void write_pixel_shiftreg(offs_t offset, UINT32 data);
375   UINT32 raster_op_1(UINT32 newpix, UINT32 oldpix);
376   UINT32 raster_op_2(UINT32 newpix, UINT32 oldpix);
377   UINT32 raster_op_3(UINT32 newpix, UINT32 oldpix);
378   UINT32 raster_op_4(UINT32 newpix, UINT32 oldpix);
379   UINT32 raster_op_5(UINT32 newpix, UINT32 oldpix);
380   UINT32 raster_op_6(UINT32 newpix, UINT32 oldpix);
381   UINT32 raster_op_7(UINT32 newpix, UINT32 oldpix);
382   UINT32 raster_op_8(UINT32 newpix, UINT32 oldpix);
383   UINT32 raster_op_9(UINT32 newpix, UINT32 oldpix);
384   UINT32 raster_op_10(UINT32 newpix, UINT32 oldpix);
385   UINT32 raster_op_11(UINT32 newpix, UINT32 oldpix);
386   UINT32 raster_op_12(UINT32 newpix, UINT32 oldpix);
387   UINT32 raster_op_13(UINT32 newpix, UINT32 oldpix);
388   UINT32 raster_op_14(UINT32 newpix, UINT32 oldpix);
389   UINT32 raster_op_15(UINT32 newpix, UINT32 oldpix);
390   UINT32 raster_op_16(UINT32 newpix, UINT32 oldpix);
391   UINT32 raster_op_17(UINT32 newpix, UINT32 oldpix);
392   UINT32 raster_op_18(UINT32 newpix, UINT32 oldpix);
393   UINT32 raster_op_19(UINT32 newpix, UINT32 oldpix);
394   UINT32 raster_op_20(UINT32 newpix, UINT32 oldpix);
395   UINT32 raster_op_21(UINT32 newpix, UINT32 oldpix);
396   void wfield_01(offs_t offset, UINT32 data);
397   void wfield_02(offs_t offset, UINT32 data);
398   void wfield_03(offs_t offset, UINT32 data);
399   void wfield_04(offs_t offset, UINT32 data);
400   void wfield_05(offs_t offset, UINT32 data);
401   void wfield_06(offs_t offset, UINT32 data);
402   void wfield_07(offs_t offset, UINT32 data);
403   void wfield_08(offs_t offset, UINT32 data);
404   void wfield_09(offs_t offset, UINT32 data);
405   void wfield_10(offs_t offset, UINT32 data);
406   void wfield_11(offs_t offset, UINT32 data);
407   void wfield_12(offs_t offset, UINT32 data);
408   void wfield_13(offs_t offset, UINT32 data);
409   void wfield_14(offs_t offset, UINT32 data);
410   void wfield_15(offs_t offset, UINT32 data);
411   void wfield_16(offs_t offset, UINT32 data);
412   void wfield_17(offs_t offset, UINT32 data);
413   void wfield_18(offs_t offset, UINT32 data);
414   void wfield_19(offs_t offset, UINT32 data);
415   void wfield_20(offs_t offset, UINT32 data);
416   void wfield_21(offs_t offset, UINT32 data);
417   void wfield_22(offs_t offset, UINT32 data);
418   void wfield_23(offs_t offset, UINT32 data);
419   void wfield_24(offs_t offset, UINT32 data);
420   void wfield_25(offs_t offset, UINT32 data);
421   void wfield_26(offs_t offset, UINT32 data);
422   void wfield_27(offs_t offset, UINT32 data);
423   void wfield_28(offs_t offset, UINT32 data);
424   void wfield_29(offs_t offset, UINT32 data);
425   void wfield_30(offs_t offset, UINT32 data);
426   void wfield_31(offs_t offset, UINT32 data);
427   void wfield_32(offs_t offset, UINT32 data);
428   UINT32 rfield_z_01(offs_t offset);
429   UINT32 rfield_z_02(offs_t offset);
430   UINT32 rfield_z_03(offs_t offset);
431   UINT32 rfield_z_04(offs_t offset);
432   UINT32 rfield_z_05(offs_t offset);
433   UINT32 rfield_z_06(offs_t offset);
434   UINT32 rfield_z_07(offs_t offset);
435   UINT32 rfield_z_08(offs_t offset);
436   UINT32 rfield_z_09(offs_t offset);
437   UINT32 rfield_z_10(offs_t offset);
438   UINT32 rfield_z_11(offs_t offset);
439   UINT32 rfield_z_12(offs_t offset);
440   UINT32 rfield_z_13(offs_t offset);
441   UINT32 rfield_z_14(offs_t offset);
442   UINT32 rfield_z_15(offs_t offset);
443   UINT32 rfield_z_16(offs_t offset);
444   UINT32 rfield_z_17(offs_t offset);
445   UINT32 rfield_z_18(offs_t offset);
446   UINT32 rfield_z_19(offs_t offset);
447   UINT32 rfield_z_20(offs_t offset);
448   UINT32 rfield_z_21(offs_t offset);
449   UINT32 rfield_z_22(offs_t offset);
450   UINT32 rfield_z_23(offs_t offset);
451   UINT32 rfield_z_24(offs_t offset);
452   UINT32 rfield_z_25(offs_t offset);
453   UINT32 rfield_z_26(offs_t offset);
454   UINT32 rfield_z_27(offs_t offset);
455   UINT32 rfield_z_28(offs_t offset);
456   UINT32 rfield_z_29(offs_t offset);
457   UINT32 rfield_z_30(offs_t offset);
458   UINT32 rfield_z_31(offs_t offset);
459   UINT32 rfield_32(offs_t offset);
460   UINT32 rfield_s_01(offs_t offset);
461   UINT32 rfield_s_02(offs_t offset);
462   UINT32 rfield_s_03(offs_t offset);
463   UINT32 rfield_s_04(offs_t offset);
464   UINT32 rfield_s_05(offs_t offset);
465   UINT32 rfield_s_06(offs_t offset);
466   UINT32 rfield_s_07(offs_t offset);
467   UINT32 rfield_s_08(offs_t offset);
468   UINT32 rfield_s_09(offs_t offset);
469   UINT32 rfield_s_10(offs_t offset);
470   UINT32 rfield_s_11(offs_t offset);
471   UINT32 rfield_s_12(offs_t offset);
472   UINT32 rfield_s_13(offs_t offset);
473   UINT32 rfield_s_14(offs_t offset);
474   UINT32 rfield_s_15(offs_t offset);
475   UINT32 rfield_s_16(offs_t offset);
476   UINT32 rfield_s_17(offs_t offset);
477   UINT32 rfield_s_18(offs_t offset);
478   UINT32 rfield_s_19(offs_t offset);
479   UINT32 rfield_s_20(offs_t offset);
480   UINT32 rfield_s_21(offs_t offset);
481   UINT32 rfield_s_22(offs_t offset);
482   UINT32 rfield_s_23(offs_t offset);
483   UINT32 rfield_s_24(offs_t offset);
484   UINT32 rfield_s_25(offs_t offset);
485   UINT32 rfield_s_26(offs_t offset);
486   UINT32 rfield_s_27(offs_t offset);
487   UINT32 rfield_s_28(offs_t offset);
488   UINT32 rfield_s_29(offs_t offset);
489   UINT32 rfield_s_30(offs_t offset);
490   UINT32 rfield_s_31(offs_t offset);
491   void unimpl(UINT16 op);
492   void pixblt_l_l(UINT16 op); /* 0f00 */
493   void pixblt_l_xy(UINT16 op); /* 0f20 */
494   void pixblt_xy_l(UINT16 op); /* 0f40 */
495   void pixblt_xy_xy(UINT16 op); /* 0f60 */
496   void pixblt_b_l(UINT16 op); /* 0f80 */
497   void pixblt_b_xy(UINT16 op); /* 0fa0 */
498   void fill_l(UINT16 op);   /* 0fc0 */
499   void fill_xy(UINT16 op);  /* 0fe0 */
500   void line(UINT16 op);     /* df10/df90 */
501   void add_xy_a(UINT16 op); /* e000/e100 */
502   void add_xy_b(UINT16 op); /* e000/e100 */
503   void sub_xy_a(UINT16 op); /* e200/e300 */
504   void sub_xy_b(UINT16 op); /* e200/e300 */
505   void cmp_xy_a(UINT16 op); /* e400/e500 */
506   void cmp_xy_b(UINT16 op); /* e400/e500 */
507   void cpw_a(UINT16 op);    /* e600/e700 */
508   void cpw_b(UINT16 op);    /* e600/e700 */
509   void cvxyl_a(UINT16 op);  /* e800/e900 */
510   void cvxyl_b(UINT16 op);  /* e800/e900 */
511   void movx_a(UINT16 op);   /* ec00/ed00 */
512   void movx_b(UINT16 op);   /* ec00/ed00 */
513   void movy_a(UINT16 op);   /* ee00/ef00 */
514   void movy_b(UINT16 op);   /* ee00/ef00 */
515   void pixt_ri_a(UINT16 op); /* f800/f900 */
516   void pixt_ri_b(UINT16 op); /* f800/f900 */
517   void pixt_rixy_a(UINT16 op); /* f000/f100 */
518   void pixt_rixy_b(UINT16 op); /* f000/f100 */
519   void pixt_ir_a(UINT16 op); /* fa00/fb00 */
520   void pixt_ir_b(UINT16 op); /* fa00/fb00 */
521   void pixt_ii_a(UINT16 op); /* fc00/fd00 */
522   void pixt_ii_b(UINT16 op); /* fc00/fd00 */
523   void pixt_ixyr_a(UINT16 op); /* f200/f300 */
524   void pixt_ixyr_b(UINT16 op); /* f200/f300 */
525   void pixt_ixyixy_a(UINT16 op); /* f400/f500 */
526   void pixt_ixyixy_b(UINT16 op); /* f400/f500 */
527   void drav_a(UINT16 op); /* f600/f700 */
528   void drav_b(UINT16 op); /* f600/f700 */
529   void abs_a(UINT16 op); /* 0380 */
530   void abs_b(UINT16 op); /* 0390 */
531   void add_a(UINT16 op); /* 4000/4100 */
532   void add_b(UINT16 op); /* 4000/4100 */
533   void addc_a(UINT16 op); /* 4200/4200 */
534   void addc_b(UINT16 op); /* 4200/4200 */
535   void addi_w_a(UINT16 op); /* 0b00 */
536   void addi_w_b(UINT16 op); /* 0b10 */
537   void addi_l_a(UINT16 op); /* 0b20 */
538   void addi_l_b(UINT16 op); /* 0b30 */
539   void addk_a(UINT16 op); /* 1000-1300 */
540   void addk_b(UINT16 op); /* 1000-1300 */
541   void and_a(UINT16 op); /* 5000/5100 */
542   void and_b(UINT16 op); /* 5000/5100 */
543   void andi_a(UINT16 op); /* 0b80 */
544   void andi_b(UINT16 op); /* 0b90 */
545   void andn_a(UINT16 op); /* 5200-5300 */
546   void andn_b(UINT16 op); /* 5200-5300 */
547   void btst_k_a(UINT16 op); /* 1c00-1f00 */
548   void btst_k_b(UINT16 op); /* 1c00-1f00 */
549   void btst_r_a(UINT16 op); /* 4a00-4b00 */
550   void btst_r_b(UINT16 op); /* 4a00-4b00 */
551   void clrc(UINT16 op); /* 0320 */
552   void cmp_a(UINT16 op); /* 4800/4900 */
553   void cmp_b(UINT16 op); /* 4800/4900 */
554   void cmpi_w_a(UINT16 op); /* 0b40 */
555   void cmpi_w_b(UINT16 op); /* 0b50 */
556   void cmpi_l_a(UINT16 op); /* 0b60 */
557   void cmpi_l_b(UINT16 op); /* 0b70 */
558   void dint(UINT16 op);
559   void divs_a(UINT16 op); /* 5800/5900 */
560   void divs_b(UINT16 op); /* 5800/5900 */
561   void divu_a(UINT16 op); /* 5a00/5b00 */
562   void divu_b(UINT16 op); /* 5a00/5b00 */
563   void eint(UINT16 op);
564   void exgf0_a(UINT16 op);  /* d500 */
565   void exgf0_b(UINT16 op);    /* d510 */
566   void exgf1_a(UINT16 op);    /* d700 */
567   void exgf1_b(UINT16 op);    /* d710 */
568   void lmo_a(UINT16 op);  /* 6a00/6b00 */
569   void lmo_b(UINT16 op);  /* 6a00/6b00 */
570   void mmfm_a(UINT16 op); /* 09a0 */
571   void mmfm_b(UINT16 op); /* 09b0 */
572   void mmtm_a(UINT16 op); /* 0980 */
573   void mmtm_b(UINT16 op); /* 0990 */
574   void mods_a(UINT16 op); /* 6c00/6d00 */
575   void mods_b(UINT16 op); /* 6c00/6d00 */
576   void modu_a(UINT16 op); /* 6e00/6f00 */
577   void modu_b(UINT16 op); /* 6e00/6f00 */
578   void mpys_a(UINT16 op); /* 5c00/5d00 */
579   void mpys_b(UINT16 op); /* 5c00/5d00 */
580   void mpyu_a(UINT16 op); /* 5e00/5e00 */
581   void mpyu_b(UINT16 op); /* 5e00/5f00 */
582   void neg_a(UINT16 op); /* 03a0 */
583   void neg_b(UINT16 op); /* 03b0 */
584   void negb_a(UINT16 op); /* 03c0 */
585   void negb_b(UINT16 op); /* 03d0 */
586   void nop(UINT16 op); /* 0300 */
587   void not_a(UINT16 op); /* 03e0 */
588   void not_b(UINT16 op); /* 03f0 */
589   void or_a(UINT16 op); /* 5400-5500 */
590   void or_b(UINT16 op); /* 5400-5500 */
591   void ori_a(UINT16 op); /* 0ba0 */
592   void ori_b(UINT16 op); /* 0bb0 */
593   void rl_k_a(UINT16 op); /* 3000-3300 */
594   void rl_k_b(UINT16 op); /* 3000-3300 */
595   void rl_r_a(UINT16 op); /* 6800/6900 */
596   void rl_r_b(UINT16 op); /* 6800/6900 */
597   void setc(UINT16 op); /* 0de0 */
598   void setf0(UINT16 op);
599   void setf1(UINT16 op);
600   void sext0_a(UINT16 op); /* 0500 */
601   void sext0_b(UINT16 op); /* 0510 */
602   void sext1_a(UINT16 op); /* 0700 */
603   void sext1_b(UINT16 op); /* 0710 */
604   void sla_k_a(UINT16 op); /* 2000-2300 */
605   void sla_k_b(UINT16 op); /* 2000-2300 */
606   void sla_r_a(UINT16 op); /* 6000/6100 */
607   void sla_r_b(UINT16 op); /* 6000/6100 */
608   void sll_k_a(UINT16 op); /* 2400-2700 */
609   void sll_k_b(UINT16 op); /* 2400-2700 */
610   void sll_r_a(UINT16 op); /* 6200/6300 */
611   void sll_r_b(UINT16 op); /* 6200/6300 */
612   void sra_k_a(UINT16 op); /* 2800-2b00 */
613   void sra_k_b(UINT16 op); /* 2800-2b00 */
614   void sra_r_a(UINT16 op); /* 6400/6500 */
615   void sra_r_b(UINT16 op); /* 6400/6500 */
616   void srl_k_a(UINT16 op); /* 2c00-2f00 */
617   void srl_k_b(UINT16 op); /* 2c00-2f00 */
618   void srl_r_a(UINT16 op); /* 6600/6700 */
619   void srl_r_b(UINT16 op); /* 6600/6700 */
620   void sub_a(UINT16 op); /* 4400/4500 */
621   void sub_b(UINT16 op); /* 4400/4500 */
622   void subb_a(UINT16 op); /* 4600/4700 */
623   void subb_b(UINT16 op); /* 4600/4700 */
624   void subi_w_a(UINT16 op); /* 0be0 */
625   void subi_w_b(UINT16 op); /* 0bf0 */
626   void subi_l_a(UINT16 op); /* 0d00 */
627   void subi_l_b(UINT16 op); /* 0d10 */
628   void subk_a(UINT16 op); /* 1400-1700 */
629   void subk_b(UINT16 op); /* 1400-1700 */
630   void xor_a(UINT16 op); /* 5600-5700 */
631   void xor_b(UINT16 op); /* 5600-5700 */
632   void xori_a(UINT16 op); /* 0bc0 */
633   void xori_b(UINT16 op); /* 0bd0 */
634   void zext0_a(UINT16 op); /* 0520 */
635   void zext0_b(UINT16 op); /* 0530 */
636   void zext1_a(UINT16 op); /* 0720 */
637   void zext1_b(UINT16 op); /* 0720 */
638   void movi_w_a(UINT16 op);
639   void movi_w_b(UINT16 op);
640   void movi_l_a(UINT16 op);
641   void movi_l_b(UINT16 op);
642   void movk_a(UINT16 op);
643   void movk_b(UINT16 op);
644   void movb_rn_a(UINT16 op); /* 8c00-8d00 */
645   void movb_rn_b(UINT16 op); /* 8c00-8d00 */
646   void movb_nr_a(UINT16 op); /* 8e00-8f00 */
647   void movb_nr_b(UINT16 op); /* 8e00-8f00 */
648   void movb_nn_a(UINT16 op); /* 9c00-9d00 */
649   void movb_nn_b(UINT16 op); /* 9c00-9d00 */
650   void movb_r_no_a(UINT16 op); /* ac00-ad00 */
651   void movb_r_no_b(UINT16 op); /* ac00-ad00 */
652   void movb_no_r_a(UINT16 op); /* ae00-af00 */
653   void movb_no_r_b(UINT16 op); /* ae00-af00 */
654   void movb_no_no_a(UINT16 op); /* bc00-bd00 */
655   void movb_no_no_b(UINT16 op); /* bc00-bd00 */
656   void movb_ra_a(UINT16 op);
657   void movb_ra_b(UINT16 op);
658   void movb_ar_a(UINT16 op);
659   void movb_ar_b(UINT16 op);
660   void movb_aa(UINT16 op);
661   void move_rr_a(UINT16 op); /* 4c00/d00 */
662   void move_rr_b(UINT16 op); /* 4c00/d00 */
663   void move_rr_ax(UINT16 op); /* 4e00/f00 */
664   void move_rr_bx(UINT16 op); /* 4e00/f00 */
665   void move0_rn_a(UINT16 op); /* 8000 */
666   void move0_rn_b(UINT16 op);
667   void move1_rn_a(UINT16 op);
668   void move1_rn_b(UINT16 op);
669   void move0_r_dn_a(UINT16 op); /* a000 */
670   void move0_r_dn_b(UINT16 op);
671   void move1_r_dn_a(UINT16 op);
672   void move1_r_dn_b(UINT16 op);
673   void move0_r_ni_a(UINT16 op); /* 9000 */
674   void move0_r_ni_b(UINT16 op);
675   void move1_r_ni_a(UINT16 op);
676   void move1_r_ni_b(UINT16 op);
677   void move0_nr_a(UINT16 op); /* 8400-500 */
678   void move0_nr_b(UINT16 op); /* 8400-500 */
679   void move1_nr_a(UINT16 op); /* 8600-700 */
680   void move1_nr_b(UINT16 op); /* 8600-700 */
681   void move0_dn_r_a(UINT16 op); /* A400-500 */
682   void move0_dn_r_b(UINT16 op); /* A400-500 */
683   void move1_dn_r_a(UINT16 op); /* A600-700 */
684   void move1_dn_r_b(UINT16 op); /* A600-700 */
685   void move0_ni_r_a(UINT16 op); /* 9400-500 */
686   void move0_ni_r_b(UINT16 op); /* 9400-500 */
687   void move1_ni_r_a(UINT16 op); /* 9600-700 */
688   void move1_ni_r_b(UINT16 op); /* 9600-700 */
689   void move0_nn_a(UINT16 op); /* 8800 */
690   void move0_nn_b(UINT16 op);
691   void move1_nn_a(UINT16 op);
692   void move1_nn_b(UINT16 op);
693   void move0_dn_dn_a(UINT16 op); /* a800 */
694   void move0_dn_dn_b(UINT16 op);
695   void move1_dn_dn_a(UINT16 op);
696   void move1_dn_dn_b(UINT16 op);
697   void move0_ni_ni_a(UINT16 op); /* 9800 */
698   void move0_ni_ni_b(UINT16 op);
699   void move1_ni_ni_a(UINT16 op);
700   void move1_ni_ni_b(UINT16 op);
701   void move0_r_no_a(UINT16 op); /* b000 */
702   void move0_r_no_b(UINT16 op);
703   void move1_r_no_a(UINT16 op);
704   void move1_r_no_b(UINT16 op);
705   void move0_no_r_a(UINT16 op); /* b400 */
706   void move0_no_r_b(UINT16 op);
707   void move1_no_r_a(UINT16 op);
708   void move1_no_r_b(UINT16 op);
709   void move0_no_ni_a(UINT16 op); /* d000 */
710   void move0_no_ni_b(UINT16 op);
711   void move1_no_ni_a(UINT16 op);
712   void move1_no_ni_b(UINT16 op);
713   void move0_no_no_a(UINT16 op); /* b800 */
714   void move0_no_no_b(UINT16 op);
715   void move1_no_no_a(UINT16 op);
716   void move1_no_no_b(UINT16 op);
717   void move0_ra_a(UINT16 op);
718   void move0_ra_b(UINT16 op);
719   void move1_ra_a(UINT16 op);
720   void move1_ra_b(UINT16 op);
721   void move0_ar_a(UINT16 op);
722   void move0_ar_b(UINT16 op);
723   void move1_ar_a(UINT16 op);
724   void move1_ar_b(UINT16 op);
725   void move0_a_ni_a(UINT16 op); /* d400 */
726   void move0_a_ni_b(UINT16 op); /* d410 */
727   void move1_a_ni_a(UINT16 op); /* d600 */
728   void move1_a_ni_b(UINT16 op); /* d610 */
729   void move0_aa(UINT16 op); /* 05c0 */
730   void move1_aa(UINT16 op); /* 07c0 */
731   void call_a(UINT16 op); /* 0920 */
732   void call_b(UINT16 op); /* 0930 */
733   void callr(UINT16 op); /* 0d3f */
734   void calla(UINT16 op); /* 0d5f */
735   void dsj_a(UINT16 op);  /* 0d80 */
736   void dsj_b(UINT16 op);  /* 0d90 */
737   void dsjeq_a(UINT16 op); /* 0da0 */
738   void dsjeq_b(UINT16 op); /* 0db0 */
739   void dsjne_a(UINT16 op); /* 0dc0 */
740   void dsjne_b(UINT16 op); /* 0dd0 */
741   void dsjs_a(UINT16 op);
742   void dsjs_b(UINT16 op);
743   void emu(UINT16 op);     /* 0100 */
744   void exgpc_a(UINT16 op); /* 0120 */
745   void exgpc_b(UINT16 op); /* 0130 */
746   void getpc_a(UINT16 op); /* 0140 */
747   void getpc_b(UINT16 op); /* 0150 */
748   void getst_a(UINT16 op); /* 0180 */
749   void getst_b(UINT16 op); /* 0190 */
750   void j_UC_0(UINT16 op);
751   void j_UC_8(UINT16 op);
752   void j_UC_x(UINT16 op);
753   void j_P_0(UINT16 op);
754   void j_P_8(UINT16 op);
755   void j_P_x(UINT16 op);
756   void j_LS_0(UINT16 op);
757   void j_LS_8(UINT16 op);
758   void j_LS_x(UINT16 op);
759   void j_HI_0(UINT16 op);
760   void j_HI_8(UINT16 op);
761   void j_HI_x(UINT16 op);
762   void j_LT_0(UINT16 op);
763   void j_LT_8(UINT16 op);
764   void j_LT_x(UINT16 op);
765   void j_GE_0(UINT16 op);
766   void j_GE_8(UINT16 op);
767   void j_GE_x(UINT16 op);
768   void j_LE_0(UINT16 op);
769   void j_LE_8(UINT16 op);
770   void j_LE_x(UINT16 op);
771   void j_GT_0(UINT16 op);
772   void j_GT_8(UINT16 op);
773   void j_GT_x(UINT16 op);
774   void j_C_0(UINT16 op);
775   void j_C_8(UINT16 op);
776   void j_C_x(UINT16 op);
777   void j_NC_0(UINT16 op);
778   void j_NC_8(UINT16 op);
779   void j_NC_x(UINT16 op);
780   void j_EQ_0(UINT16 op);
781   void j_EQ_8(UINT16 op);
782   void j_EQ_x(UINT16 op);
783   void j_NE_0(UINT16 op);
784   void j_NE_8(UINT16 op);
785   void j_NE_x(UINT16 op);
786   void j_V_0(UINT16 op);
787   void j_V_8(UINT16 op);
788   void j_V_x(UINT16 op);
789   void j_NV_0(UINT16 op);
790   void j_NV_8(UINT16 op);
791   void j_NV_x(UINT16 op);
792   void j_N_0(UINT16 op);
793   void j_N_8(UINT16 op);
794   void j_N_x(UINT16 op);
795   void j_NN_0(UINT16 op);
796   void j_NN_8(UINT16 op);
797   void j_NN_x(UINT16 op);
798   void jump_a(UINT16 op); /* 0160 */
799   void jump_b(UINT16 op); /* 0170 */
800   void popst(UINT16 op); /* 01c0 */
801   void pushst(UINT16 op); /* 01e0 */
802   void putst_a(UINT16 op); /* 01a0 */
803   void putst_b(UINT16 op); /* 01b0 */
804   void reti(UINT16 op); /* 0940 */
805   void rets(UINT16 op); /* 0960/70 */
806   void rev_a(UINT16 op); /* 0020 */
807   void rev_b(UINT16 op); /* 0030 */
808   void trap(UINT16 op); /* 0900/10 */
809   void addxyi_a(UINT16 op);
810   void addxyi_b(UINT16 op);
811   void blmove(UINT16 op);
812   void cexec_l(UINT16 op);
813   void cexec_s(UINT16 op);
814   void clip(UINT16 op);
815   void cmovcg_a(UINT16 op);
816   void cmovcg_b(UINT16 op);
817   void cmovcm_f(UINT16 op);
818   void cmovcm_b(UINT16 op);
819   void cmovgc_a(UINT16 op);
820   void cmovgc_b(UINT16 op);
821   void cmovgc_a_s(UINT16 op);
822   void cmovgc_b_s(UINT16 op);
823   void cmovmc_f(UINT16 op);
824   void cmovmc_f_va(UINT16 op);
825   void cmovmc_f_vb(UINT16 op);
826   void cmovmc_b(UINT16 op);
827   void cmp_k_a(UINT16 op);
828   void cmp_k_b(UINT16 op);
829   void cvdxyl_a(UINT16 op);
830   void cvdxyl_b(UINT16 op);
831   void cvmxyl_a(UINT16 op);
832   void cvmxyl_b(UINT16 op);
833   void cvsxyl_a(UINT16 op);
834   void cvsxyl_b(UINT16 op);
835   void exgps_a(UINT16 op);
836   void exgps_b(UINT16 op);
837   void fline(UINT16 op);
838   void fpixeq(UINT16 op);
839   void fpixne(UINT16 op);
840   void getps_a(UINT16 op);
841   void getps_b(UINT16 op);
842   void idle(UINT16 op);
843   void linit(UINT16 op);
844   void mwait(UINT16 op);
845   void pfill_xy(UINT16 op);
846   void pixblt_l_m_l(UINT16 op);
847   void retm(UINT16 op);
848   void rmo_a(UINT16 op);
849   void rmo_b(UINT16 op);
850   void rpix_a(UINT16 op);
851   void rpix_b(UINT16 op);
852   void setcdp(UINT16 op);
853   void setcmp(UINT16 op);
854   void setcsp(UINT16 op);
855   void swapf_a(UINT16 op);
856   void swapf_b(UINT16 op);
857   void tfill_xy(UINT16 op);
858   void trapl(UINT16 op);
859   void vblt_b_l(UINT16 op);
860   void vfill_l(UINT16 op);
861   void vlcol(UINT16 op);
862   int apply_window(const char *inst_name,int srcbpp, UINT32 *srcaddr, XY *dst, int *dx, int *dy);
863   int compute_fill_cycles(int left_partials, int right_partials, int full_words, int op_timing);
864   int compute_pixblt_cycles(int left_partials, int right_partials, int full_words, int op_timing);
865   int compute_pixblt_b_cycles(int left_partials, int right_partials, int full_words, int rows, int op_timing, int bpp);
866   void memory_w(address_space &space, offs_t offset,UINT16 data);
867   UINT16 memory_r(address_space &space, offs_t offset);
868   void shiftreg_w(address_space &space, offs_t offset, UINT16 data);
869   UINT16 shiftreg_r(address_space &space, offs_t offset);
870   UINT16 dummy_shiftreg_r(address_space &space, offs_t offset);
871   UINT32 pixel_op00(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
872   UINT32 pixel_op01(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
873   UINT32 pixel_op02(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
874   UINT32 pixel_op03(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
875   UINT32 pixel_op04(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
876   UINT32 pixel_op05(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
877   UINT32 pixel_op06(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
878   UINT32 pixel_op07(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
879   UINT32 pixel_op08(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
880   UINT32 pixel_op09(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
881   UINT32 pixel_op10(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
882   UINT32 pixel_op11(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
883   UINT32 pixel_op12(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
884   UINT32 pixel_op13(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
885   UINT32 pixel_op14(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
886   UINT32 pixel_op15(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
887   UINT32 pixel_op16(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
888   UINT32 pixel_op17(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
889   UINT32 pixel_op18(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
890   UINT32 pixel_op19(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
891   UINT32 pixel_op20(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
892   UINT32 pixel_op21(UINT32 dstpix, UINT32 mask, UINT32 srcpix);
893   void pixblt_1_op0(int src_is_linear, int dst_is_linear);
894   void pixblt_2_op0(int src_is_linear, int dst_is_linear);
895   void pixblt_4_op0(int src_is_linear, int dst_is_linear);
896   void pixblt_8_op0(int src_is_linear, int dst_is_linear);
897   void pixblt_16_op0(int src_is_linear, int dst_is_linear);
898   void pixblt_r_1_op0(int src_is_linear, int dst_is_linear);
899   void pixblt_r_2_op0(int src_is_linear, int dst_is_linear);
900   void pixblt_r_4_op0(int src_is_linear, int dst_is_linear);
901   void pixblt_r_8_op0(int src_is_linear, int dst_is_linear);
902   void pixblt_r_16_op0(int src_is_linear, int dst_is_linear);
903   void pixblt_b_1_op0(int dst_is_linear);
904   void pixblt_b_2_op0(int dst_is_linear);
905   void pixblt_b_4_op0(int dst_is_linear);
906   void pixblt_b_8_op0(int dst_is_linear);
907   void pixblt_b_16_op0(int dst_is_linear);
908   void fill_1_op0(int dst_is_linear);
909   void fill_2_op0(int dst_is_linear);
910   void fill_4_op0(int dst_is_linear);
911   void fill_8_op0(int dst_is_linear);
912   void fill_16_op0(int dst_is_linear);
913   void pixblt_1_op0_trans(int src_is_linear, int dst_is_linear);
914   void pixblt_2_op0_trans(int src_is_linear, int dst_is_linear);
915   void pixblt_4_op0_trans(int src_is_linear, int dst_is_linear);
916   void pixblt_8_op0_trans(int src_is_linear, int dst_is_linear);
917   void pixblt_16_op0_trans(int src_is_linear, int dst_is_linear);
918   void pixblt_r_1_op0_trans(int src_is_linear, int dst_is_linear);
919   void pixblt_r_2_op0_trans(int src_is_linear, int dst_is_linear);
920   void pixblt_r_4_op0_trans(int src_is_linear, int dst_is_linear);
921   void pixblt_r_8_op0_trans(int src_is_linear, int dst_is_linear);
922   void pixblt_r_16_op0_trans(int src_is_linear, int dst_is_linear);
923   void pixblt_b_1_op0_trans(int dst_is_linear);
924   void pixblt_b_2_op0_trans(int dst_is_linear);
925   void pixblt_b_4_op0_trans(int dst_is_linear);
926   void pixblt_b_8_op0_trans(int dst_is_linear);
927   void pixblt_b_16_op0_trans(int dst_is_linear);
928   void fill_1_op0_trans(int dst_is_linear);
929   void fill_2_op0_trans(int dst_is_linear);
930   void fill_4_op0_trans(int dst_is_linear);
931   void fill_8_op0_trans(int dst_is_linear);
932   void fill_16_op0_trans(int dst_is_linear);
933   void pixblt_1_opx(int src_is_linear, int dst_is_linear);
934   void pixblt_2_opx(int src_is_linear, int dst_is_linear);
935   void pixblt_4_opx(int src_is_linear, int dst_is_linear);
936   void pixblt_8_opx(int src_is_linear, int dst_is_linear);
937   void pixblt_16_opx(int src_is_linear, int dst_is_linear);
938   void pixblt_r_1_opx(int src_is_linear, int dst_is_linear);
939   void pixblt_r_2_opx(int src_is_linear, int dst_is_linear);
940   void pixblt_r_4_opx(int src_is_linear, int dst_is_linear);
941   void pixblt_r_8_opx(int src_is_linear, int dst_is_linear);
942   void pixblt_r_16_opx(int src_is_linear, int dst_is_linear);
943   void pixblt_b_1_opx(int dst_is_linear);
944   void pixblt_b_2_opx(int dst_is_linear);
945   void pixblt_b_4_opx(int dst_is_linear);
946   void pixblt_b_8_opx(int dst_is_linear);
947   void pixblt_b_16_opx(int dst_is_linear);
948   void fill_1_opx(int dst_is_linear);
949   void fill_2_opx(int dst_is_linear);
950   void fill_4_opx(int dst_is_linear);
951   void fill_8_opx(int dst_is_linear);
952   void fill_16_opx(int dst_is_linear);
953   void pixblt_1_opx_trans(int src_is_linear, int dst_is_linear);
954   void pixblt_2_opx_trans(int src_is_linear, int dst_is_linear);
955   void pixblt_4_opx_trans(int src_is_linear, int dst_is_linear);
956   void pixblt_8_opx_trans(int src_is_linear, int dst_is_linear);
957   void pixblt_16_opx_trans(int src_is_linear, int dst_is_linear);
958   void pixblt_r_1_opx_trans(int src_is_linear, int dst_is_linear);
959   void pixblt_r_2_opx_trans(int src_is_linear, int dst_is_linear);
960   void pixblt_r_4_opx_trans(int src_is_linear, int dst_is_linear);
961   void pixblt_r_8_opx_trans(int src_is_linear, int dst_is_linear);
962   void pixblt_r_16_opx_trans(int src_is_linear, int dst_is_linear);
963   void pixblt_b_1_opx_trans(int dst_is_linear);
964   void pixblt_b_2_opx_trans(int dst_is_linear);
965   void pixblt_b_4_opx_trans(int dst_is_linear);
966   void pixblt_b_8_opx_trans(int dst_is_linear);
967   void pixblt_b_16_opx_trans(int dst_is_linear);
968   void fill_1_opx_trans(int dst_is_linear);
969   void fill_2_opx_trans(int dst_is_linear);
970   void fill_4_opx_trans(int dst_is_linear);
971   void fill_8_opx_trans(int dst_is_linear);
972   void fill_16_opx_trans(int dst_is_linear);
973   void check_interrupt();
974   void set_pixel_function();
975   void set_raster_op();
976
222977};
223978
979
980class tms34010_device : public tms340x0_device
981{
982public:
983   tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
984
985   /* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */
986   virtual DECLARE_WRITE16_MEMBER( io_register_w );
987   virtual DECLARE_READ16_MEMBER( io_register_r );
988
989protected:
990   virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 8 - 1) / 8; }
991   virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 8); }
992   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
993};
994
224995extern const device_type TMS34010;
225996
226class tms34020_device : public tms34010_device
997class tms34020_device : public tms340x0_device
227998{
228999public:
229   tms34020_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
1000   tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
1001
2301002   /* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */
231   DECLARE_WRITE16_MEMBER( io_register_w );
232   DECLARE_READ16_MEMBER( io_register_r );
1003   virtual DECLARE_WRITE16_MEMBER( io_register_w );
1004   virtual DECLARE_READ16_MEMBER( io_register_r );
1005
1006protected:
1007   virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 4 - 1) / 4; }
1008   virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 4); }
1009   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
2331010};
2341011
2351012extern const device_type TMS34020;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team