Lines Matching refs:micro

207 	struct micro_t &micro = m_micro;  in video_control_w()  local
212 micro.i = (micro.i & 0xff00) | (data & 0x00ff); in video_control_w()
217 micro.i = (micro.i & 0x00ff) | ((data << 8) & 0xff00); in video_control_w()
218 if (micro.cmdlo == 5) in video_control_w()
227 micro.cmd = data; in video_control_w()
228 micro.cmdlo = data & 7; in video_control_w()
229 if (micro.cmdlo == 0) in video_control_w()
231 else if (micro.cmdlo == 1) in video_control_w()
233 else if (micro.cmdlo == 6) in video_control_w()
242 micro.g = data; in video_control_w()
247 micro.xp = data; in video_control_w()
248 if (micro.cmdlo == 3) in video_control_w()
257 micro.yp = data; in video_control_w()
258 if (micro.cmdlo == 4) in video_control_w()
267 micro.r = data; in video_control_w()
272 micro.b = data; in video_control_w()
273 if (micro.cmdlo == 2) in video_control_w()
278 else if (micro.cmdlo == 7) in video_control_w()
545 struct micro_t &micro = m_micro; in command2() local
555 int addr = micro.i++ & 0x3fff; in command2()
557 if (micro.cmd & 0x10) in command2()
558 m_gram[addr] = micro.g; in command2()
559 if (micro.cmd & 0x20) in command2()
560 m_bram[addr] = micro.b; in command2()
561 if (micro.cmd & 0x40) in command2()
562 m_rram[addr] = micro.r; in command2()
564 micro.count_states(3); in command2()
578 struct micro_t &micro = m_micro; in command3() local
600 int ycount = 64 - (micro.r & 31) * 2; in command3()
601 int xcount = 8 - (micro.r >> 5); in command3()
602 int shift = micro.xp & 7; in command3()
606 for (x = 0; x < xcount; x++, micro.xp += 8) in command3()
608 sy = micro.yp; in command3()
612 int srcoffs = micro.i++ & 0x3fff; in command3()
613 int dstoffs = (sy++ & 0xff) * 32 + micro.xp / 8; in command3()
617 if (!(micro.cmd & 0x08) || m_fgcoll) in command3()
619 if (micro.cmd & 0x10) in command3()
625 if (micro.cmd & 0x20) in command3()
631 if (micro.cmd & 0x40) in command3()
642 if (micro.cmd & 0x10) in command3()
646 m_fgcoll = 1, m_fgcollx = micro.xp, m_fgcolly = sy - 1; in command3()
650 if (micro.cmd & 0x20) in command3()
654 m_fgcoll = 1, m_fgcollx = micro.xp, m_fgcolly = sy - 1; in command3()
658 if (micro.cmd & 0x40) in command3()
662 m_fgcoll = 1, m_fgcollx = micro.xp, m_fgcolly = sy - 1; in command3()
671 micro.count_states(3 + (2 + 2 * ycount) * xcount); in command3()
673 return micro.cmd & 0x80; in command3()
686 struct micro_t &micro = m_micro; in command4() local
708 micro.count_states(4); in command4()
710 micro.pc = micro.yp << 1; in command4()
713 micro.cmd = m_gram[0x2000 + micro.pc]; in command4()
714 micro.cmdlo = micro.cmd & 7; in command4()
715 micro.i = (m_bram[0x2000 + micro.pc] << 8) | m_rram[0x2000 + micro.pc]; in command4()
716 micro.r = m_gram[0x2001 + micro.pc]; in command4()
717 micro.xp = m_rram[0x2001 + micro.pc]; in command4()
718 micro.yp = m_bram[0x2001 + micro.pc]; in command4()
719 …C=%03X CMD=%02X I=%04X R=%02X X=%02X Y=%02X\n", micro.pc, micro.cmd, micro.i, micro.r, micro.xp, in command4()
720 micro.pc = (micro.pc + 2) & 0x1ff; in command4()
722 switch (micro.cmdlo) in command4()
728 case 4: micro.pc = micro.yp << 1; keep_going = 1; break; in command4()
737 return micro.cmd & 0x80; in command4()
750 struct micro_t &micro = m_micro; in command5() local
793 int xinc = inctable[(micro.cmd >> 4) & 7][0]; in command5()
794 int yinc = inctable[(micro.cmd >> 4) & 7][1]; in command5()
795 int xincc = inctable[(micro.cmd >> 4) & 7][2]; in command5()
796 int yincc = inctable[(micro.cmd >> 4) & 7][3]; in command5()
797 uint8_t x = micro.xp; in command5()
798 uint8_t y = micro.yp; in command5()
800 int i = micro.i >> 8; in command5()
804 if (!(micro.cmd & 0x08) || m_fgcoll) in command5()
806 for (c = micro.i & 0xff; c < 0x100; c++) in command5()
812 m_gram[addr + 0] ^= micro.g >> shift; in command5()
813 m_gram[addr + 1] ^= micro.g << nshift; in command5()
814 m_bram[addr + 0] ^= micro.b >> shift; in command5()
815 m_bram[addr + 1] ^= micro.b << nshift; in command5()
816 m_rram[addr + 0] ^= micro.r >> shift; in command5()
817 m_rram[addr + 1] ^= micro.r << nshift; in command5()
837 for (c = micro.i & 0xff; c < 0x100; c++) in command5()
843 if ((m_gram[addr + 0] & (micro.g >> shift)) | (m_gram[addr + 1] & (micro.g << nshift)) | in command5()
844 (m_bram[addr + 0] & (micro.b >> shift)) | (m_bram[addr + 1] & (micro.b << nshift)) | in command5()
845 (m_rram[addr + 0] & (micro.r >> shift)) | (m_rram[addr + 1] & (micro.r << nshift))) in command5()
848 m_gram[addr + 0] ^= micro.g >> shift; in command5()
849 m_gram[addr + 1] ^= micro.g << nshift; in command5()
850 m_bram[addr + 0] ^= micro.b >> shift; in command5()
851 m_bram[addr + 1] ^= micro.b << nshift; in command5()
852 m_rram[addr + 0] ^= micro.r >> shift; in command5()
853 m_rram[addr + 1] ^= micro.r << nshift; in command5()
871 micro.xp = x; in command5()
873 micro.count_states(3 + 2 * (0x100 - (micro.i & 0xff))); in command5()
875 return micro.cmd & 0x80; in command5()
888 struct micro_t &micro = m_micro; in command6() local
908 micro.pc = micro.yp << 1; in command6()
909 for (i = (micro.r & 31) << 1; i < 64; i++) in command6()
911 int saddr = micro.i++ & 0x3fff; in command6()
912 int daddr = 0x2000 + micro.pc++; in command6()
913 micro.pc &= 0x1ff; in command6()
915 if (micro.cmd & 0x10) in command6()
917 if (micro.cmd & 0x20) in command6()
919 if (micro.cmd & 0x40) in command6()
923 micro.count_states(3 + 2 * (64 - (micro.r & 31) * 2)); in command6()
925 return micro.cmd & 0x80; in command6()
938 struct micro_t &micro = m_micro; in command7() local
952 int addr = micro.yp * 32 + micro.xp / 8; in command7()
953 int shift = micro.xp & 7; in command7()
957 if (!(micro.cmd & 0x08) || m_fgcoll) in command7()
959 if (micro.cmd & 0x10) in command7()
961 m_gram[addr + 0] ^= micro.g >> shift; in command7()
962 m_gram[addr + 1] ^= micro.g << nshift; in command7()
964 if (micro.cmd & 0x20) in command7()
966 m_bram[addr + 0] ^= micro.b >> shift; in command7()
967 m_bram[addr + 1] ^= micro.b << nshift; in command7()
969 if (micro.cmd & 0x40) in command7()
971 m_rram[addr + 0] ^= micro.r >> shift; in command7()
972 m_rram[addr + 1] ^= micro.r << nshift; in command7()
979 if (micro.cmd & 0x10) in command7()
981 if ((m_gram[addr + 0] & (micro.g >> shift)) | (m_gram[addr + 1] & (micro.g << nshift))) in command7()
982 m_fgcoll = 1, m_fgcollx = micro.xp + 8, m_fgcolly = micro.yp; in command7()
983 m_gram[addr + 0] ^= micro.g >> shift; in command7()
984 m_gram[addr + 1] ^= micro.g << nshift; in command7()
986 if (micro.cmd & 0x20) in command7()
988 if ((m_bram[addr + 0] & (micro.b >> shift)) | (m_bram[addr + 1] & (micro.b << nshift))) in command7()
989 m_fgcoll = 1, m_fgcollx = micro.xp + 8, m_fgcolly = micro.yp; in command7()
990 m_bram[addr + 0] ^= micro.b >> shift; in command7()
991 m_bram[addr + 1] ^= micro.b << nshift; in command7()
993 if (micro.cmd & 0x40) in command7()
995 if ((m_rram[addr + 0] & (micro.r >> shift)) | (m_rram[addr + 1] & (micro.r << nshift))) in command7()
996 m_fgcoll = 1, m_fgcollx = micro.xp + 8, m_fgcolly = micro.yp; in command7()
997 m_rram[addr + 0] ^= micro.r >> shift; in command7()
998 m_rram[addr + 1] ^= micro.r << nshift; in command7()
1003 micro.count_states(4); in command7()
1005 return micro.cmd & 0x80; in command7()