Previous 199869 Revisions Next

r34956 Tuesday 10th February, 2015 at 18:46:47 UTC by hap
added straightforward ucom43 opcodes
[src/emu/cpu/ucom4]ucom4op.inc

trunk/src/emu/cpu/ucom4/ucom4op.inc
r243467r243468
516516   if (!check_op_43()) return;
517517
518518   // TAW: Transfer ACC to W
519   op_illegal();
519   m_icount--;
520   ucom43_reg_w(UCOM43_W, m_acc);
520521}
521522
522523void ucom4_cpu_device::op_taz()
r243467r243468
524525   if (!check_op_43()) return;
525526   
526527   // TAZ: Transfer ACC to Z
527   op_illegal();
528   m_icount--;
529   ucom43_reg_w(UCOM43_Z, m_acc);
528530}
529531
530532void ucom4_cpu_device::op_thx()
r243467r243468
532534   if (!check_op_43()) return;
533535   
534536   // THX: Transfer DPh to X
535   op_illegal();
537   m_icount--;
538   ucom43_reg_w(UCOM43_X, m_dph);
536539}
537540
538541void ucom4_cpu_device::op_tly()
r243467r243468
540543   if (!check_op_43()) return;
541544   
542545   // TLY: Transfer DPl to Y
543   op_illegal();
546   m_icount--;
547   ucom43_reg_w(UCOM43_Y, m_dpl);
544548}
545549
546550
r243467r243468
551555   if (!check_op_43()) return;
552556   
553557   // XAW: Exchange ACC with W
554   op_illegal();
558   m_icount--;
559   UINT8 old_acc = m_acc;
560   m_acc = ucom43_reg_r(UCOM43_W);
561   ucom43_reg_w(UCOM43_W, old_acc);
555562}
556563
557564void ucom4_cpu_device::op_xaz()
r243467r243468
559566   if (!check_op_43()) return;
560567   
561568   // XAZ: Exchange ACC with Z
562   op_illegal();
569   m_icount--;
570   UINT8 old_acc = m_acc;
571   m_acc = ucom43_reg_r(UCOM43_Z);
572   ucom43_reg_w(UCOM43_Z, old_acc);
563573}
564574
565575void ucom4_cpu_device::op_xhr()
r243467r243468
567577   if (!check_op_43()) return;
568578   
569579   // XHR: Exchange DPh with R
570   op_illegal();
580   m_icount--;
581   UINT8 old_dph = m_dph;
582   m_dph = ucom43_reg_r(UCOM43_R);
583   ucom43_reg_w(UCOM43_R, old_dph);
571584}
572585
573586void ucom4_cpu_device::op_xhx()
r243467r243468
575588   if (!check_op_43()) return;
576589   
577590   // XHX: Exchange DPh with X
578   op_illegal();
591   m_icount--;
592   UINT8 old_dph = m_dph;
593   m_dph = ucom43_reg_r(UCOM43_X);
594   ucom43_reg_w(UCOM43_X, old_dph);
579595}
580596
581597void ucom4_cpu_device::op_xls()
r243467r243468
583599   if (!check_op_43()) return;
584600   
585601   // XLS: Exchange DPl with S
586   op_illegal();
602   m_icount--;
603   UINT8 old_dpl = m_dpl;
604   m_dpl = ucom43_reg_r(UCOM43_S);
605   ucom43_reg_w(UCOM43_S, old_dpl);
587606}
588607
589608void ucom4_cpu_device::op_xly()
r243467r243468
591610   if (!check_op_43()) return;
592611   
593612   // XLY: Exchange DPl with Y
594   op_illegal();
613   m_icount--;
614   UINT8 old_dpl = m_dpl;
615   m_dpl = ucom43_reg_r(UCOM43_Y);
616   ucom43_reg_w(UCOM43_Y, old_dpl);
595617}
596618
597619void ucom4_cpu_device::op_xc()
r243467r243468
599621   if (!check_op_43()) return;
600622   
601623   // XC: Exchange Carry F/F with Carry Save F/F
602   op_illegal();
624   UINT8 c = m_carry_f;
625   m_carry_f = m_carry_s_f;
626   m_carry_s_f = c;
603627}
604628
605629
r243467r243468
610634   if (!check_op_43()) return;
611635   
612636   // SFB B: Set a single bit of FLAG
613   op_illegal();
637   m_icount--;
638   ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) | m_bitmask);
614639}
615640
616641void ucom4_cpu_device::op_rfb()
r243467r243468
618643   if (!check_op_43()) return;
619644   
620645   // RFB B: Reset a single bit of FLAG
621   op_illegal();
646   m_icount--;
647   ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) & ~m_bitmask);
622648}
623649
624650void ucom4_cpu_device::op_fbt()
r243467r243468
626652   if (!check_op_43()) return;
627653   
628654   // FBT B: skip next on bit(FLAG)
629   op_illegal();
655   m_icount--;
656   m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) != 0);
630657}
631658
632659void ucom4_cpu_device::op_fbf()
r243467r243468
634661   if (!check_op_43()) return;
635662   
636663   // FBF B: skip next on not bit(FLAG)
637   op_illegal();
664   m_icount--;
665   m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) == 0);
638666}
639667
640668
r243467r243468
656684   if (!check_op_43()) return;
657685   
658686   // INM: Increment RAM, skip next on carry
659   op_illegal();
687   UINT8 val = (ram_r() + 1) & 0xf;
688   ram_w(val);
689   m_skip = (val == 0);
660690}
661691
662692void ucom4_cpu_device::op_dem()
r243467r243468
664694   if (!check_op_43()) return;
665695   
666696   // DEM: Decrement RAM, skip next on carry
667   op_illegal();
697   UINT8 val = (ram_r() - 1) & 0xf;
698   ram_w(val);
699   m_skip = (val == 0xf);
668700}
669701
670702


Previous 199869 Revisions Next


© 1997-2024 The MAME Team