annotate musashi/m68kops.c @ 1773:0a26f3657295 mame_interp

Remove MAME Z80 core in favor of my new Z80 core
author Michael Pavone <pavone@retrodev.com>
date Tue, 12 Mar 2019 21:59:52 -0700
parents ded16f3d7eb4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #include <stddef.h>
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #include "../util.h"
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3 #include "m68kcpu.h"
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 /* ========================= INSTRUCTION HANDLERS ========================= */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 static void m68k_op_1010(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 m68ki_exception_1010(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 static void m68k_op_1111(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 static void m68k_op_040fpu0_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27 static void m68k_op_040fpu1_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33 static void m68k_op_abcd_8_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
34 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
35 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
36 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
37 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
38 uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
39
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
40 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
41
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
42 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
43 res += 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
44 res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
45 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
46 if((mc68kcpu)->c_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
47 res -= 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
48
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
49 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
50 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
51
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
52 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
53 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
54
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
55 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
56 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
57
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
58
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
59 static void m68k_op_abcd_8_mm_ax7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
60 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
61 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
62 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
63 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
64 uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
65
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
66 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
67
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
68 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
69 res += 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
70 res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
71 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
72 if((mc68kcpu)->c_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
73 res -= 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
74
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
75 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
76 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
77
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
78 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
79 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
80
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
81 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
82 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
83
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
84
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
85 static void m68k_op_abcd_8_mm_ay7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
86 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
87 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
88 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
89 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
90 uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
91
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
92 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
93
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
94 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
95 res += 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
96 res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
97 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
98 if((mc68kcpu)->c_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
99 res -= 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
101 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
102 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
103
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
104 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
105 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
106
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
107 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
108 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
109
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
110
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
111 static void m68k_op_abcd_8_mm_axy7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
112 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
113 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
114 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
115 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
116 uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
117
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
118 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
120 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
121 res += 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
122 res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
123 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
124 if((mc68kcpu)->c_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
125 res -= 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
126
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
127 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
128 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
129
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
130 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
131 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
132
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
133 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
134 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
135
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
136
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
137 static void m68k_op_abcd_8_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
138 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
139 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
140 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
141 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
142 uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
144 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
146 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
147 res += 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
148 res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
149 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (res > 0x99) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
150 if((mc68kcpu)->c_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
151 res -= 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
152
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
153 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
154 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
156 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
157 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
158
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
159 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
160 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
163 static void m68k_op_add_8_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
165 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
166 uint32_t src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
167 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
168 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
169
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
170 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
171 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
172 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
173 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
175 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
176 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
177
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
178
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
179 static void m68k_op_add_8_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
180 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
181 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
182 uint32_t src = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
183 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
184 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
185
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
186 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
187 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
188 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
189 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
191 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
192 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
194
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
195 static void m68k_op_add_8_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
196 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
197 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
198 uint32_t src = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
199 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
200 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
202 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
203 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
204 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
205 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
207 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
211 static void m68k_op_add_8_er_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
212 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
213 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
214 uint32_t src = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
215 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
216 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
218 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
219 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
220 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
221 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
222
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
223 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
224 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
226
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
227 static void m68k_op_add_8_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
228 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
229 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
230 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
231 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
232 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
233
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
234 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
235 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
236 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
237 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
239 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
240 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
241
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
242
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
243 static void m68k_op_add_8_er_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
244 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
245 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
246 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
247 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
248 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
250 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
251 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
252 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
253 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
255 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
256 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
257
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
259 static void m68k_op_add_8_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
260 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
261 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
262 uint32_t src = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
263 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
264 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
266 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
267 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
268 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
269 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
270
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
271 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
272 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
275 static void m68k_op_add_8_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
276 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
277 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
278 uint32_t src = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
279 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
280 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
282 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
283 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
284 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
285 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
287 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
288 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
291 static void m68k_op_add_8_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
292 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
293 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
294 uint32_t src = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
295 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
296 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
298 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
299 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
300 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
301 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
302
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
303 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
304 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
306
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
307 static void m68k_op_add_8_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
308 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
309 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
310 uint32_t src = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
311 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
312 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
314 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
315 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
316 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
317 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
318
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
319 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
320 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
322
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
323 static void m68k_op_add_8_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
324 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
325 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
326 uint32_t src = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
327 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
328 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
330 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
331 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
332 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
333 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
334
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
335 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
336 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
338
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
339 static void m68k_op_add_8_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
340 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
341 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
342 uint32_t src = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
343 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
344 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
345
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
346 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
347 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
348 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
349 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
351 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
352 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
353
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
354
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
355 static void m68k_op_add_8_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
356 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
357 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
358 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
359 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
360 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
362 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
363 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
364 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
365 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
367 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
368 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
369
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
371 static void m68k_op_add_16_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
372 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
373 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
374 uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
375 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
376 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
378 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
379 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
380 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
381 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
383 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
384 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
386
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
387 static void m68k_op_add_16_er_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
388 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
389 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
390 uint32_t src = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
391 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
392 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
394 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
395 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
396 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
397 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
399 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
400 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
401
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
402
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
403 static void m68k_op_add_16_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
404 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
405 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
406 uint32_t src = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
407 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
408 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
409
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
410 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
411 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
412 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
413 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
414
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
415 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
416 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
419 static void m68k_op_add_16_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
420 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
421 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
422 uint32_t src = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
423 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
424 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
426 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
427 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
428 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
429 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
431 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
432 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
434
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
435 static void m68k_op_add_16_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
436 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
437 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
438 uint32_t src = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
439 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
440 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
442 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
443 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
444 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
445 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
446
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
447 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
448 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
451 static void m68k_op_add_16_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
452 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
453 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
454 uint32_t src = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
455 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
456 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
457
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
458 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
459 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
460 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
461 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
463 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
464 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
465
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
466
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
467 static void m68k_op_add_16_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
468 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
469 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
470 uint32_t src = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
471 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
472 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
473
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
474 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
475 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
476 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
477 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
478
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
479 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
480 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
483 static void m68k_op_add_16_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
484 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
485 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
486 uint32_t src = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
487 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
488 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
490 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
491 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
492 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
493 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
495 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
496 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
497
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
498
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
499 static void m68k_op_add_16_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
500 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
501 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
502 uint32_t src = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
503 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
504 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
505
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
506 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
507 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
508 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
509 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
511 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
512 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
514
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
515 static void m68k_op_add_16_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
516 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
517 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
518 uint32_t src = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
519 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
520 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
522 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
523 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
524 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
525 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
526
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
527 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
528 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
529
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
530
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
531 static void m68k_op_add_16_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
532 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
533 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
534 uint32_t src = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
535 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
536 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
538 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
539 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
540 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
541 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
543 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
544 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
547 static void m68k_op_add_16_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
548 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
549 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
550 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
551 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
552 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
554 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
555 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
556 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
557 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
558
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
559 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
560 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
562
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
563 static void m68k_op_add_32_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
564 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
565 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
566 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
567 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
568 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
570 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
571 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
572 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
573 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
575 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
576 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
577
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
578
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
579 static void m68k_op_add_32_er_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
580 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
581 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
582 uint32_t src = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
583 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
584 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
585
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
586 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
587 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
588 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
589 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
591 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
592 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
593
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
595 static void m68k_op_add_32_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
596 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
597 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
598 uint32_t src = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
599 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
600 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
602 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
603 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
604 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
605 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
607 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
608 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
609
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
611 static void m68k_op_add_32_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
612 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
613 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
614 uint32_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
615 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
616 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
618 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
619 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
620 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
621 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
623 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
624 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
625
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
627 static void m68k_op_add_32_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
628 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
629 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
630 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
631 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
632 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
633
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
634 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
635 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
636 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
637 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
639 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
640 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
643 static void m68k_op_add_32_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
644 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
645 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
646 uint32_t src = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
647 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
648 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
649
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
650 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
651 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
652 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
653 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
655 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
656 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
659 static void m68k_op_add_32_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
660 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
661 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
662 uint32_t src = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
663 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
664 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
666 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
667 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
668 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
669 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
671 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
672 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
673
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
674
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
675 static void m68k_op_add_32_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
676 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
677 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
678 uint32_t src = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
679 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
680 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
681
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
682 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
683 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
684 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
685 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
687 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
688 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
689
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
691 static void m68k_op_add_32_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
692 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
693 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
694 uint32_t src = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
695 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
696 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
697
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
698 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
699 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
700 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
701 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
702
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
703 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
704 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
707 static void m68k_op_add_32_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
708 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
709 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
710 uint32_t src = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
711 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
712 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
714 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
715 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
716 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
717 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
719 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
720 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
721
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
723 static void m68k_op_add_32_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
724 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
725 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
726 uint32_t src = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
727 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
728 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
730 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
731 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
732 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
733 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
735 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
736 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
738
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
739 static void m68k_op_add_32_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
740 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
741 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
742 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
743 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
744 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
745
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
746 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
747 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
748 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
749 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
751 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
752 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
754
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
755 static void m68k_op_add_8_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
756 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
757 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
758 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
759 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
760 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
762 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
763 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
764 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
765 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
766
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
767 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
768 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
771 static void m68k_op_add_8_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
772 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
773 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
774 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
775 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
776 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
777
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
778 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
779 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
780 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
781 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
783 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
784 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
786
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
787 static void m68k_op_add_8_re_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
788 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
789 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
790 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
791 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
792 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
793
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
794 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
795 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
796 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
797 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
799 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
800 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
801
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
802
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
803 static void m68k_op_add_8_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
804 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
805 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
806 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
807 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
808 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
810 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
811 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
812 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
813 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
815 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
816 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
817
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
819 static void m68k_op_add_8_re_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
820 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
821 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
822 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
823 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
824 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
826 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
827 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
828 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
829 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
830
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
831 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
832 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
833
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
835 static void m68k_op_add_8_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
836 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
837 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
838 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
839 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
840 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
841
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
842 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
843 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
844 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
845 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
847 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
848 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
850
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
851 static void m68k_op_add_8_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
852 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
853 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
854 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
855 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
856 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
857
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
858 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
859 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
860 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
861 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
863 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
864 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
865
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
867 static void m68k_op_add_8_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
868 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
869 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
870 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
871 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
872 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
874 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
875 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
876 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
877 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
878
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
879 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
880 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
883 static void m68k_op_add_8_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
884 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
885 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
886 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
887 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
888 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
889
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
890 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
891 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
892 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
893 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
895 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
896 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
897
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
898
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
899 static void m68k_op_add_16_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
900 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
901 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
902 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
903 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
904 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
906 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
907 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
908 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
909 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
911 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
912 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
913
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
914
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
915 static void m68k_op_add_16_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
916 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
917 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
918 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
919 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
920 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
922 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
923 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
924 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
925 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
927 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
928 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
930
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
931 static void m68k_op_add_16_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
932 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
933 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
934 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
935 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
936 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
938 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
939 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
940 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
941 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
942
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
943 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
944 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
947 static void m68k_op_add_16_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
948 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
949 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
950 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
951 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
952 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
954 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
955 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
956 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
957 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
959 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
960 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
962
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
963 static void m68k_op_add_16_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
964 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
965 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
966 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
967 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
968 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
970 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
971 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
972 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
973 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
974
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
975 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
976 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
977
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
978
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
979 static void m68k_op_add_16_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
980 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
981 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
982 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
983 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
984 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
985
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
986 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
987 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
988 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
989 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
991 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
992 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
995 static void m68k_op_add_16_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
996 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
997 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
998 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
999 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1000 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1001
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1002 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1003 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1004 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1005 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1006
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1007 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1008 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1010
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1011 static void m68k_op_add_32_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1012 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1013 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1014 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1015 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1016 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1017
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1018 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1019 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1020 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1021 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1023 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1024 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1025
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1027 static void m68k_op_add_32_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1028 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1029 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1030 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1031 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1032 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1034 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1035 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1036 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1037 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1039 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1040 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1043 static void m68k_op_add_32_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1044 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1045 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1046 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1047 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1048 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1050 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1051 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1052 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1053 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1054
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1055 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1056 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1058
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1059 static void m68k_op_add_32_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1060 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1061 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1062 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1063 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1064 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1065
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1066 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1067 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1068 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1069 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1070
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1071 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1072 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1073
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1075 static void m68k_op_add_32_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1076 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1077 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1078 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1079 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1080 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1081
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1082 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1083 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1084 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1085 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1087 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1088 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1089
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1091 static void m68k_op_add_32_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1092 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1093 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1094 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1095 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1096 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1098 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1099 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1100 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1101 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1102
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1103 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1104 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1106
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1107 static void m68k_op_add_32_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1108 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1109 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1110 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1111 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1112 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1114 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1115 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1116 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1117 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1119 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1120 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1121
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1123 static void m68k_op_adda_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1125 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1126
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1127 *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(DY(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1128 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1129
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1130
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1131 static void m68k_op_adda_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1132 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1133 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1135 *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(AY(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1136 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1139 static void m68k_op_adda_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1140 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1141 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1142 uint32_t src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1144 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1145 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1146
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1148 static void m68k_op_adda_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1149 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1150 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1151 uint32_t src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1152
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1153 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1154 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1157 static void m68k_op_adda_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1158 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1159 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1160 uint32_t src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1162 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1163 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1164
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1165
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1166 static void m68k_op_adda_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1167 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1168 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1169 uint32_t src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1170
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1171 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1172 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1175 static void m68k_op_adda_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1176 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1177 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1178 uint32_t src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1180 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1181 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1182
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1184 static void m68k_op_adda_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1185 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1186 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1187 uint32_t src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1188
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1189 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1190 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1191
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1193 static void m68k_op_adda_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1194 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1195 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1196 uint32_t src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1198 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1199 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1200
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1202 static void m68k_op_adda_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1203 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1204 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1205 uint32_t src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1207 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1211 static void m68k_op_adda_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1212 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1213 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1214 uint32_t src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1216 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1217 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1219
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1220 static void m68k_op_adda_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1221 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1222 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1223 uint32_t src = MAKE_INT_16(OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1224
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1225 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1226 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1229 static void m68k_op_adda_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1230 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1231 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1233 *r_dst = MASK_OUT_ABOVE_32(*r_dst + DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1234 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1235
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1236
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1237 static void m68k_op_adda_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1238 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1239 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1240
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1241 *r_dst = MASK_OUT_ABOVE_32(*r_dst + AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1242 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1244
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1245 static void m68k_op_adda_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1246 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1247 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1248 uint32_t src = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1250 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1251 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1252
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1254 static void m68k_op_adda_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1255 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1256 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1257 uint32_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1259 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1260 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1261
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1262
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1263 static void m68k_op_adda_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1264 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1265 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1266 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1267
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1268 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1269 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1270
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1271
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1272 static void m68k_op_adda_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1273 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1274 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1275 uint32_t src = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1277 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1278 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1280
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1281 static void m68k_op_adda_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1282 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1283 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1284 uint32_t src = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1285
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1286 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1287 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1290 static void m68k_op_adda_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1291 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1292 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1293 uint32_t src = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1295 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1296 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1298
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1299 static void m68k_op_adda_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1300 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1301 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1302 uint32_t src = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1303
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1304 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1305 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1306
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1308 static void m68k_op_adda_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1309 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1310 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1311 uint32_t src = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1312
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1313 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1314 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1316
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1317 static void m68k_op_adda_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1318 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1319 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1320 uint32_t src = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1322 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1323 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1325
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1326 static void m68k_op_adda_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1327 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1328 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1329 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1331 *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1332 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1333
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1334
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1335 static void m68k_op_addi_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1336 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1337 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1338 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1339 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1340 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1342 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1343 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1344 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1345 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1346
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1347 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1348 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1351 static void m68k_op_addi_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1352 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1353 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1354 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1355 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1356 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1357
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1358 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1359 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1360 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1361 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1362
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1363 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1364 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1367 static void m68k_op_addi_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1369 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1370 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1371 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1372 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1373
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1374 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1375 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1376 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1377 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1379 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1380 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1383 static void m68k_op_addi_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1384 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1385 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1386 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1387 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1388 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1390 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1391 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1392 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1393 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1395 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1396 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1399 static void m68k_op_addi_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1400 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1401 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1402 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1403 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1404 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1406 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1407 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1408 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1409 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1411 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1412 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1414
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1415 static void m68k_op_addi_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1416 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1417 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1418 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1419 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1420 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1422 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1423 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1424 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1425 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1427 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1428 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1429
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1431 static void m68k_op_addi_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1432 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1433 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1434 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1435 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1436 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1437
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1438 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1439 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1440 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1441 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1443 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1444 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1445
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1446
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1447 static void m68k_op_addi_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1448 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1449 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1450 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1451 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1452 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1453
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1454 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1455 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1456 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1457 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1458
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1459 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1463 static void m68k_op_addi_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1464 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1465 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1466 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1467 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1468 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1470 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1471 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1472 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1473 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1475 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1476 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1477
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1478
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1479 static void m68k_op_addi_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1480 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1481 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1482 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1483 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1484 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1485
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1486 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1487 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1488 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1489 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1491 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1492 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1493
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1495 static void m68k_op_addi_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1496 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1497 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1498 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1499 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1500 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1502 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1503 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1504 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1505 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1507 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1508 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1511 static void m68k_op_addi_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1512 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1513 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1514 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1515 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1516 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1518 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1519 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1520 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1521 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1523 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1524 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1526
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1527 static void m68k_op_addi_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1528 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1529 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1530 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1531 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1532 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1533
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1534 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1535 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1536 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1537 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1539 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1540 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1543 static void m68k_op_addi_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1544 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1545 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1546 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1547 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1548 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1549
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1550 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1551 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1552 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1553 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1555 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1556 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1557
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1558
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1559 static void m68k_op_addi_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1560 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1561 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1562 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1563 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1564 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1565
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1566 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1567 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1568 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1569 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1570
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1571 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1572 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1575 static void m68k_op_addi_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1576 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1577 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1578 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1579 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1580 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1582 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1583 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1584 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1585 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1587 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1588 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1591 static void m68k_op_addi_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1592 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1593 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1594 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1595 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1596 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1598 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1599 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1600 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1601 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1603 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1604 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1607 static void m68k_op_addi_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1608 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1609 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1610 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1611 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1612 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1613
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1614 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1615 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1616 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1617 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1619 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1620 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1623 static void m68k_op_addi_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1624 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1625 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1626 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1627 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1628 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1629
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1630 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1631 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1632 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1633 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1634
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1635 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1636 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1639 static void m68k_op_addi_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1640 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1641 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1642 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1643 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1644 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1646 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1647 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1648 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1649 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1651 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1652 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1653
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1655 static void m68k_op_addi_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1656 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1657 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1658 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1659 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1660 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1661
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1662 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1663 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1664 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1665 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1667 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1668 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1669
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1671 static void m68k_op_addi_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1672 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1673 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1674 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1675 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1676 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1678 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1679 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1680 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1681 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1682
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1683 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1684 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1687 static void m68k_op_addi_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1688 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1689 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1690 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1691 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1692 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1694 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1695 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1696 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1697 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1698
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1699 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1700 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1702
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1703 static void m68k_op_addi_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1704 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1705 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1706 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1707 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1708 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1709
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1710 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1711 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1712 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1713 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1715 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1716 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1719 static void m68k_op_addi_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1720 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1721 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1722 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1723 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1724 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1726 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1727 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1728 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1729 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1731 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1732 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1733
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1735 static void m68k_op_addi_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1736 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1737 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1738 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1739 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1740 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1741
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1742 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1743 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1744 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1745 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1746
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1747 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1748 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1751 static void m68k_op_addq_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1752 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1753 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1754 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1755 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1756 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1758 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1759 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1760 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1761 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1763 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1764 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1765
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1766
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1767 static void m68k_op_addq_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1768 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1769 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1770 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1771 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1772 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1774 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1775 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1776 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1777 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1778
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1779 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1780 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1781
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1783 static void m68k_op_addq_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1784 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1785 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1786 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1787 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1788 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1789
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1790 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1791 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1792 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1793 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1794
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1795 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1796 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1799 static void m68k_op_addq_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1800 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1801 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1802 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1803 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1804 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1805
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1806 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1807 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1808 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1809 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1810
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1811 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1812 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1815 static void m68k_op_addq_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1816 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1817 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1818 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1819 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1820 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1821
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1822 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1823 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1824 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1825 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1827 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1828 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1829
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1830
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1831 static void m68k_op_addq_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1832 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1833 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1834 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1835 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1836 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1837
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1838 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1839 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1840 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1841 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1842
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1843 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1844 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1847 static void m68k_op_addq_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1848 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1849 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1850 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1851 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1852 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1854 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1855 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1856 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1857 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1858
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1859 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1860 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1863 static void m68k_op_addq_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1864 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1865 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1866 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1867 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1868 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1870 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1871 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1872 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1873 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1875 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1876 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1877
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1878
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1879 static void m68k_op_addq_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1880 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1881 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1882 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1883 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1884 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1885
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1886 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1887 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1888 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1889 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1890
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1891 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1892 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1895 static void m68k_op_addq_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1896 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1897 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1898 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1899 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1900 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1902 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1903 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1904 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1905 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1906
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1907 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1908 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1911 static void m68k_op_addq_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1912 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1913 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1914 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1915 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1916 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1918 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1919 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1920 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1921 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1922
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1923 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1924 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1927 static void m68k_op_addq_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1928 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1929 uint32_t* r_dst = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1930
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1931 *r_dst = MASK_OUT_ABOVE_32(*r_dst + ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1932 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1933
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1934
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1935 static void m68k_op_addq_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1936 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1937 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1938 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1939 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1940 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1942 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1943 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1944 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1945 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1947 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1948 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1949
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1950
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1951 static void m68k_op_addq_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1952 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1953 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1954 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1955 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1956 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1958 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1959 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1960 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1961 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1962
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1963 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1964 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1966
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1967 static void m68k_op_addq_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1968 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1969 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1970 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1971 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1972 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1974 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1975 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1976 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1977 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1978
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1979 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1980 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1983 static void m68k_op_addq_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1984 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1985 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1986 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1987 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1988 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1990 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1991 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1992 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1993 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1995 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1996 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1998
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1999 static void m68k_op_addq_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2000 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2001 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2002 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2003 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2004 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2006 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2007 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2008 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2009 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2010
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2011 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2012 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2013
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2015 static void m68k_op_addq_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2016 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2017 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2018 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2019 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2020 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2021
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2022 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2023 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2024 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2025 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2027 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2028 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2030
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2031 static void m68k_op_addq_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2032 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2033 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2034 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2035 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2036 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2037
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2038 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2039 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2040 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2041 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2043 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2044 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2045
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2047 static void m68k_op_addq_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2048 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2049 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2050 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2051 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2052 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2053
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2054 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2055 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2056 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2057 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2058
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2059 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2060 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2061
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2063 static void m68k_op_addq_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2064 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2065 uint32_t* r_dst = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2066
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2067 *r_dst = MASK_OUT_ABOVE_32(*r_dst + ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2068 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2070
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2071 static void m68k_op_addq_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2072 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2073 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2074 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2075 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2076 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2079 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2080 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2081 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2082 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2084 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2085 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2087
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2088 static void m68k_op_addq_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2089 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2090 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2091 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2092 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2093 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2094
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2095
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2096 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2097 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2098 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2099 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2101 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2102 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2103
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2104
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2105 static void m68k_op_addq_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2106 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2107 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2108 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2109 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2110 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2113 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2114 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2115 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2116 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2117
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2118 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2119 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2120
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2121
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2122 static void m68k_op_addq_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2123 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2124 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2125 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2126 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2127 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2128
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2129
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2130 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2131 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2132 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2133 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2135 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2136 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2139 static void m68k_op_addq_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2140 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2141 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2142 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2143 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2144 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2146
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2147 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2148 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2149 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2150 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2151
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2152 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2153 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2154
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2156 static void m68k_op_addq_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2157 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2158 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2159 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2160 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2161 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2163
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2164 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2165 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2166 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2167 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2169 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2170 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2171
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2173 static void m68k_op_addq_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2174 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2175 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2176 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2177 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2178 uint32_t res = src + dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2180
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2181 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2182 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2183 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2184 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2185
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2186 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2187 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2188
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2190 static void m68k_op_addx_8_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2191 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2192 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2193 uint32_t src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2194 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2195 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2196
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2197 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2198 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2199 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2200
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2201 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2202 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2204 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2205 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2207
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2208 static void m68k_op_addx_16_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2209 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2210 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2211 uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2212 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2213 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2214
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2215 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2216 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2217 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2219 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2220 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2221
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2222 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2223 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2224
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2226 static void m68k_op_addx_32_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2227 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2228 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2229 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2230 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2231 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2233 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2234 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2235 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2236
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2237 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2238 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2240 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2241 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2242
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2244 static void m68k_op_addx_8_mm_ax7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2245 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2246 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2247 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2248 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2249 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2251 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2252 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2253 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2255 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2256 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2257
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2258 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2259 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2261
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2262 static void m68k_op_addx_8_mm_ay7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2263 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2264 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2265 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2266 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2267 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2268
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2269 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2270 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2271 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2272
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2273 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2274 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2276 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2277 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2278
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2280 static void m68k_op_addx_8_mm_axy7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2281 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2282 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2283 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2284 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2285 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2287 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2288 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2289 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2291 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2292 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2294 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2295 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2296
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2298 static void m68k_op_addx_8_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2299 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2300 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2301 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2302 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2303 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2304
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2305 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2306 (mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2307 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2309 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2310 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2311
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2312 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2313 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2316 static void m68k_op_addx_16_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2317 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2318 uint32_t src = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2319 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2320 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2321 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2322
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2323 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2324 (mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2325 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2326
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2327 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2328 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2330 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2331 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2332
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2333
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2334 static void m68k_op_addx_32_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2335 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2336 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2337 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2338 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2339 uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2340
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2341 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2342 (mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2343 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_ADD_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2344
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2345 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2346 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2348 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2349 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2352 static void m68k_op_and_8_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2353 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2354 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (DY(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2356 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2357 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2358 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2359 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2362 static void m68k_op_and_8_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2363 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2364 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_AI_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2366 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2367 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2368 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2369 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2372 static void m68k_op_and_8_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2373 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2374 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_PI_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2375
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2376 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2377 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2378 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2379 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2380
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2382 static void m68k_op_and_8_er_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2383 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2384 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_A7_PI_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2386 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2387 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2388 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2389 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2390
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2392 static void m68k_op_and_8_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2393 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2394 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_PD_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2395
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2396 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2397 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2398 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2399 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2401
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2402 static void m68k_op_and_8_er_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2403 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2404 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_A7_PD_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2406 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2407 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2408 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2409 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2412 static void m68k_op_and_8_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2413 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2414 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_DI_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2415
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2416 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2417 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2418 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2419 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2420
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2422 static void m68k_op_and_8_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2423 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2424 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AY_IX_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2426 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2427 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2428 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2429 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2431
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2432 static void m68k_op_and_8_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2433 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2434 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AW_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2436 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2437 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2438 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2439 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2440
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2442 static void m68k_op_and_8_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2443 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2444 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_AL_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2445
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2446 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2447 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2448 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2449 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2452 static void m68k_op_and_8_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2453 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2454 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_PCDI_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2456 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2457 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2458 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2459 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2460
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2462 static void m68k_op_and_8_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2463 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2464 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_PCIX_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2465
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2466 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2467 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2468 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2469 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2471
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2472 static void m68k_op_and_8_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2473 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2474 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DX(mc68kcpu) &= (OPER_I_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2475
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2476 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2477 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2478 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2479 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2480
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2482 static void m68k_op_and_16_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2483 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2484 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (DY(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2485
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2486 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2487 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2488 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2489 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2492 static void m68k_op_and_16_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2493 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2494 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_AI_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2495
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2496 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2497 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2498 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2499 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2502 static void m68k_op_and_16_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2503 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2504 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_PI_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2505
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2506 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2507 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2508 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2509 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2512 static void m68k_op_and_16_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2513 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2514 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_PD_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2516 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2517 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2518 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2519 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2520
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2522 static void m68k_op_and_16_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2523 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2524 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_DI_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2526 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2527 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2528 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2529 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2530
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2532 static void m68k_op_and_16_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2533 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2534 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AY_IX_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2536 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2537 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2538 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2539 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2540
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2542 static void m68k_op_and_16_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2543 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2544 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AW_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2546 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2547 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2548 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2549 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2550
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2551
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2552 static void m68k_op_and_16_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2553 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2554 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_AL_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2555
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2556 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2557 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2558 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2559 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2562 static void m68k_op_and_16_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2563 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2564 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_PCDI_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2565
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2566 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2567 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2568 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2569 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2570
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2571
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2572 static void m68k_op_and_16_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2573 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2574 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_PCIX_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2576 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2577 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2578 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2579 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2580
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2582 static void m68k_op_and_16_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2583 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2584 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DX(mc68kcpu) &= (OPER_I_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2585
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2586 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2587 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2588 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2589 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2591
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2592 static void m68k_op_and_32_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2593 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2594 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2596 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2597 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2598 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2599 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2600
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2602 static void m68k_op_and_32_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2603 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2604 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2606 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2607 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2608 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2609 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2612 static void m68k_op_and_32_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2613 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2614 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2616 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2617 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2618 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2619 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2620
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2622 static void m68k_op_and_32_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2623 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2624 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2625
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2626 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2627 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2628 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2629 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2631
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2632 static void m68k_op_and_32_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2633 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2634 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2636 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2637 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2638 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2639 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2640
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2642 static void m68k_op_and_32_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2643 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2644 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2646 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2647 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2648 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2649 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2651
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2652 static void m68k_op_and_32_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2653 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2654 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2655
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2656 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2657 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2658 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2659 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2660
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2661
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2662 static void m68k_op_and_32_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2663 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2664 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2666 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2667 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2668 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2669 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2672 static void m68k_op_and_32_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2673 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2674 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2675
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2676 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2677 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2678 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2679 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2681
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2682 static void m68k_op_and_32_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2683 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2684 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2686 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2687 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2688 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2689 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2692 static void m68k_op_and_32_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2693 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2694 (mc68kcpu)->not_z_flag = DX(mc68kcpu) &= OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2695
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2696 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2697 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2698 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2699 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2702 static void m68k_op_and_8_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2703 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2704 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2705 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2707 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2708 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2709 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2710 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2712 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2713 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2716 static void m68k_op_and_8_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2717 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2718 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2719 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2720
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2721 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2722 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2723 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2724 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2726 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2727 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2730 static void m68k_op_and_8_re_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2731 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2732 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2733 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2735 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2736 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2737 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2738 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2739
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2740 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2741 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2744 static void m68k_op_and_8_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2745 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2746 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2747 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2748
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2749 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2750 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2751 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2752 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2754 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2755 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2758 static void m68k_op_and_8_re_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2759 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2760 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2761 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2763 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2764 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2765 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2766 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2767
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2768 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2769 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2771
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2772 static void m68k_op_and_8_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2773 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2774 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2775 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2776
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2777 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2778 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2779 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2780 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2781
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2782 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2783 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2784
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2786 static void m68k_op_and_8_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2787 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2788 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2789 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2791 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2792 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2793 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2794 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2795
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2796 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2797 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2799
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2800 static void m68k_op_and_8_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2801 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2802 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2803 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2804
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2805 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2806 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2807 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2808 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2810 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2811 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2812
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2814 static void m68k_op_and_8_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2815 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2816 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2817 uint32_t res = DX(mc68kcpu) & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2819 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2820 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2821 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2822 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2823
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2824 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2825 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2828 static void m68k_op_and_16_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2829 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2830 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2831 uint32_t res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2832
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2833 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2834 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2835 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2836 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2837
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2838 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2839 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2840
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2841
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2842 static void m68k_op_and_16_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2843 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2844 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2845 uint32_t res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2847 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2848 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2849 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2850 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2852 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2853 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2856 static void m68k_op_and_16_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2857 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2858 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2859 uint32_t res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2861 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2862 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2863 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2864 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2865
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2866 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2867 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2870 static void m68k_op_and_16_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2871 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2872 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2873 uint32_t res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2875 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2876 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2877 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2878 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2880 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2881 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2884 static void m68k_op_and_16_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2885 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2886 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2887 uint32_t res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2889 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2890 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2891 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2892 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2894 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2895 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2897
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2898 static void m68k_op_and_16_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2899 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2900 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2901 uint32_t res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2902
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2903 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2904 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2905 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2906 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2907
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2908 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2909 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2912 static void m68k_op_and_16_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2913 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2914 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2915 uint32_t res = DX(mc68kcpu) & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2916
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2917 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2918 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2919 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2920 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2922 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2923 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2926 static void m68k_op_and_32_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2927 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2928 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2929 uint32_t res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2930
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2931 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2932 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2933 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2934 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2936 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2937 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2940 static void m68k_op_and_32_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2941 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2942 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2943 uint32_t res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2944
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2945 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2946 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2947 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2948 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2949
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2950 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2951 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2954 static void m68k_op_and_32_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2955 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2956 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2957 uint32_t res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2959 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2960 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2961 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2962 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2964 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2965 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2966
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2967
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2968 static void m68k_op_and_32_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2969 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2970 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2971 uint32_t res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2972
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2973 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2974 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2975 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2976 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2977
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2978 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2979 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2980
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2982 static void m68k_op_and_32_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2983 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2984 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2985 uint32_t res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2986
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2987 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2988 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2989 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2990 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2991
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2992 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2993 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2995
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2996 static void m68k_op_and_32_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2997 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2998 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2999 uint32_t res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3001 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3002 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3003 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3004 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3006 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3007 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3010 static void m68k_op_and_32_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3011 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3012 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3013 uint32_t res = DX(mc68kcpu) & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3015 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3016 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3017 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3018 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3020 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3021 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3024 static void m68k_op_andi_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3025 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3026 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(DY(mc68kcpu) &= (OPER_I_8(mc68kcpu) | 0xffffff00));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3028 (mc68kcpu)->n_flag = NFLAG_8((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3029 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3030 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3031 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3032
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3034 static void m68k_op_andi_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3035 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3036 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3037 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3038 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3040 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3041 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3042 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3043 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3044
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3045 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3046 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3049 static void m68k_op_andi_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3050 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3051 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3052 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3053 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3054
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3055 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3056 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3057 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3058 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3060 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3061 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3064 static void m68k_op_andi_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3065 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3066 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3067 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3068 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3070 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3071 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3072 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3073 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3075 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3079 static void m68k_op_andi_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3081 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3082 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3083 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3085 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3086 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3087 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3088 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3089
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3090 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3091 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3092
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3093
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3094 static void m68k_op_andi_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3095 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3096 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3097 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3098 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3100 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3101 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3102 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3103 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3104
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3105 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3106 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3108
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3109 static void m68k_op_andi_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3110 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3111 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3112 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3113 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3114
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3115 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3116 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3117 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3118 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3120 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3121 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3123
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3124 static void m68k_op_andi_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3125 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3126 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3127 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3128 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3129
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3130 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3131 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3132 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3133 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3135 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3136 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3139 static void m68k_op_andi_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3140 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3141 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3142 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3143 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3144
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3145 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3146 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3147 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3148 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3149
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3150 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3151 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3152
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3154 static void m68k_op_andi_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3155 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3156 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3157 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3158 uint32_t res = src & m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3159
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3160 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3161 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3162 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3163 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3164
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3165 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3166 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3169 static void m68k_op_andi_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3170 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3171 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(DY(mc68kcpu) &= (OPER_I_16(mc68kcpu) | 0xffff0000));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3173 (mc68kcpu)->n_flag = NFLAG_16((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3174 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3175 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3176 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3177
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3178
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3179 static void m68k_op_andi_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3180 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3181 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3182 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3183 uint32_t res = src & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3185 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3186 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3187 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3188 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3190 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3191 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3194 static void m68k_op_andi_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3195 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3196 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3197 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3198 uint32_t res = src & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3200 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3201 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3202 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3203 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3205 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3206 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3207
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3208
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3209 static void m68k_op_andi_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3210 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3211 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3212 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3213 uint32_t res = src & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3214
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3215 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3216 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3217 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3218 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3219
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3220 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3221 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3222
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3224 static void m68k_op_andi_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3225 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3226 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3227 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3228 uint32_t res = src & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3229
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3230 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3231 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3232 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3233 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3234
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3235 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3236 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3239 static void m68k_op_andi_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3240 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3241 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3242 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3243 uint32_t res = src & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3244
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3245 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3246 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3247 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3248 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3250 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3251 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3252
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3254 static void m68k_op_andi_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3255 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3256 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3257 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3258 uint32_t res = src & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3260 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3261 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3262 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3263 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3265 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3266 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3267
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3268
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3269 static void m68k_op_andi_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3270 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3271 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3272 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3273 uint32_t res = src & m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3275 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3276 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3277 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3278 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3280 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3281 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3283
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3284 static void m68k_op_andi_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3285 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3286 (mc68kcpu)->not_z_flag = DY(mc68kcpu) &= (OPER_I_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3288 (mc68kcpu)->n_flag = NFLAG_32((mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3289 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3290 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3291 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3292
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3294 static void m68k_op_andi_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3295 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3296 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3297 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3298 uint32_t res = src & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3300 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3301 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3302 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3303 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3304
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3305 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3306 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3309 static void m68k_op_andi_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3310 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3311 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3312 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3313 uint32_t res = src & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3315 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3316 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3317 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3318 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3319
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3320 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3321 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3322
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3324 static void m68k_op_andi_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3325 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3326 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3327 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3328 uint32_t res = src & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3330 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3331 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3332 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3333 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3334
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3335 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3336 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3338
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3339 static void m68k_op_andi_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3340 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3341 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3342 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3343 uint32_t res = src & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3344
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3345 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3346 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3347 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3348 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3350 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3351 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3352
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3353
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3354 static void m68k_op_andi_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3355 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3356 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3357 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3358 uint32_t res = src & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3360 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3361 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3362 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3363 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3364
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3365 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3366 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3367
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3368
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3369 static void m68k_op_andi_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3370 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3371 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3372 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3373 uint32_t res = src & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3374
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3375 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3376 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3377 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3378 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3380 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3381 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3383
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3384 static void m68k_op_andi_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3385 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3386 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3387 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3388 uint32_t res = src & m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3390 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3391 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3392 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3393 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3395 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3396 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3399 static void m68k_op_andi_16_toc(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3400 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3401 m68ki_set_ccr((mc68kcpu), m68ki_get_ccr(mc68kcpu) & OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3402 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3405 static void m68k_op_andi_16_tos(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3406 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3407 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3408 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3409 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3410 //m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3411 m68ki_set_sr((mc68kcpu), m68ki_get_sr(mc68kcpu) & src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3412 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3413 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3414 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3415 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3418 static void m68k_op_asr_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3419 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3420 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3421 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3422 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3423 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3424
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3425 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3426 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3428 if(GET_MSB_8(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3429 res |= m68ki_shift_8_table[shift];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3431 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3433 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3434 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3435 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3436 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3437 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3440 static void m68k_op_asr_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3441 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3442 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3443 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3444 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3445 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3446
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3447 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3448 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3450 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3451 res |= m68ki_shift_16_table[shift];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3452
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3453 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3454
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3455 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3456 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3457 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3458 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3459 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3460
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3462 static void m68k_op_asr_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3463 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3464 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3465 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3466 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3467 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3468
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3469 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3470 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3471
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3472 if(GET_MSB_32(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3473 res |= m68ki_shift_32_table[shift];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3475 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3477 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3478 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3479 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3480 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3481 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3484 static void m68k_op_asr_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3485 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3486 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3487 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3488 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3489 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3491 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3492 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3493 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3495 if(shift < 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3496 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3497 if(GET_MSB_8(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3498 res |= m68ki_shift_8_table[shift];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3500 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3502 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3503 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3504 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3505 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3506 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3507 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3508
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3509 if(GET_MSB_8(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3510 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3511 *r_dst |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3512 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3513 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3514 (mc68kcpu)->n_flag = NFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3515 (mc68kcpu)->not_z_flag = ZFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3516 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3517 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3518 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3519
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3520 *r_dst &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3521 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3522 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3523 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3524 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3525 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3526 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3527 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3528
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3529 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3530 (mc68kcpu)->n_flag = NFLAG_8(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3531 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3532 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3534
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3536 static void m68k_op_asr_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3537 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3538 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3539 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3540 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3541 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3543 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3544 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3545 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3547 if(shift < 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3548 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3549 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3550 res |= m68ki_shift_16_table[shift];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3551
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3552 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3554 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3555 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3556 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3557 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3558 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3559 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3561 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3562 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3563 *r_dst |= 0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3564 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3565 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3566 (mc68kcpu)->n_flag = NFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3567 (mc68kcpu)->not_z_flag = ZFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3568 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3569 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3570 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3571
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3572 *r_dst &= 0xffff0000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3573 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3574 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3575 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3576 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3577 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3578 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3579 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3580
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3581 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3582 (mc68kcpu)->n_flag = NFLAG_16(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3583 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3584 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3585 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3588 static void m68k_op_asr_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3589 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3590 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3591 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3592 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3593 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3595 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3596 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3597 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3598
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3599 if(shift < 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3600 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3601 if(GET_MSB_32(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3602 res |= m68ki_shift_32_table[shift];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3604 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3606 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3607 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3608 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3609 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3610 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3611 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3612
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3613 if(GET_MSB_32(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3614 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3615 *r_dst = 0xffffffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3616 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3617 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3618 (mc68kcpu)->n_flag = NFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3619 (mc68kcpu)->not_z_flag = ZFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3620 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3621 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3622 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3623
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3624 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3625 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3626 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3627 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3628 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3629 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3630 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3631 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3632
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3633 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3634 (mc68kcpu)->n_flag = NFLAG_32(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3635 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3636 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3637 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3639
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3640 static void m68k_op_asr_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3641 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3642 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3643 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3644 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3646 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3647 res |= 0x8000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3648
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3649 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3651 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3652 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3653 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3654 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3655 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3656
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3658 static void m68k_op_asr_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3659 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3660 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3661 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3662 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3664 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3665 res |= 0x8000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3667 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3668
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3669 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3670 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3671 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3672 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3673 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3674
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3675
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3676 static void m68k_op_asr_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3677 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3678 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3679 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3680 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3681
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3682 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3683 res |= 0x8000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3684
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3685 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3687 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3688 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3689 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3690 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3691 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3694 static void m68k_op_asr_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3695 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3696 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3697 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3698 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3699
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3700 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3701 res |= 0x8000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3702
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3703 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3704
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3705 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3706 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3707 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3708 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3709 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3710
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3712 static void m68k_op_asr_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3713 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3714 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3715 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3716 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3718 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3719 res |= 0x8000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3720
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3721 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3723 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3724 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3725 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3726 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3727 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3730 static void m68k_op_asr_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3731 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3732 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3733 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3734 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3735
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3736 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3737 res |= 0x8000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3738
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3739 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3740
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3741 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3742 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3743 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3744 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3745 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3746
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3748 static void m68k_op_asr_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3749 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3750 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3751 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3752 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3754 if(GET_MSB_16(src))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3755 res |= 0x8000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3757 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3758
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3759 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3760 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3761 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3762 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3763 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3765
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3766 static void m68k_op_asl_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3767 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3768 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3769 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3770 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3771 uint32_t res = MASK_OUT_ABOVE_8(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3772
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3773 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3774 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3775
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3776 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3777
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3778 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3779 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3780 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3781 src &= m68ki_shift_8_table[shift + 1];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3782 (mc68kcpu)->v_flag = (!(src == 0 || (src == m68ki_shift_8_table[shift + 1] && shift < 8)))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3783 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3784
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3786 static void m68k_op_asl_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3787 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3788 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3789 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3790 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3791 uint32_t res = MASK_OUT_ABOVE_16(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3793 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3794 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3795
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3796 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3798 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3799 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3800 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (8-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3801 src &= m68ki_shift_16_table[shift + 1];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3802 (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_16_table[shift + 1]))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3803 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3804
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3805
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3806 static void m68k_op_asl_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3807 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3808 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3809 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3810 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3811 uint32_t res = MASK_OUT_ABOVE_32(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3812
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3813 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3814 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3816 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3817
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3818 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3819 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3820 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (24-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3821 src &= m68ki_shift_32_table[shift + 1];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3822 (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_32_table[shift + 1]))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3823 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3824
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3826 static void m68k_op_asl_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3827 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3828 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3829 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3830 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3831 uint32_t res = MASK_OUT_ABOVE_8(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3832
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3833 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3834 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3835 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3836
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3837 if(shift < 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3838 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3839 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3840 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3841 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3842 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3843 src &= m68ki_shift_8_table[shift + 1];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3844 (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_8_table[shift + 1]))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3845 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3846 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3847
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3848 *r_dst &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3849 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 8 ? src & 1 : 0))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3850 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3851 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3852 (mc68kcpu)->v_flag = (!(src == 0))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3853 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3854 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3856 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3857 (mc68kcpu)->n_flag = NFLAG_8(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3858 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3859 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3860 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3863 static void m68k_op_asl_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3864 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3865 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3866 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3867 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3868 uint32_t res = MASK_OUT_ABOVE_16(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3870 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3871 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3872 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3874 if(shift < 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3875 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3876 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3877 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src << shift) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3878 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3879 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3880 src &= m68ki_shift_16_table[shift + 1];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3881 (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_16_table[shift + 1]))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3882 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3883 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3884
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3885 *r_dst &= 0xffff0000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3886 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 16 ? src & 1 : 0))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3887 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3888 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3889 (mc68kcpu)->v_flag = (!(src == 0))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3890 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3891 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3892
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3893 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3894 (mc68kcpu)->n_flag = NFLAG_16(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3895 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3896 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3897 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3898
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3900 static void m68k_op_asl_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3901 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3902 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3903 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3904 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3905 uint32_t res = MASK_OUT_ABOVE_32(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3906
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3907 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3908 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3909 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3911 if(shift < 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3912 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3913 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3914 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src >> (32 - shift)) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3915 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3916 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3917 src &= m68ki_shift_32_table[shift + 1];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3918 (mc68kcpu)->v_flag = (!(src == 0 || src == m68ki_shift_32_table[shift + 1]))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3919 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3920 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3922 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3923 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 32 ? src & 1 : 0))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3924 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3925 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3926 (mc68kcpu)->v_flag = (!(src == 0))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3927 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3928 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3930 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3931 (mc68kcpu)->n_flag = NFLAG_32(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3932 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3933 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3934 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3936
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3937 static void m68k_op_asl_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3938 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3939 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3940 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3941 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3942
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3943 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3944
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3945 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3946 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3947 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3948 src &= 0xc000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3949 (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3953 static void m68k_op_asl_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3954 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3955 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3956 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3957 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3959 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3960
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3961 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3962 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3963 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3964 src &= 0xc000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3965 (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3966 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3967
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3969 static void m68k_op_asl_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3970 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3971 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3972 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3973 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3974
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3975 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3977 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3978 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3979 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3980 src &= 0xc000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3981 (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3982 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3984
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3985 static void m68k_op_asl_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3986 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3987 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3988 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3989 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3991 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3992
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3993 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3994 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3995 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3996 src &= 0xc000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3997 (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3998 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4001 static void m68k_op_asl_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4002 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4003 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4004 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4005 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4006
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4007 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4009 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4010 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4011 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4012 src &= 0xc000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4013 (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4014 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4016
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4017 static void m68k_op_asl_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4018 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4019 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4020 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4021 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4023 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4024
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4025 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4026 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4027 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4028 src &= 0xc000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4029 (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4030 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4031
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4032
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4033 static void m68k_op_asl_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4034 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4035 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4036 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4037 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4039 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4040
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4041 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4042 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4043 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4044 src &= 0xc000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4045 (mc68kcpu)->v_flag = (!(src == 0 || src == 0xc000))<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4046 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4049 static void m68k_op_bhi_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4050 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4051 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4052 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4053 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4054 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4055 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4056 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4057 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4058 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4060
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4061 static void m68k_op_bls_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4062 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4063 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4064 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4065 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4066 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4067 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4068 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4069 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4070 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4073 static void m68k_op_bcc_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4074 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4075 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4076 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4077 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4078 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4079 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4080 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4081 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4082 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4085 static void m68k_op_bcs_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4086 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4087 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4088 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4089 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4090 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4091 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4092 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4093 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4094 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4095
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4096
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4097 static void m68k_op_bne_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4098 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4099 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4100 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4101 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4102 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4103 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4104 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4105 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4106 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4108
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4109 static void m68k_op_beq_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4110 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4111 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4112 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4113 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4114 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4115 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4116 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4117 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4118 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4120
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4121 static void m68k_op_bvc_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4122 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4123 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4125 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4126 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4127 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4128 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4129 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4130 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4132
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4133 static void m68k_op_bvs_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4134 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4135 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4136 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4137 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4138 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4139 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4140 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4141 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4142 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4144
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4145 static void m68k_op_bpl_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4146 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4147 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4148 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4149 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4150 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4151 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4152 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4153 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4154 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4157 static void m68k_op_bmi_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4158 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4159 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4160 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4161 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4162 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4163 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4164 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4165 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4166 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4169 static void m68k_op_bge_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4170 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4171 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4172 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4173 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4174 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4175 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4176 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4177 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4178 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4180
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4181 static void m68k_op_blt_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4182 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4183 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4184 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4185 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4186 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4187 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4188 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4189 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4190 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4191
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4193 static void m68k_op_bgt_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4194 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4195 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4196 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4197 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4198 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4199 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4200 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4201 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4202 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4205 static void m68k_op_ble_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4206 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4207 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4208 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4209 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4210 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4211 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4212 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4213 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4214 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4217 static void m68k_op_bhi_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4218 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4219 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4220 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4221 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4222 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4223 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4224 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4225 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4226 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4227 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4228 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4229 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4230
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4232 static void m68k_op_bls_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4233 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4234 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4235 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4236 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4237 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4238 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4239 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4240 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4241 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4242 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4243 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4244 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4247 static void m68k_op_bcc_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4248 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4249 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4250 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4251 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4252 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4253 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4254 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4255 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4256 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4257 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4258 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4259 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4261
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4262 static void m68k_op_bcs_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4263 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4264 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4265 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4266 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4267 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4268 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4269 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4270 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4271 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4272 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4273 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4274 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4277 static void m68k_op_bne_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4278 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4279 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4280 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4281 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4282 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4283 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4284 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4285 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4286 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4287 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4288 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4289 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4292 static void m68k_op_beq_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4293 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4294 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4295 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4296 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4297 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4298 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4299 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4300 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4301 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4302 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4303 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4304 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4306
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4307 static void m68k_op_bvc_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4308 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4309 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4310 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4311 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4312 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4313 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4314 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4315 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4316 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4317 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4318 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4319 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4320
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4322 static void m68k_op_bvs_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4323 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4324 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4325 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4326 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4327 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4328 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4329 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4330 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4331 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4332 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4333 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4334 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4336
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4337 static void m68k_op_bpl_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4338 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4339 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4340 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4341 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4342 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4343 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4344 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4345 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4346 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4347 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4348 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4349 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4352 static void m68k_op_bmi_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4353 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4354 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4355 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4356 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4357 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4358 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4359 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4360 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4361 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4362 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4363 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4364 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4367 static void m68k_op_bge_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4369 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4370 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4371 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4372 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4373 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4374 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4375 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4376 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4377 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4378 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4379 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4380
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4382 static void m68k_op_blt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4383 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4384 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4385 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4386 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4387 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4388 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4389 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4390 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4391 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4392 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4393 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4394 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4395
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4396
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4397 static void m68k_op_bgt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4398 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4399 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4400 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4401 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4402 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4403 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4404 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4405 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4406 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4407 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4408 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4409 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4412 static void m68k_op_ble_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4413 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4414 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4415 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4416 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4417 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4418 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4419 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4420 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4421 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4422 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4423 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_w;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4424 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4427 static void m68k_op_bhi_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4428 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4429 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4430 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4431 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4432 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4433 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4434 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4435 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4436 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4437 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4438 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4439 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4440 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4441 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4442 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4443 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4444 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4445 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4446 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4447 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4448 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4449 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4450 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4451 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4452 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4453
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4454
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4455 static void m68k_op_bls_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4456 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4457 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4458 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4459 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4460 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4461 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4462 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4463 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4464 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4465 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4466 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4467 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4468 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4469 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4470 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4471 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4472 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4473 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4474 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4475 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4476 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4477 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4478 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4479 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4480 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4483 static void m68k_op_bcc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4484 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4485 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4486 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4487 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4488 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4489 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4490 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4491 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4492 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4493 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4494 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4495 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4496 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4497 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4498 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4499 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4500 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4501 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4502 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4503 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4504 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4505 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4506 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4507 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4508 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4511 static void m68k_op_bcs_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4512 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4513 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4514 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4515 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4516 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4517 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4518 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4519 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4520 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4521 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4522 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4523 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4524 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4525 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4526 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4527 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4528 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4529 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4530 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4531 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4532 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4534 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4535 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4536 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4539 static void m68k_op_bne_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4540 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4541 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4542 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4543 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4544 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4545 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4546 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4547 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4548 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4549 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4550 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4551 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4552 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4553 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4554 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4555 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4556 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4557 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4558 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4559 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4560 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4561 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4562 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4563 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4564 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4565
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4566
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4567 static void m68k_op_beq_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4568 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4569 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4570 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4571 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4572 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4573 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4574 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4575 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4576 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4577 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4578 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4579 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4580 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4581 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4582 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4583 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4584 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4585 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4586 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4587 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4588 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4589 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4590 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4591 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4592 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4593
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4595 static void m68k_op_bvc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4596 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4597 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4598 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4599 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4600 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4601 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4602 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4603 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4604 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4605 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4606 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4607 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4608 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4609 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4610 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4611 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4612 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4613 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4614 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4615 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4616 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4617 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4618 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4619 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4620 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4623 static void m68k_op_bvs_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4624 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4625 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4626 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4627 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4628 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4629 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4630 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4631 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4632 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4633 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4634 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4635 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4636 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4637 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4638 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4639 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4640 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4641 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4642 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4643 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4644 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4645 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4646 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4647 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4648 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4649
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4651 static void m68k_op_bpl_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4652 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4653 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4654 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4655 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4656 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4657 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4658 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4659 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4660 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4661 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4662 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4663 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4664 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4665 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4666 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4667 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4668 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4669 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4670 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4671 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4672 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4673 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4674 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4675 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4679 static void m68k_op_bmi_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4680 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4681 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4682 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4683 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4684 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4685 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4686 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4687 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4688 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4689 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4690 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4691 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4692 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4693 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4694 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4695 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4696 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4697 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4698 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4699 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4700 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4701 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4702 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4703 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4704 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4707 static void m68k_op_bge_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4708 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4709 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4711 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4712 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4713 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4714 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4715 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4716 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4717 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4718 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4719 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4720 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4721 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4722 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4723 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4724 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4725 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4726 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4727 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4728 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4729 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4730 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4731 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4732 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4733
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4735 static void m68k_op_blt_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4736 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4737 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4738 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4739 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4740 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4741 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4742 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4743 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4744 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4745 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4746 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4747 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4748 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4749 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4750 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4751 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4752 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4753 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4754 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4755 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4756 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4757 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4758 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4759 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4760 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4763 static void m68k_op_bgt_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4764 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4765 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4766 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4767 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4768 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4769 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4770 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4771 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4772 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4773 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4774 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4775 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4776 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4777 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4778 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4779 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4780 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4781 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4782 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4783 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4784 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4785 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4786 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4787 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4788 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4789
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4791 static void m68k_op_ble_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4792 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4793 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4794 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4795 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4796 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4797 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4798 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4799 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4800 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4801 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4802 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4803 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4804 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4805 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4806 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4807 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4808 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4809 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4810 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4811 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4812 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4813 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4814 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_bcc_notake_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4815 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4816 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4817
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4819 static void m68k_op_bchg_32_r_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4820 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4821 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4822 uint32_t mask = 1 << (DX(mc68kcpu) & 0x1f);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4823
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4824 (mc68kcpu)->not_z_flag = *r_dst & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4825 *r_dst ^= mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4826 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4828
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4829 static void m68k_op_bchg_8_r_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4830 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4831 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4832 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4833 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4835 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4836 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4837 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4840 static void m68k_op_bchg_8_r_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4841 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4842 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4843 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4844 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4846 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4847 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4848 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4850
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4851 static void m68k_op_bchg_8_r_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4852 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4853 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4854 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4855 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4856
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4857 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4858 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4859 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4862 static void m68k_op_bchg_8_r_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4863 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4864 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4865 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4866 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4868 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4869 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4870 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4871
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4872
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4873 static void m68k_op_bchg_8_r_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4874 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4875 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4876 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4877 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4878
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4879 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4880 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4881 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4884 static void m68k_op_bchg_8_r_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4885 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4886 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4887 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4888 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4889
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4890 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4891 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4892 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4895 static void m68k_op_bchg_8_r_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4896 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4897 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4898 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4899 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4900
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4901 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4902 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4903 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4904
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4906 static void m68k_op_bchg_8_r_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4907 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4908 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4909 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4910 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4912 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4913 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4914 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4915
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4916
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4917 static void m68k_op_bchg_8_r_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4918 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4919 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4920 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4921 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4922
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4923 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4924 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4925 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4927
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4928 static void m68k_op_bchg_32_s_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4929 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4930 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4931 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 0x1f);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4933 (mc68kcpu)->not_z_flag = *r_dst & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4934 *r_dst ^= mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4935 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4936
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4938 static void m68k_op_bchg_8_s_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4939 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4940 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4941 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4942 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4944 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4945 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4946 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4948
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4949 static void m68k_op_bchg_8_s_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4950 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4951 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4952 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4953 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4954
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4955 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4956 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4957 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4959
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4960 static void m68k_op_bchg_8_s_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4961 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4962 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4963 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4964 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4966 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4967 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4968 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4970
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4971 static void m68k_op_bchg_8_s_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4972 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4973 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4974 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4975 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4977 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4978 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4979 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4980
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4982 static void m68k_op_bchg_8_s_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4983 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4984 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4985 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4986 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4988 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4989 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4990 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4991
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4992
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4993 static void m68k_op_bchg_8_s_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4994 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4995 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4996 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4997 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4998
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4999 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5000 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5001 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5002
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5004 static void m68k_op_bchg_8_s_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5005 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5006 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5007 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5008 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5010 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5011 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5012 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5013
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5015 static void m68k_op_bchg_8_s_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5016 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5017 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5018 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5019 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5020
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5021 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5022 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5023 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5024
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5025
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5026 static void m68k_op_bchg_8_s_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5027 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5028 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5029 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5030 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5031
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5032 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5033 m68ki_write_8((mc68kcpu), ea, src ^ mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5034 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5037 static void m68k_op_bclr_32_r_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5038 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5039 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5040 uint32_t mask = 1 << (DX(mc68kcpu) & 0x1f);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5042 (mc68kcpu)->not_z_flag = *r_dst & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5043 *r_dst &= ~mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5044 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5045
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5047 static void m68k_op_bclr_8_r_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5048 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5049 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5050 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5051 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5052
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5053 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5054 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5055 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5058 static void m68k_op_bclr_8_r_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5059 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5060 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5061 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5062 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5064 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5065 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5066 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5067
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5068
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5069 static void m68k_op_bclr_8_r_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5070 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5071 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5072 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5073 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5075 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5076 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5077 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5079
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5080 static void m68k_op_bclr_8_r_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5081 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5082 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5083 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5084 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5086 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5087 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5088 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5089
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5091 static void m68k_op_bclr_8_r_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5092 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5093 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5094 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5095 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5096
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5097 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5098 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5099 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5101
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5102 static void m68k_op_bclr_8_r_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5103 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5104 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5105 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5106 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5108 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5109 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5110 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5113 static void m68k_op_bclr_8_r_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5114 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5115 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5116 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5117 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5119 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5120 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5121 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5123
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5124 static void m68k_op_bclr_8_r_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5125 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5126 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5127 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5128 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5129
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5130 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5131 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5132 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5135 static void m68k_op_bclr_8_r_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5136 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5137 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5138 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5139 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5140
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5141 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5142 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5143 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5144
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5146 static void m68k_op_bclr_32_s_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5147 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5148 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5149 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 0x1f);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5150
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5151 (mc68kcpu)->not_z_flag = *r_dst & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5152 *r_dst &= ~mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5153 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5154
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5156 static void m68k_op_bclr_8_s_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5157 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5158 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5159 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5160 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5162 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5163 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5164 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5165
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5166
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5167 static void m68k_op_bclr_8_s_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5168 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5169 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5170 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5171 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5173 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5174 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5175 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5176
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5177
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5178 static void m68k_op_bclr_8_s_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5179 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5180 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5181 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5182 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5184 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5185 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5186 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5187
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5188
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5189 static void m68k_op_bclr_8_s_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5190 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5191 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5192 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5193 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5194
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5195 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5196 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5197 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5198
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5200 static void m68k_op_bclr_8_s_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5201 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5202 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5203 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5204 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5205
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5206 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5207 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5211 static void m68k_op_bclr_8_s_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5212 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5213 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5214 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5215 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5217 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5218 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5219 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5220
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5221
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5222 static void m68k_op_bclr_8_s_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5223 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5224 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5225 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5226 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5228 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5229 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5230 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5233 static void m68k_op_bclr_8_s_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5234 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5235 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5236 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5237 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5239 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5240 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5241 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5242
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5244 static void m68k_op_bclr_8_s_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5245 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5246 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5247 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5248 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5250 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5251 m68ki_write_8((mc68kcpu), ea, src & ~mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5252 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5255 static void m68k_op_bfchg_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5256 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5257 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5258 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5259 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5260 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5261 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5262 uint32_t* data = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5263 uint64_t mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5266 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5267 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5268 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5269 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5270
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5271 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5272 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5274 mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5275 mask = ROR_32(mask, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5277 (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5278 (mc68kcpu)->not_z_flag = *data & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5279 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5280 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5282 *data ^= mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5283
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5284 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5285 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5286 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5287 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5290 static void m68k_op_bfchg_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5291 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5292 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5293 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5294 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5295 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5296 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5297 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5298 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5299 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5300 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5301 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5302 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5303
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5304
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5305 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5306 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5307 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5308 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5310 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5311 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5312 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5313 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5314 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5315 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5316 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5317 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5318 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5319
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5320 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5321 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5322
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5323 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5324 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5325 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5326 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5327 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5328
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5329 m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5331 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5332 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5333 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5334 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5335 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5336 m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5337 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5338 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5339 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5340 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5341 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5344 static void m68k_op_bfchg_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5345 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5346 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5347 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5348 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5349 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5350 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5351 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5352 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5353 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5354 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5355 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5356 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5357
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5358
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5359 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5360 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5361 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5362 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5364 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5365 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5366 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5367 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5369 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5370 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5371 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5372 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5373
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5374 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5375 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5376
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5377 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5378 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5379 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5380 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5381 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5383 m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5385 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5386 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5387 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5388 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5389 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5390 m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5391 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5392 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5393 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5394 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5395 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5396
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5398 static void m68k_op_bfchg_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5399 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5400 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5401 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5402 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5403 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5404 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5405 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5406 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5407 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5408 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5409 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5410 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5412
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5413 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5414 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5415 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5416 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5418 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5419 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5420 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5421 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5422 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5423 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5424 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5425 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5426 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5428 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5429 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5431 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5432 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5433 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5434 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5435 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5436
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5437 m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5439 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5440 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5441 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5442 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5443 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5444 m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5445 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5446 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5447 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5448 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5449 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5452 static void m68k_op_bfchg_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5453 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5454 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5455 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5456 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5457 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5458 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5459 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5460 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5461 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5462 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5463 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5464 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5465
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5466
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5467 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5468 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5469 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5470 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5471
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5472 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5473 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5474 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5475 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5476 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5477 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5478 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5479 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5480 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5482 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5483 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5484
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5485 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5486 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5487 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5488 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5489 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5491 m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5493 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5494 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5495 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5496 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5497 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5498 m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5499 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5500 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5501 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5502 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5503 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5504
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5505
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5506 static void m68k_op_bfchg_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5507 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5508 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5509 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5510 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5511 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5512 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5513 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5514 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5515 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5516 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5517 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5518 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5519
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5520
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5521 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5522 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5523 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5524 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5526 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5527 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5528 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5529 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5530 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5531 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5532 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5534 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5536 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5537 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5539 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5540 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5541 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5542 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5543 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5544
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5545 m68ki_write_32((mc68kcpu), ea, data_long ^ mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5547 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5548 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5549 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5550 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5551 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5552 m68ki_write_8((mc68kcpu), ea+4, data_byte ^ mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5553 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5554 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5555 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5556 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5557 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5558
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5559
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5560 static void m68k_op_bfclr_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5561 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5562 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5563 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5564 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5565 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5566 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5567 uint32_t* data = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5568 uint64_t mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5570
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5571 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5572 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5573 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5574 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5576
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5577 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5578 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5579
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5580
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5581 mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5582 mask = ROR_32(mask, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5583
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5584 (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5585 (mc68kcpu)->not_z_flag = *data & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5586 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5587 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5589 *data &= ~mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5591 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5592 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5593 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5594 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5597 static void m68k_op_bfclr_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5598 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5599 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5600 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5601 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5602 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5603 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5604 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5605 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5606 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5607 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5608 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5609 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5612 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5613 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5614 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5615 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5616
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5617 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5618 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5619 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5620 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5621 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5622 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5623 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5624 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5625 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5627 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5628 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5629
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5630 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5631 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5632 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5633 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5634 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5636 m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5638 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5639 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5640 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5641 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5642 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5643 m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5644 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5645 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5646 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5647 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5648 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5649
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5651 static void m68k_op_bfclr_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5652 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5653 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5654 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5655 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5656 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5657 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5658 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5659 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5660 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5661 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5662 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5663 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5666 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5667 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5668 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5669 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5671 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5672 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5673 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5674 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5675 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5676 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5677 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5678 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5679 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5681 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5682 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5683
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5684 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5685 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5686 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5687 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5688 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5689
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5690 m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5692 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5693 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5694 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5695 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5696 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5697 m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5698 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5699 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5700 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5701 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5702 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5703
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5704
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5705 static void m68k_op_bfclr_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5706 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5707 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5708 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5709 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5710 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5711 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5712 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5713 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5714 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5715 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5716 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5717 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5720 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5721 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5722 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5723 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5724
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5725 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5726 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5727 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5728 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5729 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5730 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5731 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5732 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5733 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5735 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5736 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5738 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5739 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5740 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5741 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5742 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5744 m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5745
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5746 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5747 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5748 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5749 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5750 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5751 m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5752 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5753 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5754 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5755 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5756 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5758
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5759 static void m68k_op_bfclr_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5760 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5761 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5762 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5763 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5764 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5765 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5766 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5767 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5768 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5769 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5770 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5771 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5772
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5774 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5775 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5776 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5777 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5778
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5779 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5780 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5781 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5782 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5783 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5784 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5785 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5786 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5787 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5788
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5789 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5790 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5792 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5793 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5794 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5795 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5796 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5798 m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5799
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5800 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5801 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5802 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5803 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5804 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5805 m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5806 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5807 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5808 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5809 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5810 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5812
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5813 static void m68k_op_bfclr_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5814 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5815 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5816 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5817 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5818 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5819 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5820 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5821 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5822 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5823 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5824 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5825 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5828 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5829 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5830 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5831 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5832
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5833 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5834 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5835 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5836 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5837 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5838 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5839 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5840 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5841 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5842
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5843 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5844 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5846 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5847 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5848 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5849 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5850 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5852 m68ki_write_32((mc68kcpu), ea, data_long & ~mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5854 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5855 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5856 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5857 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5858 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5859 m68ki_write_8((mc68kcpu), ea+4, data_byte & ~mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5860 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5861 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5862 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5863 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5864 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5865
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5867 static void m68k_op_bfexts_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5868 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5869 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5870 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5871 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5872 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5873 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5874 uint64_t data = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5876
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5877 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5878 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5879 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5880 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5882 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5883 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5884
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5885 data = ROL_32(data, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5886 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5887 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5889 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5890 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5891 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5892
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5893 REG_D(mc68kcpu)[(word2>>12)&7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5895 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5896 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5897 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5898 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5900
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5901 static void m68k_op_bfexts_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5902 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5903 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5904 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5905 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5906 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5907 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5908 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5909 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5912 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5913 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5914 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5915 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5916
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5917 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5918 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5919 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5920 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5921 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5922 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5923 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5924 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5925 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5926 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5927 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5928 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5930 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5931 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5933 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5934
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5935 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5936 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5938 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5939 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5940
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5941 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5942 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5943 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5944
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5945 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5947 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5948 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5949 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5953 static void m68k_op_bfexts_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5954 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5955 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5956 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5957 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5958 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5959 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5960 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5961 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5962
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5964 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5965 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5966 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5967 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5969 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5970 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5971 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5972 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5973 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5974 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5975 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5976 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5977 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5978 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5979 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5980 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5982 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5983 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5984
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5985 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5986
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5987 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5988 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5990 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5991 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5992
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5993 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5994 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5995 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5996
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5997 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5998
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5999 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6000 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6001 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6002 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6004
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6005 static void m68k_op_bfexts_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6006 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6007 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6008 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6009 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6010 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6011 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6012 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6013 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6016 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6017 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6018 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6019 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6020
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6021 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6022 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6023 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6024 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6025 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6026 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6027 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6028 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6029 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6030 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6031 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6032 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6034 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6035 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6037 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6039 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6040 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6042 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6043 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6044
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6045 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6046 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6047 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6049 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6050
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6051 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6052 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6053 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6054 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6057 static void m68k_op_bfexts_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6058 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6059 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6060 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6061 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6062 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6063 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6064 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6065 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6066
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6067
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6068 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6069 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6070 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6071 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6073 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6074 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6075 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6076 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6077 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6078 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6079 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6080 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6081 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6082 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6083 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6084 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6086 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6087 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6088
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6089 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6091 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6092 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6093
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6094 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6095 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6096
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6097 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6098 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6099 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6101 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6102
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6103 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6104 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6105 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6106 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6108
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6109 static void m68k_op_bfexts_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6110 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6111 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6112 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6113 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6114 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6115 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6116 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6117 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6120 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6121 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6122 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6123 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6124
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6125 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6126 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6127 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6128 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6129 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6130 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6131 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6132 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6133 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6134 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6135 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6136 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6138 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6139 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6140
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6141 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6143 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6144 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6146 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6147 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6149 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6150 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6151 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6152
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6153 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6154
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6155 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6156 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6157 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6158 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6159
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6160
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6161 static void m68k_op_bfexts_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6162 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6163 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6165 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6166 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6167 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6168 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6169 uint32_t ea = EA_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6170
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6171
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6172 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6173 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6174 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6175 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6176
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6177 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6178 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6179 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6180 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6181 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6182 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6183 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6184 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6185 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6186 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6187 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6188 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6190 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6191 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6193 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6194
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6195 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6196 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6198 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6199 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6200
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6201 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6202 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6203 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6205 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6207 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6209 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6210 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6212
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6213 static void m68k_op_bfexts_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6214 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6215 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6216 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6217 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6218 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6219 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6220 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6221 uint32_t ea = EA_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6222
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6224 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6225 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6226 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6227 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6229 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6230 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6231 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6232 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6233 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6234 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6235 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6236 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6237 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6238 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6239 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6240 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6241
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6242 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6243 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6244
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6245 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6247 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6248 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6250 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6251 data = MAKE_INT_32(data) >> (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6252
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6253 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6254 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6255 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6256
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6257 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6259 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6260 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6261 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6262 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6263
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6265 static void m68k_op_bfextu_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6266 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6267 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6268 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6269 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6270 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6271 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6272 uint64_t data = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6275 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6276 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6277 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6278 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6280 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6281 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6283 data = ROL_32(data, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6284 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6285 data >>= 32 - width;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6287 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6288 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6289 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6291 REG_D(mc68kcpu)[(word2>>12)&7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6292
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6293 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6294 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6295 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6296 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6298
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6299 static void m68k_op_bfextu_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6300 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6301 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6302 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6303 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6304 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6305 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6306 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6307 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6310 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6311 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6312 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6313 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6315 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6316 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6317 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6318 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6319 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6320 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6321 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6322 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6323 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6324 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6325 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6326 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6328 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6329 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6330 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6332 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6333 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6334
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6335 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6336 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6338 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6339 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6340 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6342 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6344 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6345 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6346 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6347 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6348
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6350 static void m68k_op_bfextu_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6351 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6352 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6353 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6354 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6355 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6356 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6357 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6358 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6361 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6362 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6363 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6364 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6366 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6367 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6368 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6369 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6370 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6371 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6372 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6373 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6374 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6375 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6376 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6377 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6379 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6380 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6381 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6383 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6384 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6386 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6387 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6389 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6390 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6391 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6393 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6395 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6396 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6397 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6398 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6401 static void m68k_op_bfextu_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6402 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6403 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6404 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6405 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6406 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6407 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6408 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6409 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6412 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6413 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6414 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6415 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6417 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6418 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6419 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6420 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6421 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6422 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6423 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6424 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6425 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6426 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6427 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6428 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6429
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6430 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6431 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6432 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6434 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6435 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6436
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6437 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6438 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6440 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6441 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6442 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6444 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6445
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6446 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6447 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6448 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6449 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6452 static void m68k_op_bfextu_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6453 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6454 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6455 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6456 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6457 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6458 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6459 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6460 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6463 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6464 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6465 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6466 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6468 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6469 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6470 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6471 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6472 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6473 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6474 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6475 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6476 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6477 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6478 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6479 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6480
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6481 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6482 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6483 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6484
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6485 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6486 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6487
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6488 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6489 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6491 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6492 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6493 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6495 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6497 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6498 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6499 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6500 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6502
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6503 static void m68k_op_bfextu_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6504 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6505 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6506 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6507 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6508 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6509 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6510 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6511 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6514 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6515 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6516 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6517 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6519 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6520 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6521 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6522 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6523 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6524 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6525 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6526 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6527 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6528 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6529 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6530 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6532 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6533 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6534 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6536 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6537 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6539 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6540 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6542 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6543 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6544 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6546 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6548 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6549 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6550 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6551 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6552
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6554 static void m68k_op_bfextu_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6555 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6556 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6557 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6558 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6559 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6560 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6561 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6562 uint32_t ea = EA_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6564
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6565 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6566 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6567 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6568 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6570 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6571 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6572 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6573 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6574 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6575 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6576 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6577 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6578 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6579 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6580 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6581 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6583 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6584 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6585 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6587 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6588 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6590 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6591 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6592
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6593 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6594 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6595 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6597 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6598
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6599 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6600 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6601 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6602 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6604
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6605 static void m68k_op_bfextu_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6606 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6607 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6608 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6609 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6610 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6611 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6612 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6613 uint32_t ea = EA_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6614
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6616 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6617 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6618 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6619 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6620
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6621 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6622 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6623 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6624 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6625 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6626 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6627 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6628 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6629 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6630 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6631 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6632 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6633
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6634 data = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6635 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6636 data = MASK_OUT_ABOVE_32(data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6638 if((offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6639 data |= (m68ki_read_8((mc68kcpu), ea+4) << offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6640
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6641 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6642 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6644 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6645 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6646 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6648 REG_D(mc68kcpu)[(word2 >> 12) & 7] = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6649
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6650 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6651 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6652 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6653 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6655
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6656 static void m68k_op_bfffo_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6657 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6658 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6659 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6660 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6661 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6662 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6663 uint64_t data = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6664 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6667 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6668 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6669 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6670 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6672 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6673 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6674
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6675 data = ROL_32(data, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6676 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6677 data >>= 32 - width;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6679 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6680 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6681 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6682
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6683 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6684 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6686 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6688 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6689 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6690 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6691 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6694 static void m68k_op_bfffo_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6695 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6696 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6697 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6698 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6699 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6700 int32_t local_offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6701 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6702 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6703 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6704 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6707 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6708 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6709 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6710 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6712 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6713 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6714 local_offset = offset % 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6715 if(local_offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6716 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6717 local_offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6718 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6719 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6720 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6721
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6722 data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6723 data = MASK_OUT_ABOVE_32(data<<local_offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6724
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6725 if((local_offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6726 data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6727
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6728 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6729 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6731 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6732 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6733 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6735 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6736 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6738 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6739
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6740 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6741 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6742 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6743 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6744
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6745
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6746 static void m68k_op_bfffo_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6747 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6748 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6749 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6750 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6751 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6752 int32_t local_offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6753 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6754 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6755 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6756 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6758
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6759 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6760 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6761 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6762 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6763
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6764 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6765 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6766 local_offset = offset % 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6767 if(local_offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6768 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6769 local_offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6770 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6771 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6772 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6774 data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6775 data = MASK_OUT_ABOVE_32(data<<local_offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6776
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6777 if((local_offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6778 data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6780 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6781 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6783 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6784 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6785 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6786
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6787 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6788 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6789
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6790 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6792 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6793 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6794 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6795 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6796
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6798 static void m68k_op_bfffo_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6799 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6800 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6801 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6802 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6803 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6804 int32_t local_offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6805 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6806 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6807 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6808 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6810
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6811 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6812 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6813 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6814 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6816 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6817 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6818 local_offset = offset % 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6819 if(local_offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6820 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6821 local_offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6822 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6823 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6824 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6826 data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6827 data = MASK_OUT_ABOVE_32(data<<local_offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6828
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6829 if((local_offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6830 data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6831
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6832 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6833 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6835 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6836 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6837 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6839 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6840 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6841
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6842 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6843
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6844 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6845 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6846 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6847 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6848
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6850 static void m68k_op_bfffo_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6851 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6852 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6853 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6854 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6855 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6856 int32_t local_offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6857 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6858 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6859 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6860 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6863 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6864 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6865 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6866 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6868 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6869 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6870 local_offset = offset % 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6871 if(local_offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6872 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6873 local_offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6874 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6875 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6876 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6877
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6878 data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6879 data = MASK_OUT_ABOVE_32(data<<local_offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6880
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6881 if((local_offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6882 data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6884 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6885 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6887 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6888 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6889 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6890
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6891 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6892 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6894 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6896 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6897 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6898 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6899 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6900
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6902 static void m68k_op_bfffo_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6903 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6904 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6905 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6906 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6907 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6908 int32_t local_offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6909 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6910 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6911 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6912 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6913
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6914
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6915 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6916 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6917 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6918 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6919
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6920 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6921 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6922 local_offset = offset % 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6923 if(local_offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6924 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6925 local_offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6926 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6927 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6928 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6930 data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6931 data = MASK_OUT_ABOVE_32(data<<local_offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6933 if((local_offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6934 data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6936 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6937 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6939 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6940 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6941 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6942
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6943 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6944 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6946 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6948 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6949 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6950 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6951 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6954 static void m68k_op_bfffo_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6955 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6956 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6957 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6958 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6959 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6960 int32_t local_offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6961 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6962 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6963 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6964 uint32_t ea = EA_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6966
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6967 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6968 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6969 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6970 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6971
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6972 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6973 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6974 local_offset = offset % 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6975 if(local_offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6976 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6977 local_offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6978 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6979 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6980 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6982 data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6983 data = MASK_OUT_ABOVE_32(data<<local_offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6984
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6985 if((local_offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6986 data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6988 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6989 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6991 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6992 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6993 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6995 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6996 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6998 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7000 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7001 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7002 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7003 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7004
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7006 static void m68k_op_bfffo_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7007 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7008 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7009 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7010 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7011 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7012 int32_t local_offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7013 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7014 uint32_t data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7015 uint32_t bit;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7016 uint32_t ea = EA_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7017
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7019 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7020 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7021 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7022 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7024 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7025 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7026 local_offset = offset % 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7027 if(local_offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7028 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7029 local_offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7030 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7031 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7032 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7034 data = (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7035 data = MASK_OUT_ABOVE_32(data<<local_offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7037 if((local_offset+width) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7038 data |= (m68ki_read_8((mc68kcpu), ea+4) << local_offset) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7040 (mc68kcpu)->n_flag = NFLAG_32(data);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7041 data >>= (32 - width);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7043 (mc68kcpu)->not_z_flag = data;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7044 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7045 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7047 for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7048 offset++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7050 REG_D(mc68kcpu)[(word2>>12)&7] = offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7052 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7053 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7054 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7055 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7058 static void m68k_op_bfins_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7059 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7060 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7061 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7062 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7063 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7064 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7065 uint32_t* data = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7066 uint64_t mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7067 uint64_t insert = REG_D(mc68kcpu)[(word2>>12)&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7068
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7070 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7071 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7072 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7073 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7075
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7076 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7077 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7079
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7080 mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7081 mask = ROR_32(mask, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7082
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7083 insert = MASK_OUT_ABOVE_32(insert << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7084 (mc68kcpu)->n_flag = NFLAG_32(insert);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7085 (mc68kcpu)->not_z_flag = insert;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7086 insert = ROR_32(insert, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7087
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7088 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7089 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7091 *data &= ~mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7092 *data |= insert;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7093
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7094 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7095 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7096 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7097 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7100 static void m68k_op_bfins_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7101 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7102 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7103 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7104 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7105 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7106 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7107 uint32_t insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7108 uint32_t insert_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7109 uint32_t insert_byte;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7110 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7111 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7112 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7113 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7114 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7115 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7116
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7117
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7118 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7119 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7120 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7121 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7123 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7125 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7126 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7127 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7128 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7129 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7130 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7131 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7132 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7133 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7134 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7135
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7136 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7137 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7139 insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7140 (mc68kcpu)->n_flag = NFLAG_32(insert_base);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7141 (mc68kcpu)->not_z_flag = insert_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7142 insert_long = insert_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7144 data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7145 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7146 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7147 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7149 if((width + offset) < 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7150 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7151 m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7152 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7153 else if((width + offset) < 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7154 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7155 m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7156 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7157 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7158 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7159 m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7160 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7162 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7163 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7164 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7165 insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7166 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7167 (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7168 m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7169 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7170 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7171 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7172 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7173 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7176 static void m68k_op_bfins_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7177 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7178 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7179 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7180 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7181 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7182 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7183 uint32_t insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7184 uint32_t insert_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7185 uint32_t insert_byte;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7186 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7187 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7188 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7189 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7190 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7191 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7194 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7195 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7196 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7197 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7198
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7199 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7200 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7201 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7202 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7203 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7204 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7205 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7206 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7207 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7209 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7210 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7212 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7213 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7214
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7215 insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7216 (mc68kcpu)->n_flag = NFLAG_32(insert_base);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7217 (mc68kcpu)->not_z_flag = insert_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7218 insert_long = insert_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7219
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7220 data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7221 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7222 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7223 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7224
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7225 if((width + offset) < 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7226 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7227 m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7228 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7229 else if((width + offset) < 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7230 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7231 m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7232 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7233 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7234 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7235 m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7236 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7238 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7239 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7240 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7241 insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7242 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7243 (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7244 m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7245 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7246 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7247 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7248 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7249 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7252 static void m68k_op_bfins_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7253 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7254 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7255 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7256 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7257 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7258 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7259 uint32_t insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7260 uint32_t insert_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7261 uint32_t insert_byte;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7262 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7263 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7264 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7265 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7266 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7267 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7268
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7269
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7270 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7271 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7272 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7273 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7275 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7276 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7277 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7278 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7279 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7280 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7281 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7282 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7283 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7284 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7285 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7286 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7288 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7289 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7291 insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7292 (mc68kcpu)->n_flag = NFLAG_32(insert_base);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7293 (mc68kcpu)->not_z_flag = insert_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7294 insert_long = insert_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7295
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7296 data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7297 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7298 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7299 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7300
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7301 if((width + offset) < 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7302 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7303 m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7304 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7305 else if((width + offset) < 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7306 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7307 m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7308 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7309 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7310 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7311 m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7312 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7314 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7315 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7316 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7317 insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7318 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7319 (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7320 m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7321 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7322 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7323 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7324 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7325 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7326
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7328 static void m68k_op_bfins_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7329 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7330 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7331 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7332 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7333 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7334 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7335 uint32_t insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7336 uint32_t insert_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7337 uint32_t insert_byte;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7338 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7339 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7340 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7341 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7342 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7343 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7344
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7345
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7346 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7347 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7348 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7349 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7351 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7352 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7353 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7354 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7355 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7356 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7357 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7358 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7359 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7360 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7361 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7362 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7364 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7365 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7367 insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7368 (mc68kcpu)->n_flag = NFLAG_32(insert_base);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7369 (mc68kcpu)->not_z_flag = insert_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7370 insert_long = insert_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7372 data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7373 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7374 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7375 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7376
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7377 if((width + offset) < 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7378 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7379 m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7380 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7381 else if((width + offset) < 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7382 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7383 m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7384 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7385 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7386 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7387 m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7388 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7390 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7391 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7392 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7393 insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7394 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7395 (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7396 m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7397 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7398 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7399 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7400 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7401 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7402
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7404 static void m68k_op_bfins_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7405 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7406 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7407 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7408 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7409 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7410 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7411 uint32_t insert_base = REG_D(mc68kcpu)[(word2>>12)&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7412 uint32_t insert_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7413 uint32_t insert_byte;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7414 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7415 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7416 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7417 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7418 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7419 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7420
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7422 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7423 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7424 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7425 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7427 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7428 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7429 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7430 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7431 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7432 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7433 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7434 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7435 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7436 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7437 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7438 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7440 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7441 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7443 insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7444 (mc68kcpu)->n_flag = NFLAG_32(insert_base);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7445 (mc68kcpu)->not_z_flag = insert_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7446 insert_long = insert_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7448 data_long = (offset+width) < 8 ? (m68ki_read_8((mc68kcpu), ea) << 24) :
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7449 (offset+width) < 16 ? (m68ki_read_16((mc68kcpu), ea) << 16) : m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7450 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7451 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7452
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7453 if((width + offset) < 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7454 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7455 m68ki_write_8((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 24);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7456 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7457 else if((width + offset) < 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7458 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7459 m68ki_write_16((mc68kcpu), ea, ((data_long & ~mask_long) | insert_long) >> 16);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7461 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7462 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7463 m68ki_write_32((mc68kcpu), ea, (data_long & ~mask_long) | insert_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7464 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7465
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7466 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7467 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7468 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7469 insert_byte = MASK_OUT_ABOVE_8(insert_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7470 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7471 (mc68kcpu)->not_z_flag |= (insert_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7472 m68ki_write_8((mc68kcpu), ea+4, (data_byte & ~mask_byte) | insert_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7473 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7474 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7475 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7476 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7477 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7478
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7479
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7480 static void m68k_op_bfset_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7481 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7482 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7483 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7484 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7485 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7486 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7487 uint32_t* data = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7488 uint64_t mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7491 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7492 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7493 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7494 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7495
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7497 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7498 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7501 mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7502 mask = ROR_32(mask, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7504 (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7505 (mc68kcpu)->not_z_flag = *data & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7506 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7507 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7508
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7509 *data |= mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7511 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7512 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7513 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7514 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7516
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7517 static void m68k_op_bfset_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7518 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7519 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7520 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7521 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7522 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7523 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7524 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7525 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7526 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7527 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7528 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7529 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7530
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7531 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7532 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7533 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7534 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7536 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7537 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7538 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7539 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7540 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7541 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7542 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7543 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7544 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7546 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7547 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7549 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7550 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7551 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7552 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7553 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7555 m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7556
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7557 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7558 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7559 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7560 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7561 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7562 m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7563 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7564 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7565 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7566 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7567 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7568
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7570 static void m68k_op_bfset_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7571 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7572 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7573 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7574 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7575 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7576 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7577 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7578 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7579 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7580 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7581 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7582 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7583
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7584 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7585 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7586 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7587 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7589 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7590 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7591 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7592 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7593 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7594 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7595 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7596 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7597 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7598
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7599 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7600 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7602 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7603 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7604 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7605 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7606 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7608 m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7609
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7610 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7611 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7612 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7613 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7614 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7615 m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7616 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7617 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7618 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7619 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7620 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7623 static void m68k_op_bfset_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7624 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7625 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7626 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7627 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7628 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7629 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7630 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7631 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7632 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7633 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7634 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7635 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7637 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7638 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7639 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7640 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7642 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7643 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7644 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7645 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7646 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7647 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7648 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7649 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7650 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7651
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7652 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7653 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7655 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7656 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7657 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7658 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7659 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7660
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7661 m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7662
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7663 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7664 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7665 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7666 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7667 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7668 m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7669 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7670 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7671 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7672 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7673 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7674
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7675
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7676 static void m68k_op_bfset_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7677 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7678 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7679 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7680 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7681 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7682 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7683 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7684 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7685 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7686 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7687 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7688 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7689
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7690 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7691 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7692 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7693 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7694
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7695 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7696 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7697 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7698 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7699 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7700 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7701 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7702 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7703 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7704
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7705 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7706 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7708 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7709 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7710 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7711 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7712 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7714 m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7716 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7717 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7718 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7719 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7720 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7721 m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7722 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7723 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7725 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7726 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7727
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7729 static void m68k_op_bfset_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7730 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7731 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7732 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7733 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7734 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7735 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7736 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7737 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7738 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7739 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7740 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7741 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7743 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7744 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7745 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7746 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7748 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7749 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7750 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7751 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7752 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7753 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7754 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7755 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7756 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7758 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7759 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7760
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7761 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7762 (mc68kcpu)->n_flag = NFLAG_32(data_long << offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7763 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7764 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7765 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7766
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7767 m68ki_write_32((mc68kcpu), ea, data_long | mask_long);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7768
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7769 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7770 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7771 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7772 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7773 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7774 m68ki_write_8((mc68kcpu), ea+4, data_byte | mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7775 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7776 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7777 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7778 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7779 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7781
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7782 static void m68k_op_bftst_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7783 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7784 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7785 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7786 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7787 uint32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7788 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7789 uint32_t* data = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7790 uint64_t mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7793 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7794 offset = REG_D(mc68kcpu)[offset&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7795 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7796 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7799 offset &= 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7800 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7801
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7802
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7803 mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7804 mask = ROR_32(mask, offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7805
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7806 (mc68kcpu)->n_flag = NFLAG_32(*data<<offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7807 (mc68kcpu)->not_z_flag = *data & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7808 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7809 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7810
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7811 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7812 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7813 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7814 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7816
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7817 static void m68k_op_bftst_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7818 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7819 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7820 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7821 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7822 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7823 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7824 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7825 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7826 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7827 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7828 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7829 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7830
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7831 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7832 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7833 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7834 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7836 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7837 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7838 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7839 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7840 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7841 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7842 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7843 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7844 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7847 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7848 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7850 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7851 (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7852 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7853 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7854 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7856 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7857 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7858 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7859 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7860 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7861 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7862 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7863 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7864 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7865 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7868 static void m68k_op_bftst_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7869 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7870 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7871 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7872 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7873 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7874 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7875 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7876 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7877 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7878 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7879 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7880 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7882 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7883 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7884 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7885 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7887 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7888 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7889 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7890 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7891 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7892 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7893 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7894 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7895 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7897
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7898 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7899 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7900
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7901 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7902 (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7903 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7904 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7905 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7906
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7907 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7908 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7909 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7910 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7911 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7912 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7913 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7914 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7915 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7916 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7918
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7919 static void m68k_op_bftst_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7920 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7921 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7922 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7923 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7924 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7925 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7926 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7927 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7928 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7929 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7930 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7931 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7933 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7934 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7935 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7936 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7938 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7939 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7940 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7941 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7942 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7943 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7944 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7945 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7946 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7948
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7949 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7950 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7952 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7953 (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7954 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7955 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7956 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7958 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7959 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7960 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7961 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7962 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7963 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7964 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7965 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7966 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7967 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7970 static void m68k_op_bftst_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7971 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7972 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7973 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7974 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7975 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7976 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7977 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7978 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7979 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7980 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7981 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7982 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7984 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7985 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7986 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7987 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7988
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7989 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7990 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7991 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7992 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7993 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7994 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7995 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7996 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7997 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7998
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8000 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8001 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8002
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8003 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8004 (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8005 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8006 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8007 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8009 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8010 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8011 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8012 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8013 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8014 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8015 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8016 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8017 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8018 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8020
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8021 static void m68k_op_bftst_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8022 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8023 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8024 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8025 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8026 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8027 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8028 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8029 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8030 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8031 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8032 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8033 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8034
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8035 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8036 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8037 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8038 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8040 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8041 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8042 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8043 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8044 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8045 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8046 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8047 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8048 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8050
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8051 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8052 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8053
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8054 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8055 (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8056 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8057 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8058 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8060 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8061 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8062 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8063 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8064 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8065 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8066 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8067 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8068 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8069 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8070
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8072 static void m68k_op_bftst_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8073 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8074 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8075 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8076 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8077 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8078 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8079 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8080 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8081 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8082 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8083 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8084 uint32_t ea = EA_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8086 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8087 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8088 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8089 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8091 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8092 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8093 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8094 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8095 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8096 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8097 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8098 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8099 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8101
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8102 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8103 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8104
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8105 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8106 (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8107 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8108 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8109 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8110
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8111 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8112 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8113 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8114 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8115 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8116 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8117 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8118 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8119 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8120 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8121
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8123 static void m68k_op_bftst_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8125 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8126 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8127 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8128 int32_t offset = (word2>>6)&31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8129 uint32_t width = word2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8130 uint32_t mask_base;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8131 uint32_t data_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8132 uint32_t mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8133 uint32_t data_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8134 uint32_t mask_byte = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8135 uint32_t ea = EA_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8136
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8137 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8138 offset = MAKE_INT_32(REG_D(mc68kcpu)[offset&7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8139 if(BIT_5(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8140 width = REG_D(mc68kcpu)[width&7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8142 /* Offset is signed so we have to use ugly math =( */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8143 ea += offset / 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8144 offset %= 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8145 if(offset < 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8146 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8147 offset += 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8148 ea--;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8149 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8150 width = ((width-1) & 31) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8151
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8152
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8153 mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8154 mask_long = mask_base >> offset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8156 data_long = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8157 (mc68kcpu)->n_flag = ((data_long & (0x80000000 >> offset))<<offset)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8158 (mc68kcpu)->not_z_flag = data_long & mask_long;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8159 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8160 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8162 if((width + offset) > 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8163 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8164 mask_byte = MASK_OUT_ABOVE_8(mask_base) << (8-offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8165 data_byte = m68ki_read_8((mc68kcpu), ea+4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8166 (mc68kcpu)->not_z_flag |= (data_byte & mask_byte);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8167 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8168 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8169 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8170 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8171 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8174 static void m68k_op_bkpt(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8175 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8176 /* if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8177 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8178 if (!(mc68kcpu)->bkpt_ack_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8179 ((mc68kcpu)->bkpt_ack_callback)((*mc68kcpu->program), 0, CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type) ? (mc68kcpu)->ir & 7 : 0, 0xffffffff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8180 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8181 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8182 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8185 static void m68k_op_bra_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8186 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8187 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8188 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8189 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8190 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8191 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8194 static void m68k_op_bra_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8195 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8196 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8197 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8198 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8199 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8200 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8201 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8202 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8205 static void m68k_op_bra_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8206 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8207 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8208 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8209 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8210 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8211 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8212 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8213 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8214 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8215 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8216 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8217 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8218 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8219 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8220 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8221 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8222 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8223 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8224 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8226
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8227 static void m68k_op_bset_32_r_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8228 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8229 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8230 uint32_t mask = 1 << (DX(mc68kcpu) & 0x1f);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8232 (mc68kcpu)->not_z_flag = *r_dst & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8233 *r_dst |= mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8234 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8235
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8236
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8237 static void m68k_op_bset_8_r_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8238 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8239 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8240 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8241 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8242
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8243 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8244 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8245 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8248 static void m68k_op_bset_8_r_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8249 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8250 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8251 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8252 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8254 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8255 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8256 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8257
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8259 static void m68k_op_bset_8_r_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8260 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8261 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8262 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8263 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8265 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8266 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8267 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8268
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8269
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8270 static void m68k_op_bset_8_r_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8271 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8272 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8273 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8274 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8276 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8277 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8278 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8280
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8281 static void m68k_op_bset_8_r_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8282 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8283 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8284 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8285 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8287 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8288 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8289 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8292 static void m68k_op_bset_8_r_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8293 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8294 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8295 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8296 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8298 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8299 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8300 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8302
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8303 static void m68k_op_bset_8_r_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8304 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8305 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8306 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8307 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8309 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8310 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8311 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8312
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8314 static void m68k_op_bset_8_r_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8315 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8316 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8317 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8318 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8319
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8320 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8321 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8322 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8325 static void m68k_op_bset_8_r_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8326 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8327 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8328 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8329 uint32_t mask = 1 << (DX(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8331 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8332 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8333 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8334
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8336 static void m68k_op_bset_32_s_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8337 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8338 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8339 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 0x1f);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8340
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8341 (mc68kcpu)->not_z_flag = *r_dst & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8342 *r_dst |= mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8343 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8344
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8345
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8346 static void m68k_op_bset_8_s_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8347 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8348 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8349 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8350 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8352 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8353 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8354 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8356
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8357 static void m68k_op_bset_8_s_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8358 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8359 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8360 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8361 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8362
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8363 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8364 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8365 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8367
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8368 static void m68k_op_bset_8_s_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8369 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8370 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8371 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8372 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8373
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8374 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8375 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8376 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8379 static void m68k_op_bset_8_s_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8380 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8381 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8382 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8383 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8385 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8386 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8387 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8390 static void m68k_op_bset_8_s_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8391 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8392 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8393 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8394 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8395
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8396 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8397 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8398 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8401 static void m68k_op_bset_8_s_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8402 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8403 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8404 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8405 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8406
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8407 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8408 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8409 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8412 static void m68k_op_bset_8_s_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8413 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8414 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8415 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8416 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8418 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8419 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8420 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8423 static void m68k_op_bset_8_s_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8424 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8425 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8426 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8427 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8428
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8429 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8430 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8431 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8434 static void m68k_op_bset_8_s_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8435 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8436 uint32_t mask = 1 << (OPER_I_8(mc68kcpu) & 7);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8437 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8438 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8440 (mc68kcpu)->not_z_flag = src & mask;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8441 m68ki_write_8((mc68kcpu), ea, src | mask);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8442 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8444
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8445 static void m68k_op_bsr_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8446 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8447 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8448 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8449 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8450 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8452
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8453 static void m68k_op_bsr_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8454 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8455 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8456 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8457 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8458 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8459 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8463 static void m68k_op_bsr_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8464 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8465 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8466 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8467 uint32_t offset = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8468 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8469 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8470 REG_PC(mc68kcpu) -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8471 m68ki_branch_32((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8472 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8473 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8474 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8475 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8476 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8477 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8478 m68ki_branch_8((mc68kcpu), MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8479 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8480 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8483 static void m68k_op_btst_32_r_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8484 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8485 (mc68kcpu)->not_z_flag = DY(mc68kcpu) & (1 << (DX(mc68kcpu) & 0x1f));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8486 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8487
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8488
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8489 static void m68k_op_btst_8_r_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8490 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8491 (mc68kcpu)->not_z_flag = OPER_AY_AI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8492 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8493
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8495 static void m68k_op_btst_8_r_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8496 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8497 (mc68kcpu)->not_z_flag = OPER_AY_PI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8498 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8501 static void m68k_op_btst_8_r_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8502 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8503 (mc68kcpu)->not_z_flag = OPER_A7_PI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8504 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8505
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8507 static void m68k_op_btst_8_r_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8508 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8509 (mc68kcpu)->not_z_flag = OPER_AY_PD_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8510 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8513 static void m68k_op_btst_8_r_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8514 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8515 (mc68kcpu)->not_z_flag = OPER_A7_PD_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8516 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8519 static void m68k_op_btst_8_r_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8520 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8521 (mc68kcpu)->not_z_flag = OPER_AY_DI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8522 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8523
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8524
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8525 static void m68k_op_btst_8_r_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8526 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8527 (mc68kcpu)->not_z_flag = OPER_AY_IX_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8528 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8529
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8530
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8531 static void m68k_op_btst_8_r_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8532 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8533 (mc68kcpu)->not_z_flag = OPER_AW_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8534 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8537 static void m68k_op_btst_8_r_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8538 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8539 (mc68kcpu)->not_z_flag = OPER_AL_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8540 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8543 static void m68k_op_btst_8_r_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8544 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8545 (mc68kcpu)->not_z_flag = OPER_PCDI_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8546 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8549 static void m68k_op_btst_8_r_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8550 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8551 (mc68kcpu)->not_z_flag = OPER_PCIX_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8552 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8555 static void m68k_op_btst_8_r_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8556 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8557 (mc68kcpu)->not_z_flag = OPER_I_8(mc68kcpu) & (1 << (DX(mc68kcpu) & 7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8558 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8559
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8561 static void m68k_op_btst_32_s_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8562 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8563 (mc68kcpu)->not_z_flag = DY(mc68kcpu) & (1 << (OPER_I_8(mc68kcpu) & 0x1f));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8564 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8565
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8566
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8567 static void m68k_op_btst_8_s_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8568 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8569 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8570
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8571 (mc68kcpu)->not_z_flag = OPER_AY_AI_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8572 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8575 static void m68k_op_btst_8_s_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8576 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8577 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8578
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8579 (mc68kcpu)->not_z_flag = OPER_AY_PI_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8580 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8583 static void m68k_op_btst_8_s_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8584 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8585 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8587 (mc68kcpu)->not_z_flag = OPER_A7_PI_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8588 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8591 static void m68k_op_btst_8_s_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8592 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8593 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8595 (mc68kcpu)->not_z_flag = OPER_AY_PD_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8596 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8598
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8599 static void m68k_op_btst_8_s_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8600 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8601 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8603 (mc68kcpu)->not_z_flag = OPER_A7_PD_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8604 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8607 static void m68k_op_btst_8_s_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8608 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8609 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8611 (mc68kcpu)->not_z_flag = OPER_AY_DI_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8612 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8613
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8614
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8615 static void m68k_op_btst_8_s_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8616 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8617 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8619 (mc68kcpu)->not_z_flag = OPER_AY_IX_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8620 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8623 static void m68k_op_btst_8_s_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8624 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8625 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8627 (mc68kcpu)->not_z_flag = OPER_AW_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8628 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8629
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8631 static void m68k_op_btst_8_s_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8632 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8633 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8634
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8635 (mc68kcpu)->not_z_flag = OPER_AL_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8636 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8639 static void m68k_op_btst_8_s_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8640 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8641 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8643 (mc68kcpu)->not_z_flag = OPER_PCDI_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8644 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8646
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8647 static void m68k_op_btst_8_s_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8648 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8649 uint32_t bit = OPER_I_8(mc68kcpu) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8651 (mc68kcpu)->not_z_flag = OPER_PCIX_8(mc68kcpu) & (1 << bit);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8652 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8653
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8655 static void m68k_op_callm_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8656 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8657 /* note: watch out for pcrelative modes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8658 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8659 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8660 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8661
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8662 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8663 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8664 (void)ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8665 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8666 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8667 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8668 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8669 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8670 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8673 static void m68k_op_callm_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8674 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8675 /* note: watch out for pcrelative modes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8676 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8677 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8678 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8679
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8680 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8681 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8682 (void)ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8683 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8684 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8685 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8686 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8687 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8688 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8689
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8691 static void m68k_op_callm_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8692 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8693 /* note: watch out for pcrelative modes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8694 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8695 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8696 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8697
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8698 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8699 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8700 (void)ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8701 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8702 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8703 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8704 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8705 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8706 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8709 static void m68k_op_callm_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8711 /* note: watch out for pcrelative modes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8712 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8713 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8714 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8716 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8717 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8718 (void)ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8719 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8720 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8721 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8722 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8723 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8727 static void m68k_op_callm_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8728 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8729 /* note: watch out for pcrelative modes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8730 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8731 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8732 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8733
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8734 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8735 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8736 (void)ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8737 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8738 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8739 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8740 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8741 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8742 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8744
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8745 static void m68k_op_callm_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8746 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8747 /* note: watch out for pcrelative modes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8748 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8749 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8750 uint32_t ea = EA_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8751
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8752 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8753 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8754 (void)ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8755 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8756 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8757 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8758 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8759 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8760 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8763 static void m68k_op_callm_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8764 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8765 /* note: watch out for pcrelative modes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8766 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8767 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8768 uint32_t ea = EA_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8770 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8771 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8772 (void)ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8773 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (callm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8774 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8775 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8776 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8777 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8778 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8781 static void m68k_op_cas_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8782 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8783 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8784 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8785 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8786 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8787 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8788 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8789 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8791 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8792 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8793 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8794 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8795 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8796
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8797 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8798 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8799 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8800 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8801 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8802 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8803 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8804 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8805 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8806 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8807 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8808
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8810 static void m68k_op_cas_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8811 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8812 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8813 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8814 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8815 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8816 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8817 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8818 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8819
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8820 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8821 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8822 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8823 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8824 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8826 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8827 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8828 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8829 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8830 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8831 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8832 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8833 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8834 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8835 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8836 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8837
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8839 static void m68k_op_cas_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8840 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8841 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8842 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8843 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8844 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8845 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8846 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8847 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8848
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8849 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8850 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8851 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8852 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8853 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8855 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8856 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8857 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8858 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8859 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8860 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8861 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8862 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8863 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8864 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8865 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8868 static void m68k_op_cas_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8869 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8870 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8871 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8872 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8873 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8874 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8875 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8876 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8877
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8878 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8879 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8880 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8881 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8882 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8884 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8885 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8886 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8887 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8888 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8889 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8890 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8891 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8892 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8893 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8894 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8897 static void m68k_op_cas_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8898 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8899 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8900 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8901 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8902 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8903 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8904 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8905 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8906
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8907 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8908 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8909 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8910 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8911 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8912
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8913 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8914 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8915 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8916 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8917 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8918 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8919 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8920 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8921 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8922 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8923 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8926 static void m68k_op_cas_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8927 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8928 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8929 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8930 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8931 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8932 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8933 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8934 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8936 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8937 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8938 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8939 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8940 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8942 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8943 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8944 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8945 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8946 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8947 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8948 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8949 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8951 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8952 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8954
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8955 static void m68k_op_cas_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8956 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8957 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8958 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8959 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8960 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8961 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8962 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8963 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8965 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8966 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8967 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8968 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8969 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8970
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8971 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8972 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8973 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8974 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8975 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8976 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8977 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8978 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8979 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8980 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8981 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8984 static void m68k_op_cas_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8985 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8986 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8987 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8988 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8989 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8990 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8991 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8992 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8994 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8995 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8996 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8997 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8998 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9000 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9001 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9002 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9003 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9004 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9005 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9006 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9007 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9008 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9009 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9010 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9011
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9012
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9013 static void m68k_op_cas_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9014 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9015 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9016 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9017 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9018 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9019 uint32_t dest = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9020 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9021 uint32_t res = dest - MASK_OUT_ABOVE_8(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9023 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9024 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9025 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9026 (mc68kcpu)->v_flag = VFLAG_SUB_8(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9027 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9028
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9029 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9030 *compare = MASK_OUT_BELOW_8(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9031 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9032 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9033 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9034 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9035 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9036 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9037 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9038 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9039 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9040
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9042 static void m68k_op_cas_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9043 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9044 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9045 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9046 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9047 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9048 uint32_t dest = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9049 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9050 uint32_t res = dest - MASK_OUT_ABOVE_16(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9052 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9053 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9054 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9055 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9056 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9058 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9059 *compare = MASK_OUT_BELOW_16(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9060 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9061 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9062 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9063 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9064 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9065 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9066 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9067 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9068 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9070
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9071 static void m68k_op_cas_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9072 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9073 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9074 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9075 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9076 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9077 uint32_t dest = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9078 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9079 uint32_t res = dest - MASK_OUT_ABOVE_16(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9080
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9081 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9082 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9083 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9084 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9085 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9087 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9088 *compare = MASK_OUT_BELOW_16(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9089 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9090 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9091 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9092 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9093 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9094 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9095 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9096 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9097 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9100 static void m68k_op_cas_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9101 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9102 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9103 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9104 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9105 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9106 uint32_t dest = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9107 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9108 uint32_t res = dest - MASK_OUT_ABOVE_16(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9109
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9110 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9111 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9112 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9113 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9114 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9115
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9116 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9117 *compare = MASK_OUT_BELOW_16(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9118 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9119 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9120 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9121 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9122 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9123 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9124 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9125 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9126 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9128
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9129 static void m68k_op_cas_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9130 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9131 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9132 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9133 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9134 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9135 uint32_t dest = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9136 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9137 uint32_t res = dest - MASK_OUT_ABOVE_16(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9139 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9140 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9141 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9142 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9143 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9144
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9145 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9146 *compare = MASK_OUT_BELOW_16(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9147 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9148 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9149 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9150 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9151 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9152 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9153 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9154 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9155 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9157
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9158 static void m68k_op_cas_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9159 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9160 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9161 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9162 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9163 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9164 uint32_t dest = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9165 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9166 uint32_t res = dest - MASK_OUT_ABOVE_16(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9168 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9169 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9170 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9171 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9172 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9174 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9175 *compare = MASK_OUT_BELOW_16(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9176 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9177 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9178 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9179 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9180 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9181 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9182 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9183 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9184 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9185
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9186
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9187 static void m68k_op_cas_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9188 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9189 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9190 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9191 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9192 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9193 uint32_t dest = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9194 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9195 uint32_t res = dest - MASK_OUT_ABOVE_16(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9196
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9197 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9198 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9199 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9200 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9201 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9202
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9203 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9204 *compare = MASK_OUT_BELOW_16(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9205 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9206 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9207 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9208 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9209 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9210 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9211 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9212 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9213 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9214
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9216 static void m68k_op_cas_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9217 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9218 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9219 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9220 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9221 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9222 uint32_t dest = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9223 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9224 uint32_t res = dest - MASK_OUT_ABOVE_16(*compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9226 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9227 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9228 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9229 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9230 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9232 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9233 *compare = MASK_OUT_BELOW_16(*compare) | dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9234 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9235 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9236 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9237 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_D(mc68kcpu)[(word2 >> 6) & 7]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9238 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9239 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9240 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9241 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9242 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9244
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9245 static void m68k_op_cas_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9246 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9247 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9248 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9249 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9250 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9251 uint32_t dest = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9252 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9253 uint32_t res = dest - *compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9255 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9256 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9257 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9258 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9259 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9261 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9262 *compare = dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9263 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9264 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9265 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9266 m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9267 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9268 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9269 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9270 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9271 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9272
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9274 static void m68k_op_cas_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9275 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9276 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9277 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9278 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9279 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9280 uint32_t dest = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9281 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9282 uint32_t res = dest - *compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9283
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9284 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9285 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9286 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9287 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9288 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9290 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9291 *compare = dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9292 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9293 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9294 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9295 m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9296 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9297 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9298 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9299 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9300 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9302
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9303 static void m68k_op_cas_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9304 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9305 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9306 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9307 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9308 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9309 uint32_t dest = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9310 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9311 uint32_t res = dest - *compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9312
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9313 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9314 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9315 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9316 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9317 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9318
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9319 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9320 *compare = dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9321 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9322 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9323 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9324 m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9325 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9326 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9327 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9328 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9329 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9332 static void m68k_op_cas_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9333 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9334 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9335 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9336 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9337 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9338 uint32_t dest = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9339 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9340 uint32_t res = dest - *compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9342 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9343 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9344 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9345 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9346 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9348 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9349 *compare = dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9350 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9351 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9352 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9353 m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9354 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9355 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9356 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9357 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9358 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9361 static void m68k_op_cas_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9362 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9363 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9364 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9365 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9366 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9367 uint32_t dest = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9368 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9369 uint32_t res = dest - *compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9371 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9372 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9373 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9374 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9375 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9376
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9377 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9378 *compare = dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9379 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9380 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9381 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9382 m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9383 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9384 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9385 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9386 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9387 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9390 static void m68k_op_cas_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9391 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9392 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9393 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9394 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9395 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9396 uint32_t dest = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9397 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9398 uint32_t res = dest - *compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9400 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9401 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9402 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9403 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9404 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9406 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9407 *compare = dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9408 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9409 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9410 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9411 m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9412 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9413 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9414 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9415 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9416 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9419 static void m68k_op_cas_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9420 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9421 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9422 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9423 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9424 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9425 uint32_t dest = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9426 uint32_t* compare = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9427 uint32_t res = dest - *compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9428
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9429 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9430 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9431 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9432 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9433 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare, dest, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9434
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9435 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9436 *compare = dest;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9437 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9438 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9439 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9440 m68ki_write_32((mc68kcpu), ea, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9441 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9442 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9443 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9444 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9445 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9446
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9448 static void m68k_op_cas2_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9449 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9450 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9451 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9452 uint32_t word2 = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9453 uint32_t* compare1 = &REG_D(mc68kcpu)[(word2 >> 16) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9454 uint32_t ea1 = REG_DA(mc68kcpu)[(word2 >> 28) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9455 uint32_t dest1 = m68ki_read_16((mc68kcpu), ea1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9456 uint32_t res1 = dest1 - MASK_OUT_ABOVE_16(*compare1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9457 uint32_t* compare2 = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9458 uint32_t ea2 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9459 uint32_t dest2 = m68ki_read_16((mc68kcpu), ea2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9460 uint32_t res2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9462 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9463 (mc68kcpu)->n_flag = NFLAG_16(res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9464 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9465 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare1, dest1, res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9466 (mc68kcpu)->c_flag = CFLAG_16(res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9468 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9469 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9470 res2 = dest2 - MASK_OUT_ABOVE_16(*compare2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9471
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9472 (mc68kcpu)->n_flag = NFLAG_16(res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9473 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9474 (mc68kcpu)->v_flag = VFLAG_SUB_16(*compare2, dest2, res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9475 (mc68kcpu)->c_flag = CFLAG_16(res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9477 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9478 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9479 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9480 m68ki_write_16((mc68kcpu), ea1, REG_D(mc68kcpu)[(word2 >> 22) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9481 m68ki_write_16((mc68kcpu), ea2, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9482 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9483 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9484 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9485 *compare1 = BIT_1F(word2) ? MAKE_INT_16(dest1) : MASK_OUT_BELOW_16(*compare1) | dest1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9486 *compare2 = BIT_F(word2) ? MAKE_INT_16(dest2) : MASK_OUT_BELOW_16(*compare2) | dest2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9487 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9488 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9489 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9490 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9493 static void m68k_op_cas2_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9494 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9495 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9496 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9497 uint32_t word2 = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9498 uint32_t* compare1 = &REG_D(mc68kcpu)[(word2 >> 16) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9499 uint32_t ea1 = REG_DA(mc68kcpu)[(word2 >> 28) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9500 uint32_t dest1 = m68ki_read_32((mc68kcpu), ea1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9501 uint32_t res1 = dest1 - *compare1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9502 uint32_t* compare2 = &REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9503 uint32_t ea2 = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9504 uint32_t dest2 = m68ki_read_32((mc68kcpu), ea2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9505 uint32_t res2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9507 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9508 (mc68kcpu)->n_flag = NFLAG_32(res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9509 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9510 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare1, dest1, res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9511 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare1, dest1, res1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9513 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9514 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9515 res2 = dest2 - *compare2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9516
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9517 (mc68kcpu)->n_flag = NFLAG_32(res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9518 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9519 (mc68kcpu)->v_flag = VFLAG_SUB_32(*compare2, dest2, res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9520 (mc68kcpu)->c_flag = CFLAG_SUB_32(*compare2, dest2, res2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9522 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9523 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9524 (mc68kcpu)->c.current_cycle += 3;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9525 m68ki_write_32((mc68kcpu), ea1, REG_D(mc68kcpu)[(word2 >> 22) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9526 m68ki_write_32((mc68kcpu), ea2, REG_D(mc68kcpu)[(word2 >> 6) & 7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9527 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9528 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9529 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9530 *compare1 = dest1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9531 *compare2 = dest2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9532 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9534 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9535 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9538 static void m68k_op_chk_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9539 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9540 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9541 int32_t bound = MAKE_INT_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9543 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9544 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9545 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9547 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9548 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9549 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9550 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9551 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9552 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9553 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9555
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9556 static void m68k_op_chk_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9557 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9558 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9559 int32_t bound = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9561 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9562 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9563 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9564
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9565 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9566 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9567 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9568 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9569 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9570 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9571 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9572
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9574 static void m68k_op_chk_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9575 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9576 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9577 int32_t bound = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9578
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9579 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9580 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9581 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9583 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9584 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9585 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9586 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9587 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9588 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9589 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9591
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9592 static void m68k_op_chk_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9593 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9594 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9595 int32_t bound = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9597 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9598 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9599 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9600
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9601 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9602 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9603 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9604 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9605 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9606 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9607 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9608
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9609
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9610 static void m68k_op_chk_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9611 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9612 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9613 int32_t bound = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9614
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9615 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9616 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9617 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9619 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9620 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9621 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9622 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9623 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9624 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9625 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9627
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9628 static void m68k_op_chk_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9629 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9630 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9631 int32_t bound = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9632
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9633 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9634 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9635 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9637 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9638 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9639 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9640 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9641 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9642 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9643 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9644
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9646 static void m68k_op_chk_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9647 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9648 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9649 int32_t bound = MAKE_INT_16(OPER_AW_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9651 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9652 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9653 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9655 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9656 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9657 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9658 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9659 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9660 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9661 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9662
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9664 static void m68k_op_chk_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9665 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9666 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9667 int32_t bound = MAKE_INT_16(OPER_AL_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9668
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9669 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9670 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9671 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9673 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9674 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9675 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9677 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9678 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9679 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9681
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9682 static void m68k_op_chk_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9683 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9684 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9685 int32_t bound = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9687 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9688 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9689 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9691 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9692 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9693 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9694 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9695 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9696 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9697 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9698
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9699
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9700 static void m68k_op_chk_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9701 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9702 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9703 int32_t bound = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9704
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9705 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9706 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9707 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9709 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9711 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9712 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9713 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9714 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9715 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9716
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9718 static void m68k_op_chk_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9719 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9720 int32_t src = MAKE_INT_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9721 int32_t bound = MAKE_INT_16(OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9723 (mc68kcpu)->not_z_flag = ZFLAG_16(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9724 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9725 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9727 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9728 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9729 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9730 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9731 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9732 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9733 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9735
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9736 static void m68k_op_chk_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9737 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9738 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9739 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9740 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9741 int32_t bound = MAKE_INT_32(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9743 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9744 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9745 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9746
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9747 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9748 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9749 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9750 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9751 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9752 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9753 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9754 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9755 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9756 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9758
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9759 static void m68k_op_chk_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9760 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9761 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9762 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9763 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9764 int32_t bound = MAKE_INT_32(OPER_AY_AI_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9765
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9766 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9767 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9768 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9770 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9771 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9772 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9773 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9774 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9775 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9776 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9777 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9778 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9779 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9781
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9782 static void m68k_op_chk_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9783 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9784 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9785 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9786 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9787 int32_t bound = MAKE_INT_32(OPER_AY_PI_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9788
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9789 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9790 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9791 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9793 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9794 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9795 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9796 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9797 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9798 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9799 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9800 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9801 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9802 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9804
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9805 static void m68k_op_chk_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9806 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9807 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9808 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9809 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9810 int32_t bound = MAKE_INT_32(OPER_AY_PD_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9812 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9813 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9814 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9816 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9817 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9818 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9819 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9820 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9821 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9822 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9823 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9824 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9825 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9828 static void m68k_op_chk_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9829 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9830 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9831 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9832 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9833 int32_t bound = MAKE_INT_32(OPER_AY_DI_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9835 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9836 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9837 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9839 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9840 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9841 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9842 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9843 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9844 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9845 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9846 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9847 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9848 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9850
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9851 static void m68k_op_chk_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9852 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9853 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9854 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9855 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9856 int32_t bound = MAKE_INT_32(OPER_AY_IX_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9857
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9858 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9859 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9860 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9862 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9863 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9864 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9865 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9866 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9867 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9868 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9869 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9870 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9871 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9872
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9874 static void m68k_op_chk_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9875 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9876 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9877 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9878 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9879 int32_t bound = MAKE_INT_32(OPER_AW_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9880
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9881 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9882 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9883 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9884
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9885 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9886 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9887 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9888 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9889 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9890 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9891 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9892 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9893 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9894 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9897 static void m68k_op_chk_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9898 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9899 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9900 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9901 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9902 int32_t bound = MAKE_INT_32(OPER_AL_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9904 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9905 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9906 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9907
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9908 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9909 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9910 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9911 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9912 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9913 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9914 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9915 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9916 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9917 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9918
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9919
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9920 static void m68k_op_chk_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9921 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9922 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9923 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9924 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9925 int32_t bound = MAKE_INT_32(OPER_PCDI_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9927 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9928 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9929 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9930
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9931 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9932 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9933 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9934 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9935 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9936 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9937 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9938 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9939 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9940 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9942
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9943 static void m68k_op_chk_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9944 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9945 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9946 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9947 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9948 int32_t bound = MAKE_INT_32(OPER_PCIX_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9949
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9950 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9951 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9952 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9954 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9955 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9956 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9957 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9958 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9959 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9960 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9961 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9962 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9963 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9966 static void m68k_op_chk_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9967 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9968 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9969 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9970 int32_t src = MAKE_INT_32(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9971 int32_t bound = MAKE_INT_32(OPER_I_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9972
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9973 (mc68kcpu)->not_z_flag = ZFLAG_32(src); /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9974 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9975 (mc68kcpu)->c_flag = CFLAG_CLEAR; /* Undocumented */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9977 if(src >= 0 && src <= bound)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9978 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9979 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9980 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9981 (mc68kcpu)->n_flag = (src < 0)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9982 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9983 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9984 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9985 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9986 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9988
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9989 static void m68k_op_chk2cmp2_8_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9990 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9991 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9992 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9993 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9994 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9995 uint32_t ea = EA_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9996 uint32_t lower_bound = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9997 uint32_t upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9998
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9999 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10000 (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10001 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10002 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10003 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10004 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10005 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10006 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10007 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10008 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10009 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10010
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10011 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10012 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10013 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10014 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10015 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10016 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10017 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10020 static void m68k_op_chk2cmp2_8_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10021 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10022 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10023 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10024 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10025 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10026 uint32_t ea = EA_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10027 uint32_t lower_bound = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10028 uint32_t upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10030 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10031 (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10032 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10033 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10034 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10035 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10036 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10037 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10038 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10039 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10040 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10042 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10043 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10044 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10045 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10046 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10047 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10048 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10050
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10051 static void m68k_op_chk2cmp2_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10052 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10053 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10054 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10055 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10056 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10057 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10058 uint32_t lower_bound = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10059 uint32_t upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10060
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10061 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10062 (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10063 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10064 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10065 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10066 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10067 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10068 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10069 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10070 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10071 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10073 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10074 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10075 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10076 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10077 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10078 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10079 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10080
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10081
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10082 static void m68k_op_chk2cmp2_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10083 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10084 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10085 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10086 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10087 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10088 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10089 uint32_t lower_bound = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10090 uint32_t upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10092 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10093 (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10094 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10095 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10096 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10097 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10098 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10099 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10100 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10101 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10102 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10103
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10104 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10105 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10106 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10107 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10108 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10109 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10110 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10113 static void m68k_op_chk2cmp2_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10114 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10115 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10116 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10117 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10118 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10119 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10120 uint32_t lower_bound = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10121 uint32_t upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10123 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10124 (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10125 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10126 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10127 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10128 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10129 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10130 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10131 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10132 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10133 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10135 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10136 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10137 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10138 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10139 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10140 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10141 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10144 static void m68k_op_chk2cmp2_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10145 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10146 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10147 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10148 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10149 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10150 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10151 uint32_t lower_bound = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10152 uint32_t upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10154 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10155 (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10156 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10157 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10158 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10159 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10160 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10161 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10162 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10163 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10164 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10165
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10166 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10167 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10168 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10169 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10170 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10171 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10172 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10175 static void m68k_op_chk2cmp2_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10176 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10177 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10178 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10179 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10180 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10181 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10182 uint32_t lower_bound = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10183 uint32_t upper_bound = m68ki_read_8((mc68kcpu), ea + 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10185 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10186 (mc68kcpu)->c_flag = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10187 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10188 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10189 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10190 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10191 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10192 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10193 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10194 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10195 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10196
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10197 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10198 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10199 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10200 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10201 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10202 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10203 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10205
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10206 static void m68k_op_chk2cmp2_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10207 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10208 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10209 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10210 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10211 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10212 uint32_t ea = EA_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10213 uint32_t lower_bound = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10214 uint32_t upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10216 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10217 (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10218 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10219 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10220 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10221 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10222 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10223 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10224 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10225 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10226 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10227 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10229 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10230 (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10231 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10232 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10233 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10234 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10235 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10236 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10237 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10238 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10239 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10240
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10241
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10242 static void m68k_op_chk2cmp2_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10243 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10244 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10245 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10246 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10247 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10248 uint32_t ea = EA_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10249 uint32_t lower_bound = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10250 uint32_t upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10252 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10253 (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10254 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10255 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10256 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10257 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10258 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10259 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10260 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10261 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10262 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10263 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10265 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10266 (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10267 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10268 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10269 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10270 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10271 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10272 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10273 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10274 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10275 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10277
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10278 static void m68k_op_chk2cmp2_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10279 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10280 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10281 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10282 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10283 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10284 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10285 uint32_t lower_bound = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10286 uint32_t upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10288 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10289 (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10290 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10291 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10292
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10293 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10294 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10295 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10296 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10297 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10298 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10299 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10300 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10301 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10302 (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10303 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10304 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10306 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10307 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10308 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10309 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10310 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10311 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10312 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10315 static void m68k_op_chk2cmp2_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10316 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10317 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10318 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10319 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10320 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10321 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10322 uint32_t lower_bound = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10323 uint32_t upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10325 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10326 (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10327 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10328 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10330 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10331 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10332 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10333 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10334 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10335 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10336 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10337 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10338 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10339 (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10340 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10341 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10343 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10344 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10345 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10346 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10347 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10348 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10349 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10352 static void m68k_op_chk2cmp2_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10353 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10354 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10355 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10356 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10357 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10358 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10359 uint32_t lower_bound = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10360 uint32_t upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10362 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10363 (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10364 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10365 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10367 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10368 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10369 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10370 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10371 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10372 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10373 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10374 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10375 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10376 (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10377 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10378 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10380 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10381 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10382 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10383 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10384 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10385 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10386 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10389 static void m68k_op_chk2cmp2_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10390 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10391 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10392 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10393 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10394 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10395 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10396 uint32_t lower_bound = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10397 uint32_t upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10399 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10400 (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10401 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10402 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10404 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10405 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10406 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10407 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10408 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10409 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10410 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10411 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10412 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10413 (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10414 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10415 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10417 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10418 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10419 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10420 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10421 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10422 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10423 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10424
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10426 static void m68k_op_chk2cmp2_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10427 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10428 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10429 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10430 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10431 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15]&0xffff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10432 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10433 uint32_t lower_bound = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10434 uint32_t upper_bound = m68ki_read_16((mc68kcpu), ea + 2);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10436 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10437 (mc68kcpu)->c_flag = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10438 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10439 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10440
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10441 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10442 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10443 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10444 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10445 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10446 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10447 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10448 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10449 if(!BIT_F(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10450 (mc68kcpu)->c_flag = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10451 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10452 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10453
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10454 (mc68kcpu)->c_flag = CFLAG_16((mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10455 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10456 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10457 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10458 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10459 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10463 static void m68k_op_chk2cmp2_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10464 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10465 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10466 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10467 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10468 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10469 uint32_t ea = EA_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10470 uint32_t lower_bound = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10471 uint32_t upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10472
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10473 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10474 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10475 (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10476 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10477 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10478 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10479 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10480 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10481 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10483 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10484 (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10485 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10486 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10487 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10488 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10489 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10490 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10493 static void m68k_op_chk2cmp2_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10494 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10495 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10496 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10497 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10498 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10499 uint32_t ea = EA_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10500 uint32_t lower_bound = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10501 uint32_t upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10502
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10503 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10504 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10505 (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10506 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10507 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10508 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10509 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10510 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10511 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10513 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10514 (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10515 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10516 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10517 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10518 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10519 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10520 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10523 static void m68k_op_chk2cmp2_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10524 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10525 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10526 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10527 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10528 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10529 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10530 uint32_t lower_bound = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10531 uint32_t upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10532
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10533 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10534 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10535 (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10536 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10537 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10538 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10539 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10540 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10541 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10543 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10544 (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10545 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10546 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10547 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10548 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10549 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10550 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10551
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10552
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10553 static void m68k_op_chk2cmp2_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10554 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10555 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10556 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10557 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10558 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10559 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10560 uint32_t lower_bound = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10561 uint32_t upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10562
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10563 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10564 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10565 (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10566 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10567 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10568 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10569 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10570 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10571 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10572
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10573 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10574 (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10575 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10576 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10577 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10578 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10579 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10580 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10583 static void m68k_op_chk2cmp2_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10584 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10585 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10586 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10587 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10588 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10589 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10590 uint32_t lower_bound = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10591 uint32_t upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10592
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10593 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10594 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10595 (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10596 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10597 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10598 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10599 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10600 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10601 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10603 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10604 (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10605 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10606 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10607 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10608 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10609 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10610 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10612
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10613 static void m68k_op_chk2cmp2_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10614 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10615 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10616 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10617 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10618 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10619 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10620 uint32_t lower_bound = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10621 uint32_t upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10623 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10624 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10625 (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10626 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10627 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10628 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10629 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10630 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10631 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10632
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10633 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10634 (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10635 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10636 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10637 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10638 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10639 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10640 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10643 static void m68k_op_chk2cmp2_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10644 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10645 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10646 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10647 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10648 uint32_t compare = REG_DA(mc68kcpu)[(word2 >> 12) & 15];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10649 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10650 uint32_t lower_bound = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10651 uint32_t upper_bound = m68ki_read_32((mc68kcpu), ea + 4);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10653 (mc68kcpu)->c_flag = compare - lower_bound;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10654 (mc68kcpu)->not_z_flag = !((upper_bound==compare) | (lower_bound==compare));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10655 (mc68kcpu)->c_flag = CFLAG_SUB_32(lower_bound, compare, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10656 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10657 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10658 if(BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10659 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10660 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10661 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10662
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10663 (mc68kcpu)->c_flag = upper_bound - compare;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10664 (mc68kcpu)->c_flag = CFLAG_SUB_32(compare, upper_bound, (mc68kcpu)->c_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10665 if(COND_CS(mc68kcpu) && BIT_B(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10666 m68ki_exception_trap((mc68kcpu), EXCEPTION_CHK);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10667 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10668 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10669 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10670 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10673 static void m68k_op_clr_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10674 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10675 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10676
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10677 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10678 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10679 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10680 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10681 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10682
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10683
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10684 static void m68k_op_clr_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10685 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10686 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10688 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10689 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10690 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10691 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10693 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10694
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10695 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10696 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10697 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10698 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10699 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10702 static void m68k_op_clr_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10703 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10704 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10706 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10707 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10708 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10709 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10710
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10711 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10712
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10713 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10714 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10715 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10716 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10717 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10720 static void m68k_op_clr_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10721 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10722 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10723
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10724 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10725 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10726 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10727 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10729 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10731 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10732 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10733 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10734 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10735 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10738 static void m68k_op_clr_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10739 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10740 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10741
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10742 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10743 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10744 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10745 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10746
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10747 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10748
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10749 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10750 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10751 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10752 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10753 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10754
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10756 static void m68k_op_clr_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10757 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10758 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10759
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10760 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10761 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10762 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10763 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10765 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10766
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10767 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10768 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10769 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10770 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10771 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10772
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10774 static void m68k_op_clr_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10775 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10776 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10777
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10778 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10779 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10780 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10781 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10783 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10784
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10785 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10786 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10787 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10788 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10789 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10792 static void m68k_op_clr_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10793 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10794 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10795
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10796 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10797 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10798 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10799 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10800
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10801 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10802
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10803 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10804 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10805 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10806 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10807 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10808
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10810 static void m68k_op_clr_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10811 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10812 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10814 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10815 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10816 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10817 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10819 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10820
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10821 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10822 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10823 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10824 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10825 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10828 static void m68k_op_clr_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10829 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10830 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10831
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10832 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10833 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10834 m68ki_read_8((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10835 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10836
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10837 m68ki_write_8((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10839 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10840 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10841 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10842 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10843 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10844
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10846 static void m68k_op_clr_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10847 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10848 DY(mc68kcpu) &= 0xffff0000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10850 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10851 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10852 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10853 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10854 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10856
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10857 static void m68k_op_clr_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10858 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10859 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10861 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10862 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10863 m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10864 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10865
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10866 m68ki_write_16((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10868 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10869 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10870 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10871 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10872 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10875 static void m68k_op_clr_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10876 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10877 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10878
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10879 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10880 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10881 m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10882 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10884 m68ki_write_16((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10885
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10886 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10887 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10888 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10889 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10890 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10891
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10892
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10893 static void m68k_op_clr_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10894 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10895 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10897 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10898 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10899 m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10900 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10902 m68ki_write_16((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10904 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10905 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10906 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10907 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10908 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10911 static void m68k_op_clr_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10912 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10913 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10914
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10915 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10916 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10917 m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10918 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10919
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10920 m68ki_write_16((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10922 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10923 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10924 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10925 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10926 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10927
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10928
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10929 static void m68k_op_clr_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10930 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10931 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10933 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10934 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10935 m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10936 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10938 m68ki_write_16((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10940 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10941 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10942 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10943 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10944 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10947 static void m68k_op_clr_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10948 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10949 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10950
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10951 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10952 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10953 m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10954 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10955
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10956 m68ki_write_16((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10958 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10959 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10960 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10961 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10962 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10965 static void m68k_op_clr_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10966 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10967 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10969 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10970 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10971 m68ki_read_16((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10972 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10974 m68ki_write_16((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10975
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10976 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10977 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10978 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10979 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10980 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10983 static void m68k_op_clr_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10984 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10985 DY(mc68kcpu) = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10986
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10987 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10988 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10989 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10990 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10991 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10992
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10994 static void m68k_op_clr_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10995 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10996 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10998 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10999 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11000 m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11001 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11002
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11003 m68ki_write_32((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11004
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11005 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11006 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11007 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11008 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11009 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11010
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11011
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11012 static void m68k_op_clr_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11013 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11014 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11016 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11017 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11018 m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11019 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11020
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11021 m68ki_write_32((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11023 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11024 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11025 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11026 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11027 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11028
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11030 static void m68k_op_clr_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11031 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11032 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11034 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11035 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11036 m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11037 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11039 m68ki_write_32((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11040
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11041 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11042 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11043 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11044 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11045 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11048 static void m68k_op_clr_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11049 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11050 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11052 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11053 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11054 m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11055 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11057 m68ki_write_32((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11058
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11059 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11060 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11061 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11062 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11063 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11064
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11065
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11066 static void m68k_op_clr_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11067 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11068 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11070 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11071 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11072 m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11073 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11075 m68ki_write_32((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11076
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11077 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11078 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11079 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11080 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11081 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11082
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11084 static void m68k_op_clr_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11085 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11086 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11087
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11088 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11089 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11090 m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11091 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11092
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11093 m68ki_write_32((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11094
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11095 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11096 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11097 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11098 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11099 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11101
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11102 static void m68k_op_clr_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11103 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11104 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11106 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11107 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11108 m68ki_read_32((mc68kcpu), ea); /* the 68000 does a dummy read, the value is discarded */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11109 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11110
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11111 m68ki_write_32((mc68kcpu), ea, 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11113 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11114 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11115 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11116 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11117 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11120 static void m68k_op_cmp_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11121 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11122 uint32_t src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11123 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11124 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11125
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11126 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11127 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11128 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11129 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11130 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11132
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11133 static void m68k_op_cmp_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11134 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11135 uint32_t src = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11136 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11137 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11139 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11140 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11141 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11142 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11143 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11144
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11146 static void m68k_op_cmp_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11147 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11148 uint32_t src = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11149 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11150 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11151
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11152 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11153 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11154 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11155 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11156 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11157
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11158
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11159 static void m68k_op_cmp_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11160 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11161 uint32_t src = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11162 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11163 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11164
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11165 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11166 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11167 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11168 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11169 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11170
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11171
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11172 static void m68k_op_cmp_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11173 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11174 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11175 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11176 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11177
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11178 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11179 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11180 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11181 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11182 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11185 static void m68k_op_cmp_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11186 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11187 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11188 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11189 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11191 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11192 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11193 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11194 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11195 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11196
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11198 static void m68k_op_cmp_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11199 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11200 uint32_t src = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11201 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11202 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11204 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11205 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11206 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11207 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11211 static void m68k_op_cmp_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11212 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11213 uint32_t src = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11214 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11215 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11217 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11218 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11219 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11220 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11221 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11222
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11224 static void m68k_op_cmp_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11225 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11226 uint32_t src = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11227 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11228 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11229
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11230 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11231 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11232 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11233 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11234 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11235
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11236
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11237 static void m68k_op_cmp_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11238 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11239 uint32_t src = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11240 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11241 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11242
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11243 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11244 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11245 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11246 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11247 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11248
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11250 static void m68k_op_cmp_8_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11251 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11252 uint32_t src = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11253 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11254 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11255
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11256 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11257 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11258 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11259 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11260 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11261
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11262
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11263 static void m68k_op_cmp_8_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11264 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11265 uint32_t src = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11266 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11267 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11268
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11269 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11270 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11271 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11272 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11273 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11276 static void m68k_op_cmp_8_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11277 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11278 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11279 uint32_t dst = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11280 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11282 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11283 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11284 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11285 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11286 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11289 static void m68k_op_cmp_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11290 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11291 uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11292 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11293 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11295 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11296 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11297 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11298 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11299 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11300
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11302 static void m68k_op_cmp_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11303 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11304 uint32_t src = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11305 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11306 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11308 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11309 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11310 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11311 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11312 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11315 static void m68k_op_cmp_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11316 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11317 uint32_t src = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11318 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11319 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11320
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11321 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11322 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11323 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11324 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11325 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11326
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11328 static void m68k_op_cmp_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11329 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11330 uint32_t src = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11331 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11332 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11333
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11334 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11335 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11336 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11337 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11338 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11339
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11340
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11341 static void m68k_op_cmp_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11342 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11343 uint32_t src = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11344 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11345 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11346
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11347 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11348 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11349 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11350 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11351 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11352
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11353
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11354 static void m68k_op_cmp_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11355 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11356 uint32_t src = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11357 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11358 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11360 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11361 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11362 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11363 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11364 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11367 static void m68k_op_cmp_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11369 uint32_t src = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11370 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11371 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11373 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11374 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11375 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11376 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11377 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11380 static void m68k_op_cmp_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11381 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11382 uint32_t src = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11383 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11384 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11386 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11387 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11388 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11389 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11390 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11393 static void m68k_op_cmp_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11394 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11395 uint32_t src = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11396 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11397 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11399 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11400 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11401 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11402 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11403 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11406 static void m68k_op_cmp_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11407 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11408 uint32_t src = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11409 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11410 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11412 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11413 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11414 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11415 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11416 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11419 static void m68k_op_cmp_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11420 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11421 uint32_t src = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11422 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11423 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11424
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11425 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11426 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11427 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11428 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11429 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11431
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11432 static void m68k_op_cmp_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11433 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11434 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11435 uint32_t dst = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11436 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11437
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11438 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11439 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11440 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11441 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11442 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11444
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11445 static void m68k_op_cmp_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11446 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11447 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11448 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11449 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11451 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11452 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11453 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11454 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11455 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11457
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11458 static void m68k_op_cmp_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11459 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11460 uint32_t src = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11461 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11462 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11464 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11465 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11466 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11467 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11468 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11471 static void m68k_op_cmp_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11472 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11473 uint32_t src = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11474 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11475 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11477 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11478 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11479 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11480 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11481 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11484 static void m68k_op_cmp_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11485 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11486 uint32_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11487 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11488 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11490 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11491 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11492 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11493 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11494 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11495
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11497 static void m68k_op_cmp_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11498 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11499 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11500 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11501 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11502
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11503 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11504 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11505 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11506 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11507 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11508
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11510 static void m68k_op_cmp_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11511 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11512 uint32_t src = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11513 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11514 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11516 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11517 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11518 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11519 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11520 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11523 static void m68k_op_cmp_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11524 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11525 uint32_t src = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11526 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11527 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11528
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11529 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11530 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11531 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11532 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11534
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11536 static void m68k_op_cmp_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11537 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11538 uint32_t src = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11539 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11540 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11542 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11543 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11544 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11545 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11546 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11549 static void m68k_op_cmp_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11550 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11551 uint32_t src = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11552 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11553 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11555 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11556 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11557 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11558 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11559 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11562 static void m68k_op_cmp_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11563 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11564 uint32_t src = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11565 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11566 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11567
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11568 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11569 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11570 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11571 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11572 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11575 static void m68k_op_cmp_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11576 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11577 uint32_t src = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11578 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11579 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11580
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11581 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11582 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11583 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11584 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11585 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11588 static void m68k_op_cmp_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11589 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11590 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11591 uint32_t dst = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11592 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11593
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11594 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11595 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11596 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11597 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11598 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11599
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11600
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11601 static void m68k_op_cmpa_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11602 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11603 uint32_t src = MAKE_INT_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11604 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11605 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11607 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11608 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11609 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11610 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11611 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11612
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11613
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11614 static void m68k_op_cmpa_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11615 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11616 uint32_t src = MAKE_INT_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11617 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11618 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11619
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11620 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11621 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11622 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11623 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11624 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11625
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11627 static void m68k_op_cmpa_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11628 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11629 uint32_t src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11630 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11631 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11632
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11633 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11634 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11635 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11636 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11637 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11639
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11640 static void m68k_op_cmpa_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11641 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11642 uint32_t src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11643 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11644 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11646 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11647 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11648 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11649 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11650 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11651
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11653 static void m68k_op_cmpa_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11654 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11655 uint32_t src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11656 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11657 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11659 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11660 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11661 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11662 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11663 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11666 static void m68k_op_cmpa_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11667 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11668 uint32_t src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11669 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11670 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11672 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11673 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11674 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11675 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11679 static void m68k_op_cmpa_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11680 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11681 uint32_t src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11682 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11683 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11684
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11685 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11686 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11687 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11688 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11689 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11692 static void m68k_op_cmpa_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11693 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11694 uint32_t src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11695 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11696 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11697
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11698 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11699 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11700 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11701 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11702 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11703
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11704
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11705 static void m68k_op_cmpa_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11706 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11707 uint32_t src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11708 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11709 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11710
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11711 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11712 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11713 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11714 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11715 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11716
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11718 static void m68k_op_cmpa_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11719 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11720 uint32_t src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11721 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11722 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11723
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11724 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11725 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11726 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11727 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11728 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11731 static void m68k_op_cmpa_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11732 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11733 uint32_t src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11734 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11735 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11737 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11738 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11739 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11740 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11741 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11744 static void m68k_op_cmpa_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11745 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11746 uint32_t src = MAKE_INT_16(OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11747 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11748 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11750 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11751 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11752 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11753 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11754 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11757 static void m68k_op_cmpa_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11758 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11759 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11760 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11761 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11763 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11764 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11765 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11766 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11767 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11768
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11770 static void m68k_op_cmpa_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11771 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11772 uint32_t src = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11773 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11774 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11775
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11776 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11777 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11778 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11779 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11780 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11781
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11783 static void m68k_op_cmpa_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11784 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11785 uint32_t src = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11786 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11787 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11788
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11789 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11790 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11791 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11792 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11793 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11794
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11795
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11796 static void m68k_op_cmpa_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11797 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11798 uint32_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11799 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11800 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11801
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11802 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11803 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11804 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11805 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11806 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11807
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11808
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11809 static void m68k_op_cmpa_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11810 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11811 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11812 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11813 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11815 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11816 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11817 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11818 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11819 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11820
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11821
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11822 static void m68k_op_cmpa_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11823 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11824 uint32_t src = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11825 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11826 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11828 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11829 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11830 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11831 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11832 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11833
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11835 static void m68k_op_cmpa_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11836 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11837 uint32_t src = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11838 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11839 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11840
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11841 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11842 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11843 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11844 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11845 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11847
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11848 static void m68k_op_cmpa_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11849 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11850 uint32_t src = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11851 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11852 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11854 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11855 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11856 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11857 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11858 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11859
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11861 static void m68k_op_cmpa_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11862 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11863 uint32_t src = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11864 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11865 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11867 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11868 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11869 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11870 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11871 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11872
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11874 static void m68k_op_cmpa_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11875 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11876 uint32_t src = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11877 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11878 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11880 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11881 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11882 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11883 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11884 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11885
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11887 static void m68k_op_cmpa_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11888 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11889 uint32_t src = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11890 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11891 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11892
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11893 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11894 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11895 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11896 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11897 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11898
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11900 static void m68k_op_cmpa_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11901 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11902 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11903 uint32_t dst = AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11904 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11906 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11907 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11908 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11909 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11910 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11912
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11913 static void m68k_op_cmpi_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11914 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11915 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11916 uint32_t dst = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11917 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11918
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11919 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11920 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11921 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11922 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11923 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11926 static void m68k_op_cmpi_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11927 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11928 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11929 uint32_t dst = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11930 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11932 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11933 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11934 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11935 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11936 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11939 static void m68k_op_cmpi_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11940 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11941 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11942 uint32_t dst = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11943 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11944
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11945 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11946 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11947 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11948 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11949 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11950
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11952 static void m68k_op_cmpi_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11953 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11954 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11955 uint32_t dst = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11956 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11958 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11959 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11960 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11961 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11962 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11965 static void m68k_op_cmpi_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11966 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11967 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11968 uint32_t dst = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11969 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11970
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11971 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11972 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11973 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11974 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11975 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11977
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11978 static void m68k_op_cmpi_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11979 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11980 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11981 uint32_t dst = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11982 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11984 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11985 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11986 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11987 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11988 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11991 static void m68k_op_cmpi_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11992 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11993 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11994 uint32_t dst = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11995 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11996
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11997 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11998 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11999 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12000 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12001 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12002
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12004 static void m68k_op_cmpi_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12005 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12006 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12007 uint32_t dst = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12008 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12010 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12011 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12012 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12013 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12014 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12016
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12017 static void m68k_op_cmpi_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12018 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12019 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12020 uint32_t dst = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12021 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12023 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12024 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12025 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12026 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12027 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12028
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12030 static void m68k_op_cmpi_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12031 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12032 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12033 uint32_t dst = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12034 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12036 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12037 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12038 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12039 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12040 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12043 static void m68k_op_cmpi_8_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12044 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12045 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12046 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12047 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12048 uint32_t dst = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12049 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12050
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12051 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12052 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12053 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12054 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12055 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12056 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12057 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12058 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12060
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12061 static void m68k_op_cmpi_8_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12062 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12063 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12064 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12065 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12066 uint32_t dst = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12067 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12068
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12069 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12070 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12071 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12072 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12073 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12074 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12075 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12079 static void m68k_op_cmpi_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12081 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12082 uint32_t dst = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12083 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12085 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12086 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12087 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12088 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12089 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12092 static void m68k_op_cmpi_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12093 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12094 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12095 uint32_t dst = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12096 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12098 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12099 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12100 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12101 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12102 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12103
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12104
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12105 static void m68k_op_cmpi_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12106 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12107 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12108 uint32_t dst = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12109 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12110
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12111 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12112 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12113 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12114 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12115 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12116
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12117
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12118 static void m68k_op_cmpi_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12119 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12120 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12121 uint32_t dst = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12122 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12123
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12124 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12125 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12126 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12127 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12128 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12129
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12130
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12131 static void m68k_op_cmpi_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12132 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12133 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12134 uint32_t dst = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12135 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12136
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12137 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12138 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12139 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12140 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12141 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12144 static void m68k_op_cmpi_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12145 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12146 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12147 uint32_t dst = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12148 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12149
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12150 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12151 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12152 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12153 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12154 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12157 static void m68k_op_cmpi_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12158 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12159 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12160 uint32_t dst = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12161 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12163 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12164 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12165 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12166 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12167 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12169
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12170 static void m68k_op_cmpi_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12171 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12172 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12173 uint32_t dst = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12174 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12176 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12177 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12178 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12179 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12180 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12181
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12182
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12183 static void m68k_op_cmpi_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12184 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12185 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12186 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12187 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12188 uint32_t dst = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12189 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12191 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12192 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12193 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12194 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12195 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12196 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12197 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12198 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12200
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12201 static void m68k_op_cmpi_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12202 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12203 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12204 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12205 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12206 uint32_t dst = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12207 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12208
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12209 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12210 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12211 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12212 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12213 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12214 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12215 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12216 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12219 static void m68k_op_cmpi_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12220 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12221 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12222 uint32_t dst = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12223 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12224
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12225 /* if (!(mc68kcpu)->cmpild_instr_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12226 ((mc68kcpu)->cmpild_instr_callback)(*(mc68kcpu)->program, (mc68kcpu)->ir & 7, src, 0xffffffff);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12228 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12229 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12230 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12231 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12232 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12233
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12234
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12235 static void m68k_op_cmpi_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12236 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12237 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12238 uint32_t dst = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12239 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12240
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12241 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12242 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12243 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12244 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12245 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12248 static void m68k_op_cmpi_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12249 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12250 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12251 uint32_t dst = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12252 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12254 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12255 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12256 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12257 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12258 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12261 static void m68k_op_cmpi_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12262 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12263 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12264 uint32_t dst = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12265 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12267 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12268 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12269 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12270 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12271 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12272
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12274 static void m68k_op_cmpi_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12275 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12276 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12277 uint32_t dst = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12278 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12280 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12281 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12282 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12283 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12284 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12285
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12287 static void m68k_op_cmpi_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12288 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12289 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12290 uint32_t dst = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12291 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12292
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12293 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12294 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12295 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12296 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12297 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12298
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12300 static void m68k_op_cmpi_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12301 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12302 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12303 uint32_t dst = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12304 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12306 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12307 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12308 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12309 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12310 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12311
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12312
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12313 static void m68k_op_cmpi_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12314 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12315 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12316 uint32_t dst = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12317 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12318
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12319 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12320 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12321 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12322 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12323 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12325
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12326 static void m68k_op_cmpi_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12327 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12328 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12329 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12330 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12331 uint32_t dst = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12332 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12333
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12334 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12335 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12336 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12337 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12338 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12339 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12340 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12341 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12344 static void m68k_op_cmpi_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12345 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12346 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12347 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12348 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12349 uint32_t dst = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12350 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12352 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12353 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12354 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12355 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12356 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12357 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12358 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12359 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12362 static void m68k_op_cmpm_8_ax7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12363 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12364 uint32_t src = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12365 uint32_t dst = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12366 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12367
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12368 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12369 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12370 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12371 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12372 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12373
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12374
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12375 static void m68k_op_cmpm_8_ay7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12376 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12377 uint32_t src = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12378 uint32_t dst = OPER_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12379 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12380
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12381 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12382 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12383 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12384 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12385 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12386
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12388 static void m68k_op_cmpm_8_axy7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12389 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12390 uint32_t src = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12391 uint32_t dst = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12392 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12394 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12395 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12396 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12397 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12398 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12401 static void m68k_op_cmpm_8(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12402 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12403 uint32_t src = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12404 uint32_t dst = OPER_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12405 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12406
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12407 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12408 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12409 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12410 (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12411 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12412
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12414 static void m68k_op_cmpm_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12415 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12416 uint32_t src = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12417 uint32_t dst = OPER_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12418 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12420 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12421 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12422 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12423 (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12424 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12427 static void m68k_op_cmpm_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12428 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12429 uint32_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12430 uint32_t dst = OPER_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12431 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12433 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12434 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12435 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12436 (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12437 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12440 static void m68k_op_cpbcc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12441 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12442 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12443 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12444 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpbcc)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12445 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12446 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12447 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12448 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12449 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12452 static void m68k_op_cpdbcc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12453 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12454 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12455 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12456 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpdbcc)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12457 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12458 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12459 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12460 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12461 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12464 static void m68k_op_cpgen_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12465 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12466 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type) && (mc68kcpu->get_fpu_enable() || mc68kcpu->has_pmmu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12467 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12468 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpgen)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12469 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12470 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12471 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12472 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12473 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12475
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12476 static void m68k_op_cpscc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12477 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12478 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12479 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12480 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpscc)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12481 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12482 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12483 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12484 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12485 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12486
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12487
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12488 static void m68k_op_cptrapcc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12489 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12490 /*if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12491 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12492 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cptrapcc)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12493 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12494 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12495 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12496 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12497 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12498
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12500 static void m68k_op_ftrapcc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12501 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12502 /* if((mc68kcpu)->get_fpu_enable())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12503 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12504 m68881_ftrap(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12505 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12506 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12507 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12508 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12511 static void m68k_op_dbt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12512 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12513 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12514 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12516
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12517 static void m68k_op_dbf_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12518 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12519 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12520 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12522 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12523 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12524 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12525 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12526 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12527 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12528 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12529 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12530 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12531 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12532 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12533 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12534 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12537 static void m68k_op_dbhi_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12538 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12539 if(COND_NOT_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12540 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12541 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12542 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12543
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12544 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12545 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12546 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12547 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12548 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12549 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12550 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12551 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12552 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12553 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12554 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12555 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12556 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12557 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12558 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12559 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12562 static void m68k_op_dbls_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12563 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12564 if(COND_NOT_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12565 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12566 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12567 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12568
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12569 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12570 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12571 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12572 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12573 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12574 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12575 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12576 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12577 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12578 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12579 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12580 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12581 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12582 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12583 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12584 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12585
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12587 static void m68k_op_dbcc_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12588 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12589 if(COND_NOT_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12590 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12591 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12592 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12593
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12594 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12595 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12596 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12597 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12598 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12599 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12600 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12601 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12602 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12603 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12604 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12605 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12606 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12607 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12608 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12609 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12612 static void m68k_op_dbcs_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12613 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12614 if(COND_NOT_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12615 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12616 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12617 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12619 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12620 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12621 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12622 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12623 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12624 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12625 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12626 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12627 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12628 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12629 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12630 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12631 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12632 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12633 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12634 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12637 static void m68k_op_dbne_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12638 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12639 if(COND_NOT_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12640 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12641 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12642 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12644 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12645 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12646 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12647 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12648 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12649 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12650 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12651 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12652 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12653 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12654 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12655 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12656 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12657 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12658 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12659 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12660
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12661
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12662 static void m68k_op_dbeq_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12663 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12664 if(COND_NOT_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12665 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12666 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12667 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12668
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12669 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12670 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12671 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12672 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12673 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12674 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12675 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12676 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12677 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12678 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12679 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12680 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12681 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12682 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12683 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12684 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12687 static void m68k_op_dbvc_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12688 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12689 if(COND_NOT_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12690 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12691 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12692 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12694 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12695 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12696 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12697 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12698 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12699 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12700 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12701 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12702 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12703 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12704 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12705 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12706 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12707 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12708 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12709 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12710
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12712 static void m68k_op_dbvs_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12713 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12714 if(COND_NOT_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12715 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12716 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12717 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12719 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12720 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12721 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12722 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12723 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12724 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12725 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12726 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12727 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12728 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12729 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12730 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12731 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12732 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12733 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12734 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12735
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12737 static void m68k_op_dbpl_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12738 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12739 if(COND_NOT_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12740 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12741 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12742 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12744 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12745 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12746 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12747 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12748 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12749 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12750 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12751 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12752 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12753 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12754 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12755 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12756 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12757 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12758 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12759 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12760
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12762 static void m68k_op_dbmi_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12763 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12764 if(COND_NOT_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12765 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12766 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12767 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12768
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12769 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12770 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12771 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12772 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12773 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12774 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12775 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12776 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12777 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12778 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12779 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12780 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12781 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12782 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12783 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12784 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12786
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12787 static void m68k_op_dbge_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12788 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12789 if(COND_NOT_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12790 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12791 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12792 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12793
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12794 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12795 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12796 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12797 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12798 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12799 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12800 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12801 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12802 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12803 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12804 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12805 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12806 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12807 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12808 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12809 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12810
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12812 static void m68k_op_dblt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12813 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12814 if(COND_NOT_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12815 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12816 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12817 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12819 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12820 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12821 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12822 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12823 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12824 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12825 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12826 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12827 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12828 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12829 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12830 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12831 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12832 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12833 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12834 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12836
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12837 static void m68k_op_dbgt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12838 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12839 if(COND_NOT_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12840 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12841 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12842 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12843
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12844 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12845 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12846 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12847 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12848 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12849 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12850 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12851 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12852 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12853 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12854 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12855 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12856 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12857 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12858 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12859 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12862 static void m68k_op_dble_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12863 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12864 if(COND_NOT_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12865 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12866 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12867 uint32_t res = MASK_OUT_ABOVE_16(*r_dst - 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12869 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12870 if(res != 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12871 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12872 uint32_t offset = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12873 REG_PC(mc68kcpu) -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12874 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12875 m68ki_branch_16((mc68kcpu), offset);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12876 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_noexp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12877 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12878 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12879 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12880 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_dbcc_f_exp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12881 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12882 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12883 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12884 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12885
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12887 static void m68k_op_divs_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12888 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12889 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12890 int32_t src = MAKE_INT_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12891 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12892 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12894 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12895 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12896 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12897 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12898 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12899 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12900 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12901 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12902 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12903 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12904 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12906 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12907 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12908
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12909 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12910 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12911 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12912 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12913 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12914 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12915 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12916 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12917 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12918 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12919 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12920 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12921 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12922 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12923
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12925 static void m68k_op_divs_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12926 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12927 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12928 int32_t src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12929 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12930 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12932 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12933 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12934 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12935 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12936 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12937 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12938 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12939 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12940 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12941 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12942 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12944 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12945 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12947 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12948 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12949 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12950 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12951 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12952 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12953 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12954 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12955 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12956 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12957 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12958 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12959 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12960 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12962
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12963 static void m68k_op_divs_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12964 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12965 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12966 int32_t src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12967 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12968 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12970 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12971 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12972 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12973 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12974 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12975 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12976 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12977 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12978 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12979 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12980 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12982 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12983 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12984
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12985 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12986 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12987 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12988 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12989 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12990 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12991 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12992 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12993 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12994 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12995 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12996 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12997 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12998 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13001 static void m68k_op_divs_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13002 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13003 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13004 int32_t src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13005 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13006 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13007
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13008 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13009 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13010 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13011 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13012 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13013 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13014 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13015 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13016 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13017 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13018 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13020 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13021 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13023 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13024 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13025 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13026 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13027 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13028 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13029 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13030 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13031 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13032 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13033 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13034 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13035 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13036 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13037
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13039 static void m68k_op_divs_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13040 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13041 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13042 int32_t src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13043 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13044 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13045
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13046 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13047 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13048 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13049 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13050 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13051 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13052 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13053 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13054 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13055 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13056 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13058 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13059 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13060
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13061 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13062 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13063 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13064 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13065 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13066 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13067 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13068 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13069 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13070 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13071 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13072 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13073 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13074 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13075
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13076
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13077 static void m68k_op_divs_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13078 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13079 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13080 int32_t src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13081 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13082 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13084 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13085 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13086 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13087 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13088 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13089 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13090 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13091 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13092 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13093 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13094 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13095
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13096 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13097 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13099 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13100 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13101 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13102 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13103 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13104 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13105 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13106 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13107 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13108 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13109 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13110 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13111 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13112 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13114
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13115 static void m68k_op_divs_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13116 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13117 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13118 int32_t src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13119 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13120 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13121
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13122 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13123 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13124 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13125 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13126 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13127 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13128 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13129 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13130 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13131 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13132 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13134 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13135 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13136
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13137 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13138 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13139 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13140 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13141 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13142 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13143 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13144 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13145 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13146 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13147 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13148 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13149 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13150 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13151
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13152
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13153 static void m68k_op_divs_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13154 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13155 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13156 int32_t src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13157 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13158 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13159
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13160 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13161 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13162 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13163 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13164 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13165 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13166 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13167 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13168 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13169 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13170 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13171
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13172 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13173 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13175 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13176 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13177 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13178 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13179 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13180 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13181 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13182 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13183 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13184 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13185 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13186 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13187 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13188 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13191 static void m68k_op_divs_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13192 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13193 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13194 int32_t src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13195 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13196 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13198 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13199 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13200 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13201 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13202 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13203 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13204 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13205 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13206 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13207 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13210 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13211 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13212
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13213 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13214 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13215 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13216 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13217 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13218 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13219 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13220 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13221 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13222 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13223 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13224 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13225 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13226 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13229 static void m68k_op_divs_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13230 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13231 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13232 int32_t src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13233 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13234 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13235
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13236 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13237 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13238 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13239 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13240 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13241 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13242 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13243 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13244 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13245 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13246 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13248 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13249 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13251 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13252 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13253 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13254 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13255 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13256 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13257 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13258 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13259 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13260 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13261 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13262 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13263 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13264 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13267 static void m68k_op_divs_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13268 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13269 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13270 int32_t src = MAKE_INT_16(OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13271 int32_t quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13272 int32_t remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13274 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13275 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13276 if((uint32_t)*r_dst == 0x80000000 && src == -1)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13277 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13278 (mc68kcpu)->not_z_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13279 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13280 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13281 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13282 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13283 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13284 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13285
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13286 quotient = MAKE_INT_32(*r_dst) / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13287 remainder = MAKE_INT_32(*r_dst) % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13289 if(quotient == MAKE_INT_16(quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13290 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13291 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13292 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13293 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13294 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13295 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13296 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13297 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13298 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13299 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13300 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13301 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13302 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13303
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13304
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13305 static void m68k_op_divu_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13306 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13307 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13308 uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13310 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13311 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13312 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13313 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13315 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13316 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13317 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13318 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13319 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13320 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13321 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13322 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13323 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13324 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13325 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13326 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13327 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13328 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13331 static void m68k_op_divu_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13332 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13333 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13334 uint32_t src = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13336 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13337 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13338 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13339 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13340
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13341 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13342 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13343 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13344 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13345 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13346 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13347 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13348 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13349 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13350 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13351 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13352 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13353 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13354 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13356
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13357 static void m68k_op_divu_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13358 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13359 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13360 uint32_t src = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13362 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13363 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13364 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13365 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13367 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13369 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13370 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13371 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13372 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13373 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13374 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13375 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13376 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13377 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13378 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13379 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13380 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13383 static void m68k_op_divu_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13384 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13385 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13386 uint32_t src = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13388 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13389 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13390 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13391 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13393 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13394 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13395 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13396 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13397 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13398 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13399 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13400 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13401 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13402 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13403 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13404 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13405 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13406 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13407
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13408
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13409 static void m68k_op_divu_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13410 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13411 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13412 uint32_t src = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13414 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13415 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13416 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13417 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13419 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13420 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13421 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13422 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13423 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13424 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13425 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13426 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13427 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13428 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13429 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13430 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13431 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13432 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13434
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13435 static void m68k_op_divu_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13436 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13437 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13438 uint32_t src = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13440 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13441 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13442 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13443 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13444
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13445 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13446 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13447 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13448 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13449 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13450 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13451 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13452 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13453 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13454 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13455 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13456 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13457 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13458 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13459
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13460
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13461 static void m68k_op_divu_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13462 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13463 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13464 uint32_t src = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13465
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13466 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13467 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13468 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13469 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13471 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13472 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13473 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13474 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13475 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13476 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13477 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13478 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13479 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13480 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13481 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13482 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13483 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13484 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13485
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13486
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13487 static void m68k_op_divu_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13488 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13489 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13490 uint32_t src = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13492 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13493 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13494 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13495 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13497 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13498 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13499 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13500 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13501 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13502 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13503 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13504 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13505 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13506 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13507 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13508 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13509 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13510 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13513 static void m68k_op_divu_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13514 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13515 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13516 uint32_t src = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13518 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13519 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13520 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13521 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13523 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13524 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13525 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13526 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13527 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13528 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13529 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13530 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13531 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13532 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13533 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13534 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13535 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13536 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13539 static void m68k_op_divu_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13540 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13541 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13542 uint32_t src = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13543
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13544 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13545 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13546 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13547 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13549 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13550 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13551 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13552 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13553 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13554 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13555 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13556 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13557 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13558 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13559 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13560 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13561 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13562 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13564
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13565 static void m68k_op_divu_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13566 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13567 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13568 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13570 if(src != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13571 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13572 uint32_t quotient = *r_dst / src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13573 uint32_t remainder = *r_dst % src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13575 if(quotient < 0x10000)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13576 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13577 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13578 (mc68kcpu)->n_flag = NFLAG_16(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13579 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13580 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13581 *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13582 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13583 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13584 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13585 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13586 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13587 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13588 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13591 static void m68k_op_divl_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13592 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13593 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13594 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13595 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13596 uint64_t divisor = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13597 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13598 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13599 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13600
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13601 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13602 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13603 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13604 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13605 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13606 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13607 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13608
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13609 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13610 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13611 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13612 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13613 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13614 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13615 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13616 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13617 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13618 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13619 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13620 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13621 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13622 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13623 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13624 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13625 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13626 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13627 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13628 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13629 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13630 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13631 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13632 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13633 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13634 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13635 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13636 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13637 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13638 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13639 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13640 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13641 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13642 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13643 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13644
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13645 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13646 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13648 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13649 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13650 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13651 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13652 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13653 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13654 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13655 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13656 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13657 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13658 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13660
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13661 static void m68k_op_divl_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13662 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13663 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13664 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13665 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13666 uint64_t divisor = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13667 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13668 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13669 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13671 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13672 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13673 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13674 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13675 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13676 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13677 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13679 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13680 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13681 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13682 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13683 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13684 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13685 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13686 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13687 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13688 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13689 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13690 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13691 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13692 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13693 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13694 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13695 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13696 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13697 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13698 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13699 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13700 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13701 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13702 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13703 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13704 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13705 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13706 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13707 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13708 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13709 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13710 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13711 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13712 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13713 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13715 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13716 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13718 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13719 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13720 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13721 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13722 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13723 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13724 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13725 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13726 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13727 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13728 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13731 static void m68k_op_divl_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13732 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13733 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13734 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13735 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13736 uint64_t divisor = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13737 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13738 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13739 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13740
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13741 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13742 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13743 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13744 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13745 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13746 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13747 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13748
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13749 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13750 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13751 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13752 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13753 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13754 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13755 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13756 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13757 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13758 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13759 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13760 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13761 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13762 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13763 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13764 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13765 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13766 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13767 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13768 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13769 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13770 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13771 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13772 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13773 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13774 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13775 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13776 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13777 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13778 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13779 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13780 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13781 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13782 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13783 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13784
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13785 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13786 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13787
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13788 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13789 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13790 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13791 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13792 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13793 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13794 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13795 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13796 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13797 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13798 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13799
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13800
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13801 static void m68k_op_divl_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13802 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13803 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13804 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13805 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13806 uint64_t divisor = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13807 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13808 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13809 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13810
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13811 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13812 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13813 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13814 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13815 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13816 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13817 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13819 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13820 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13821 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13822 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13823 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13824 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13825 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13826 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13827 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13828 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13829 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13830 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13831 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13832 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13833 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13834 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13835 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13836 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13837 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13838 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13839 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13840 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13841 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13842 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13843 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13844 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13845 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13846 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13847 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13848 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13849 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13850 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13851 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13852 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13853 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13855 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13856 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13857
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13858 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13859 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13860 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13861 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13862 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13863 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13864 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13865 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13866 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13867 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13868 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13870
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13871 static void m68k_op_divl_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13872 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13873 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13874 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13875 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13876 uint64_t divisor = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13877 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13878 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13879 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13880
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13881 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13882 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13883 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13884 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13885 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13886 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13887 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13889 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13890 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13891 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13892 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13893 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13894 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13895 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13896 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13897 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13898 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13899 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13900 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13901 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13902 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13903 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13904 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13905 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13906 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13907 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13908 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13909 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13910 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13911 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13912 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13913 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13914 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13915 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13916 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13917 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13918 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13919 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13920 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13921 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13922 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13923 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13925 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13926 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13927
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13928 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13929 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13930 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13931 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13932 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13933 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13934 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13935 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13936 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13937 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13938 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13940
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13941 static void m68k_op_divl_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13942 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13943 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13944 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13945 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13946 uint64_t divisor = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13947 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13948 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13949 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13950
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13951 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13952 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13953 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13954 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13955 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13956 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13957 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13959 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13960 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13961 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13962 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13963 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13964 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13965 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13966 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13967 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13968 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13969 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13970 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13971 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13972 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13973 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13974 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13975 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13976 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13977 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13978 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13979 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13980 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13981 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13982 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13983 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13984 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13985 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13986 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13987 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13988 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13989 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13990 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13991 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13992 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13993 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13995 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13996 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13998 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13999 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14000 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14001 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14002 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14003 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14004 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14005 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14006 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14007 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14008 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14010
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14011 static void m68k_op_divl_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14012 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14013 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14014 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14015 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14016 uint64_t divisor = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14017 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14018 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14019 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14020
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14021 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14022 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14023 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14024 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14025 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14026 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14027 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14028
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14029 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14030 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14031 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14032 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14033 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14034 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14035 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14036 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14037 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14038 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14039 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14040 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14041 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14042 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14043 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14044 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14045 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14046 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14047 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14048 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14049 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14050 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14051 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14052 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14053 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14054 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14055 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14056 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14057 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14058 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14059 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14060 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14061 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14062 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14063 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14064
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14065 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14066 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14067
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14068 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14069 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14070 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14071 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14072 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14073 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14074 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14075 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14077 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14078 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14079
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14080
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14081 static void m68k_op_divl_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14082 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14083 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14084 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14085 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14086 uint64_t divisor = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14087 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14088 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14089 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14091 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14092 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14093 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14094 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14095 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14096 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14097 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14099 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14100 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14101 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14102 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14103 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14104 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14105 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14106 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14107 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14108 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14109 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14110 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14111 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14112 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14113 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14114 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14115 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14116 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14117 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14118 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14119 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14120 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14121 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14122 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14123 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14125 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14126 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14127 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14128 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14129 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14130 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14131 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14132 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14133 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14135 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14136 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14138 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14139 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14140 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14141 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14142 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14143 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14144 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14145 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14146 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14147 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14148 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14149
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14150
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14151 static void m68k_op_divl_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14152 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14153 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14154 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14155 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14156 uint64_t divisor = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14157 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14158 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14159 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14160
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14161 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14162 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14163 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14165 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14166 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14167 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14169 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14170 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14171 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14172 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14173 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14174 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14175 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14176 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14177 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14178 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14179 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14180 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14181 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14182 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14183 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14184 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14185 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14186 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14187 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14188 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14189 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14190 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14191 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14192 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14193 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14194 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14195 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14196 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14197 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14198 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14199 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14200 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14201 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14202 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14203 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14205 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14206 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14207
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14208 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14209 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14210 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14211 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14212 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14213 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14214 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14215 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14216 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14217 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14218 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14219
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14220
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14221 static void m68k_op_divl_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14222 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14223 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14224 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14225 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14226 uint64_t divisor = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14227 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14228 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14229 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14230
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14231 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14232 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14233 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14234 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14235 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14236 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14237 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14239 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14240 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14241 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14242 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14243 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14244 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14245 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14246 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14247 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14248 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14249 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14250 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14251 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14252 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14253 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14254 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14255 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14256 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14257 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14258 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14259 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14260 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14261 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14262 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14263 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14264 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14265 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14266 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14267 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14268 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14269 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14270 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14271 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14272 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14273 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14275 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14276 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14277
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14278 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14279 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14280 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14281 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14282 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14283 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14284 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14285 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14286 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14287 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14288 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14291 static void m68k_op_divl_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14292 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14293 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14294 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14295 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14296 uint64_t divisor = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14297 uint64_t dividend = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14298 uint64_t quotient = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14299 uint64_t remainder = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14300
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14301 if(divisor != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14302 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14303 if(BIT_A(word2)) /* 64 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14304 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14305 dividend = REG_D(mc68kcpu)[word2 & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14306 dividend <<= 32;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14307 dividend |= REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14309 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14310 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14311 quotient = (uint64_t)((int64_t)dividend / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14312 remainder = (uint64_t)((int64_t)dividend % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14313 if((int64_t)quotient != (int64_t)((int32_t)quotient))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14314 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14315 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14316 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14317 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14318 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14319 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14320 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14321 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14322 if(quotient > 0xffffffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14323 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14324 (mc68kcpu)->v_flag = VFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14325 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14326 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14327 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14328 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14329 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14330 else /* 32 bit */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14331 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14332 dividend = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14333 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14334 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14335 quotient = (uint64_t)((int64_t)((int32_t)dividend) / (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14336 remainder = (uint64_t)((int64_t)((int32_t)dividend) % (int64_t)((int32_t)divisor));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14337 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14338 else /* unsigned */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14339 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14340 quotient = dividend / divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14341 remainder = dividend % divisor;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14342 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14343 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14344
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14345 REG_D(mc68kcpu)[word2 & 7] = remainder;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14346 REG_D(mc68kcpu)[(word2 >> 12) & 7] = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14348 (mc68kcpu)->n_flag = NFLAG_32(quotient);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14349 (mc68kcpu)->not_z_flag = quotient;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14350 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14351 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14352 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14353 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14354 m68ki_exception_trap((mc68kcpu), EXCEPTION_ZERO_DIVIDE);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14355 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14356 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14357 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14358 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14361 static void m68k_op_eor_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14362 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14363 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu) ^= MASK_OUT_ABOVE_8(DX(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14364
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14365 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14366 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14367 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14368 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14369 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14372 static void m68k_op_eor_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14373 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14374 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14375 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14376
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14377 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14379 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14380 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14381 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14382 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14383 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14386 static void m68k_op_eor_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14387 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14388 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14389 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14390
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14391 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14393 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14394 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14395 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14396 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14397 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14400 static void m68k_op_eor_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14401 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14402 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14403 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14405 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14406
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14407 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14408 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14409 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14410 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14411 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14412
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14414 static void m68k_op_eor_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14415 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14416 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14417 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14419 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14420
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14421 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14422 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14423 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14424 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14425 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14428 static void m68k_op_eor_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14429 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14430 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14431 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14433 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14434
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14435 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14436 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14437 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14438 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14439 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14440
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14442 static void m68k_op_eor_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14443 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14444 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14445 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14446
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14447 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14448
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14449 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14450 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14451 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14452 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14453 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14454
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14456 static void m68k_op_eor_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14457 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14458 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14459 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14460
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14461 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14463 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14464 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14465 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14466 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14467 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14468
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14470 static void m68k_op_eor_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14471 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14472 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14473 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14475 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14477 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14478 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14479 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14480 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14481 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14484 static void m68k_op_eor_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14485 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14486 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14487 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) ^ m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14488
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14489 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14491 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14492 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14493 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14494 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14495 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14497
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14498 static void m68k_op_eor_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14499 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14500 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu) ^= MASK_OUT_ABOVE_16(DX(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14502 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14503 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14504 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14505 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14506 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14507
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14508
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14509 static void m68k_op_eor_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14510 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14511 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14512 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14514 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14516 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14517 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14518 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14519 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14520 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14523 static void m68k_op_eor_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14524 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14525 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14526 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14527
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14528 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14529
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14530 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14531 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14532 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14533 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14534 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14537 static void m68k_op_eor_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14538 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14539 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14540 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14542 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14543
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14544 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14545 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14546 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14547 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14548 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14549
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14550
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14551 static void m68k_op_eor_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14552 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14553 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14554 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14555
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14556 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14557
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14558 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14559 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14560 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14561 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14562 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14564
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14565 static void m68k_op_eor_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14566 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14567 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14568 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14570 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14571
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14572 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14573 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14574 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14575 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14576 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14577
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14578
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14579 static void m68k_op_eor_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14580 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14581 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14582 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14583
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14584 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14585
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14586 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14587 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14588 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14589 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14590 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14591
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14592
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14593 static void m68k_op_eor_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14594 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14595 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14596 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) ^ m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14598 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14599
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14600 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14601 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14602 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14603 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14604 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14607 static void m68k_op_eor_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14608 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14609 uint32_t res = DY(mc68kcpu) ^= DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14611 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14612 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14613 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14614 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14615 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14616
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14618 static void m68k_op_eor_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14619 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14620 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14621 uint32_t res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14623 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14625 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14626 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14627 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14628 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14629 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14631
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14632 static void m68k_op_eor_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14633 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14634 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14635 uint32_t res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14637 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14639 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14640 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14641 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14642 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14643 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14644
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14646 static void m68k_op_eor_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14647 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14648 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14649 uint32_t res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14651 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14653 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14654 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14655 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14656 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14657 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14660 static void m68k_op_eor_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14661 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14662 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14663 uint32_t res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14665 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14667 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14668 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14669 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14670 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14671 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14673
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14674 static void m68k_op_eor_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14675 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14676 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14677 uint32_t res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14679 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14681 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14682 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14683 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14684 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14685 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14688 static void m68k_op_eor_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14689 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14690 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14691 uint32_t res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14693 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14694
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14695 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14696 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14697 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14698 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14699 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14702 static void m68k_op_eor_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14703 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14704 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14705 uint32_t res = DX(mc68kcpu) ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14707 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14709 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14710 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14711 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14712 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14713 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14716 static void m68k_op_eori_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14717 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14718 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu) ^= OPER_I_8(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14720 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14721 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14722 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14723 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14727 static void m68k_op_eori_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14728 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14729 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14730 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14731 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14732
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14733 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14735 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14736 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14737 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14738 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14739 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14740
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14741
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14742 static void m68k_op_eori_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14743 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14744 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14745 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14746 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14748 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14750 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14751 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14752 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14753 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14754 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14757 static void m68k_op_eori_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14758 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14759 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14760 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14761 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14763 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14765 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14766 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14767 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14768 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14769 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14771
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14772 static void m68k_op_eori_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14773 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14774 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14775 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14776 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14777
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14778 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14780 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14781 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14782 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14783 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14784 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14786
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14787 static void m68k_op_eori_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14788 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14789 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14790 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14791 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14793 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14794
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14795 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14796 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14797 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14798 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14799 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14800
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14801
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14802 static void m68k_op_eori_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14803 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14804 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14805 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14806 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14807
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14808 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14810 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14811 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14812 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14813 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14814 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14816
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14817 static void m68k_op_eori_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14818 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14819 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14820 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14821 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14822
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14823 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14824
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14825 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14826 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14827 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14828 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14829 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14830
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14831
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14832 static void m68k_op_eori_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14833 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14834 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14835 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14836 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14837
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14838 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14840 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14841 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14842 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14843 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14844 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14847 static void m68k_op_eori_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14848 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14849 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14850 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14851 uint32_t res = src ^ m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14852
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14853 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14855 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14856 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14857 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14858 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14859 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14862 static void m68k_op_eori_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14863 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14864 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu) ^= OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14865
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14866 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14867 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14868 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14869 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14870 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14871
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14872
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14873 static void m68k_op_eori_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14874 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14875 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14876 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14877 uint32_t res = src ^ m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14878
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14879 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14880
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14881 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14882 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14883 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14884 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14885 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14888 static void m68k_op_eori_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14889 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14890 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14891 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14892 uint32_t res = src ^ m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14894 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14896 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14897 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14898 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14899 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14900 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14902
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14903 static void m68k_op_eori_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14904 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14905 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14906 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14907 uint32_t res = src ^ m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14908
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14909 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14911 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14912 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14913 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14914 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14915 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14916
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14918 static void m68k_op_eori_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14919 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14920 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14921 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14922 uint32_t res = src ^ m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14923
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14924 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14926 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14927 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14928 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14929 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14930 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14933 static void m68k_op_eori_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14934 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14935 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14936 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14937 uint32_t res = src ^ m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14939 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14940
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14941 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14942 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14943 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14944 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14945 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14948 static void m68k_op_eori_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14949 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14950 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14951 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14952 uint32_t res = src ^ m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14954 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14955
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14956 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14957 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14958 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14959 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14960 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14962
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14963 static void m68k_op_eori_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14964 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14965 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14966 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14967 uint32_t res = src ^ m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14969 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14970
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14971 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14972 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14973 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14974 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14975 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14977
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14978 static void m68k_op_eori_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14979 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14980 uint32_t res = DY(mc68kcpu) ^= OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14982 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14983 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14984 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14985 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14986 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14988
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14989 static void m68k_op_eori_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14990 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14991 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14992 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14993 uint32_t res = src ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14995 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14996
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14997 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14998 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14999 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15000 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15001 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15002
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15004 static void m68k_op_eori_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15005 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15006 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15007 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15008 uint32_t res = src ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15010 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15011
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15012 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15013 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15014 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15015 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15016 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15017
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15019 static void m68k_op_eori_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15020 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15021 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15022 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15023 uint32_t res = src ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15024
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15025 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15027 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15028 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15029 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15030 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15031 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15032
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15034 static void m68k_op_eori_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15035 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15036 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15037 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15038 uint32_t res = src ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15040 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15042 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15043 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15044 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15045 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15046 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15049 static void m68k_op_eori_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15050 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15051 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15052 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15053 uint32_t res = src ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15054
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15055 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15057 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15058 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15059 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15060 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15061 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15064 static void m68k_op_eori_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15065 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15066 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15067 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15068 uint32_t res = src ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15070 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15072 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15073 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15074 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15075 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15079 static void m68k_op_eori_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15081 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15082 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15083 uint32_t res = src ^ m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15085 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15087 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15088 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15089 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15090 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15091 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15092
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15093
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15094 static void m68k_op_eori_16_toc(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15095 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15096 m68ki_set_ccr((mc68kcpu), m68ki_get_ccr(mc68kcpu) ^ OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15097 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15100 static void m68k_op_eori_16_tos(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15101 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15102 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15103 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15104 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15105 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15106 m68ki_set_sr((mc68kcpu), m68ki_get_sr(mc68kcpu) ^ src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15107 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15108 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15109 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15110 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15113 static void m68k_op_exg_32_dd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15114 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15115 uint32_t* reg_a = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15116 uint32_t* reg_b = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15117 uint32_t tmp = *reg_a;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15118 *reg_a = *reg_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15119 *reg_b = tmp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15120 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15121
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15123 static void m68k_op_exg_32_aa(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15125 uint32_t* reg_a = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15126 uint32_t* reg_b = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15127 uint32_t tmp = *reg_a;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15128 *reg_a = *reg_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15129 *reg_b = tmp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15130 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15132
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15133 static void m68k_op_exg_32_da(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15134 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15135 uint32_t* reg_a = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15136 uint32_t* reg_b = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15137 uint32_t tmp = *reg_a;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15138 *reg_a = *reg_b;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15139 *reg_b = tmp;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15140 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15143 static void m68k_op_ext_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15144 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15145 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15146
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15147 *r_dst = MASK_OUT_BELOW_16(*r_dst) | MASK_OUT_ABOVE_8(*r_dst) | (GET_MSB_8(*r_dst) ? 0xff00 : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15149 (mc68kcpu)->n_flag = NFLAG_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15150 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15151 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15152 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15153 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15154
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15156 static void m68k_op_ext_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15157 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15158 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15159
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15160 *r_dst = MASK_OUT_ABOVE_16(*r_dst) | (GET_MSB_16(*r_dst) ? 0xffff0000 : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15162 (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15163 (mc68kcpu)->not_z_flag = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15164 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15165 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15166 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15169 static void m68k_op_extb_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15170 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15171 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15172 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15173 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15175 *r_dst = MASK_OUT_ABOVE_8(*r_dst) | (GET_MSB_8(*r_dst) ? 0xffffff00 : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15176
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15177 (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15178 (mc68kcpu)->not_z_flag = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15179 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15180 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15181 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15182 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15183 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15184 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15185
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15186
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15187 static void m68k_op_illegal(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15188 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15189 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15190 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15191
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15193 static void m68k_op_jmp_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15194 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15195 m68ki_jump((mc68kcpu), EA_AY_AI_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15196 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15197 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15198 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15199 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15200
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15202 static void m68k_op_jmp_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15203 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15204 m68ki_jump((mc68kcpu), EA_AY_DI_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15205 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15206 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15207 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15211 static void m68k_op_jmp_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15212 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15213 m68ki_jump((mc68kcpu), EA_AY_IX_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15214 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15215 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15216 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15217 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15219
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15220 static void m68k_op_jmp_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15221 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15222 m68ki_jump((mc68kcpu), EA_AW_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15223 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15224 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15225 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15226 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15229 static void m68k_op_jmp_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15230 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15231 m68ki_jump((mc68kcpu), EA_AL_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15232 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15233 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15234 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15235 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15236
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15238 static void m68k_op_jmp_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15239 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15240 m68ki_jump((mc68kcpu), EA_PCDI_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15241 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15242 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15243 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15244 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15247 static void m68k_op_jmp_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15248 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15249 m68ki_jump((mc68kcpu), EA_PCIX_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15250 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15251 if(REG_PC(mc68kcpu) == REG_PPC(mc68kcpu) && (mc68kcpu)->c.current_cycle < (mc68kcpu)->c.target_cycle)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15252 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15253 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15255
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15256 static void m68k_op_jsr_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15257 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15258 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15259 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15260 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15261 m68ki_jump((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15262 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15263
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15265 static void m68k_op_jsr_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15266 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15267 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15268 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15269 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15270 m68ki_jump((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15271 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15272
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15274 static void m68k_op_jsr_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15275 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15276 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15277 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15278 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15279 m68ki_jump((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15280 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15283 static void m68k_op_jsr_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15284 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15285 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15286 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15287 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15288 m68ki_jump((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15289 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15292 static void m68k_op_jsr_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15293 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15294 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15295 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15296 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15297 m68ki_jump((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15298 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15300
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15301 static void m68k_op_jsr_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15302 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15303 uint32_t ea = EA_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15304 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15305 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15306 m68ki_jump((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15307 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15310 static void m68k_op_jsr_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15311 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15312 uint32_t ea = EA_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15313 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15314 m68ki_push_32((mc68kcpu), REG_PC(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15315 m68ki_jump((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15316 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15317
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15318
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15319 static void m68k_op_lea_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15320 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15321 AX(mc68kcpu) = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15322 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15325 static void m68k_op_lea_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15326 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15327 AX(mc68kcpu) = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15328 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15331 static void m68k_op_lea_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15332 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15333 AX(mc68kcpu) = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15334 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15336
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15337 static void m68k_op_lea_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15338 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15339 AX(mc68kcpu) = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15340 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15343 static void m68k_op_lea_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15344 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15345 AX(mc68kcpu) = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15346 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15348
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15349 static void m68k_op_lea_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15350 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15351 AX(mc68kcpu) = EA_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15352 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15353
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15354
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15355 static void m68k_op_lea_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15356 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15357 AX(mc68kcpu) = EA_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15358 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15361 static void m68k_op_link_16_a7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15362 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15363 REG_A(mc68kcpu)[7] -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15364 m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[7], REG_A(mc68kcpu)[7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15365 REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + MAKE_INT_16(OPER_I_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15366 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15367
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15368
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15369 static void m68k_op_link_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15370 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15371 uint32_t* r_dst = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15373 m68ki_push_32((mc68kcpu), *r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15374 *r_dst = REG_A(mc68kcpu)[7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15375 REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + MAKE_INT_16(OPER_I_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15376 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15379 static void m68k_op_link_32_a7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15380 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15381 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15382 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15383 REG_A(mc68kcpu)[7] -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15384 m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[7], REG_A(mc68kcpu)[7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15385 REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + OPER_I_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15386 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15387 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15388 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15389 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15390
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15392 static void m68k_op_link_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15393 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15394 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15395 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15396 uint32_t* r_dst = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15398 m68ki_push_32((mc68kcpu), *r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15399 *r_dst = REG_A(mc68kcpu)[7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15400 REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + OPER_I_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15401 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15402 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15403 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15404 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15406
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15407 static void m68k_op_lsr_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15408 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15409 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15410 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15411 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15412 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15414 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15415 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15417 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15419 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15420 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15421 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15422 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15423 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15424
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15426 static void m68k_op_lsr_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15427 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15428 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15429 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15430 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15431 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15433 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15434 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15436 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15437
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15438 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15439 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15440 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15441 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15442 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15444
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15445 static void m68k_op_lsr_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15446 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15447 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15448 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15449 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15450 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15452 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15453 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15454
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15455 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15457 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15458 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15459 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15460 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15461 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15464 static void m68k_op_lsr_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15465 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15466 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15467 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15468 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15469 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15471 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15472 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15473 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15475 if(shift <= 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15476 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15477 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15478 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15479 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15480 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15481 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15482 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15483 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15484
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15485 *r_dst &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15486 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15487 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15488 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15489 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15490 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15491 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15492 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15493
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15494 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15495 (mc68kcpu)->n_flag = NFLAG_8(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15496 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15497 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15498 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15501 static void m68k_op_lsr_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15502 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15503 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15504 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15505 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15506 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15507
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15508 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15509 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15510 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15512 if(shift <= 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15513 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15514 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15515 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15516 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15517 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15518 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15519 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15520 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15522 *r_dst &= 0xffff0000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15523 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15524 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15525 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15526 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15527 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15528 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15529 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15530
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15531 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15532 (mc68kcpu)->n_flag = NFLAG_16(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15533 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15534 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15535 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15538 static void m68k_op_lsr_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15539 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15540 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15541 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15542 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15543 uint32_t res = src >> shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15544
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15545 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15546 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15547 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15549 if(shift < 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15550 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15551 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15552 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = (src >> (shift - 1))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15553 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15554 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15555 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15556 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15557 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15558
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15559 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15560 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (shift == 32 ? GET_MSB_32(src)>>23 : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15561 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15562 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15563 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15564 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15565 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15566
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15567 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15568 (mc68kcpu)->n_flag = NFLAG_32(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15569 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15570 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15571 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15572
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15574 static void m68k_op_lsr_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15575 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15576 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15577 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15578 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15579
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15580 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15582 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15583 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15584 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15585 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15586 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15589 static void m68k_op_lsr_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15590 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15591 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15592 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15593 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15595 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15597 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15598 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15599 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15600 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15601 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15604 static void m68k_op_lsr_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15605 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15606 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15607 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15608 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15609
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15610 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15612 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15613 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15614 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15615 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15616 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15619 static void m68k_op_lsr_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15620 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15621 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15622 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15623 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15625 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15627 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15628 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15629 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15630 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15631 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15632
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15633
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15634 static void m68k_op_lsr_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15635 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15636 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15637 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15638 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15639
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15640 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15642 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15643 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15644 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15645 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15646 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15648
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15649 static void m68k_op_lsr_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15650 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15651 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15652 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15653 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15655 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15656
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15657 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15658 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15659 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15660 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15661 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15662
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15664 static void m68k_op_lsr_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15665 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15666 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15667 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15668 uint32_t res = src >> 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15669
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15670 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15672 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15673 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15674 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15675 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15679 static void m68k_op_lsl_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15680 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15681 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15682 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15683 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15684 uint32_t res = MASK_OUT_ABOVE_8(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15686 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15687 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15688
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15689 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15691 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15692 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15693 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15694 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15695 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15696
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15697
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15698 static void m68k_op_lsl_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15699 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15700 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15701 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15702 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15703 uint32_t res = MASK_OUT_ABOVE_16(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15704
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15705 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15706 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15708 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15709
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15710 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15711 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15712 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (8-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15713 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15714 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15716
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15717 static void m68k_op_lsl_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15718 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15719 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15720 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15721 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15722 uint32_t res = MASK_OUT_ABOVE_32(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15723
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15724 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15725 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15727 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15729 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15730 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15731 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> (24-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15732 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15733 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15735
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15736 static void m68k_op_lsl_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15737 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15738 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15739 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15740 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15741 uint32_t res = MASK_OUT_ABOVE_8(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15743 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15744 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15745 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15746
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15747 if(shift <= 8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15748 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15749 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15750 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src << shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15751 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15752 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15753 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15754 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15755 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15757 *r_dst &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15758 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15759 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15760 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15761 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15762 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15763 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15764 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15765
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15766 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15767 (mc68kcpu)->n_flag = NFLAG_8(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15768 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15769 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15770 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15771
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15772
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15773 static void m68k_op_lsl_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15774 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15775 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15776 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15777 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15778 uint32_t res = MASK_OUT_ABOVE_16(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15780 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15781 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15782 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15783
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15784 if(shift <= 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15785 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15786 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15787 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src << shift) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15788 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15789 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15790 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15791 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15792 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15793
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15794 *r_dst &= 0xffff0000;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15795 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15796 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15797 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15798 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15799 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15800 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15801 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15802
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15803 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15804 (mc68kcpu)->n_flag = NFLAG_16(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15805 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15806 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15807 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15808
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15810 static void m68k_op_lsl_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15811 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15812 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15813 uint32_t shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15814 uint32_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15815 uint32_t res = MASK_OUT_ABOVE_32(src << shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15816
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15817 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15818 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15819 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15820
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15821 if(shift < 32)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15822 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15823 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15824 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = (src >> (32 - shift)) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15825 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15826 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15827 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15828 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15829 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15830
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15831 *r_dst = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15832 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = ((shift == 32 ? src & 1 : 0))<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15833 (mc68kcpu)->n_flag = NFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15834 (mc68kcpu)->not_z_flag = ZFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15835 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15836 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15837 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15839 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15840 (mc68kcpu)->n_flag = NFLAG_32(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15841 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15842 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15843 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15844
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15846 static void m68k_op_lsl_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15847 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15848 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15849 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15850 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15852 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15854 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15855 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15856 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15857 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15858 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15859
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15861 static void m68k_op_lsl_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15862 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15863 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15864 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15865 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15867 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15869 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15870 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15871 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15872 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15873 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15876 static void m68k_op_lsl_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15877 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15878 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15879 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15880 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15882 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15884 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15885 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15886 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15887 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15888 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15889
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15890
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15891 static void m68k_op_lsl_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15892 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15893 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15894 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15895 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15897 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15898
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15899 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15900 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15901 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15902 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15903 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15904
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15906 static void m68k_op_lsl_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15907 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15908 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15909 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15910 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15912 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15913
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15914 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15915 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15916 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15917 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15918 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15919
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15920
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15921 static void m68k_op_lsl_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15922 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15923 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15924 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15925 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15927 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15928
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15929 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15930 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15931 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15932 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15933 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15934
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15936 static void m68k_op_lsl_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15937 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15938 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15939 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15940 uint32_t res = MASK_OUT_ABOVE_16(src << 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15942 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15944 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15945 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15946 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15947 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15948 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15949
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15950
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15951 static void m68k_op_move_8_d_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15952 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15953 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15954 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15955
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15956 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15958 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15959 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15960 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15961 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15962 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15965 static void m68k_op_move_8_d_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15966 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15967 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15968 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15970 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15971
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15972 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15973 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15974 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15975 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15976 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15977
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15978
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15979 static void m68k_op_move_8_d_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15980 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15981 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15982 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15984 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15985
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15986 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15987 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15988 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15989 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15990 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15991
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15992
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15993 static void m68k_op_move_8_d_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15994 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15995 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15996 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15998 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16000 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16001 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16002 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16003 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16004 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16006
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16007 static void m68k_op_move_8_d_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16008 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16009 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16010 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16011
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16012 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16013
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16014 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16015 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16016 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16017 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16018 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16020
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16021 static void m68k_op_move_8_d_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16022 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16023 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16024 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16025
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16026 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16028 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16029 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16030 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16031 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16032 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16034
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16035 static void m68k_op_move_8_d_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16036 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16037 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16038 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16040 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16042 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16043 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16044 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16045 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16046 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16049 static void m68k_op_move_8_d_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16050 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16051 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16052 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16053
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16054 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16056 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16057 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16058 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16059 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16060 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16061
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16063 static void m68k_op_move_8_d_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16064 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16065 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16066 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16067
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16068 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16070 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16071 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16072 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16073 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16074 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16075
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16076
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16077 static void m68k_op_move_8_d_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16078 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16079 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16080 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16081
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16082 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16084 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16085 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16086 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16087 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16088 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16089
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16091 static void m68k_op_move_8_d_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16092 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16093 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16094 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16095
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16096 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16098 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16099 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16100 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16101 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16102 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16103
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16104
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16105 static void m68k_op_move_8_d_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16106 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16107 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16108 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16109
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16110 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16112 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16113 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16114 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16115 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16116 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16117
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16119 static void m68k_op_move_8_d_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16120 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16121 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16122 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16123
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16124 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16125
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16126 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16127 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16128 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16129 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16130 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16132
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16133 static void m68k_op_move_8_ai_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16134 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16135 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16136 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16138 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16139
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16140 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16141 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16142 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16143 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16144 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16146
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16147 static void m68k_op_move_8_ai_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16148 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16149 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16150 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16151
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16152 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16154 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16155 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16156 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16157 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16158 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16159
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16160
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16161 static void m68k_op_move_8_ai_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16162 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16163 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16164 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16165
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16166 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16168 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16169 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16170 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16171 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16172 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16175 static void m68k_op_move_8_ai_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16176 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16177 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16178 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16180 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16181
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16182 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16183 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16184 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16185 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16186 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16187
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16188
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16189 static void m68k_op_move_8_ai_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16190 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16191 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16192 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16194 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16196 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16197 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16198 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16199 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16200 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16202
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16203 static void m68k_op_move_8_ai_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16204 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16205 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16206 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16207
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16208 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16210 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16211 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16212 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16213 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16214 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16217 static void m68k_op_move_8_ai_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16218 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16219 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16220 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16221
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16222 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16224 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16225 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16226 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16227 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16228 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16229
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16230
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16231 static void m68k_op_move_8_ai_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16232 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16233 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16234 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16235
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16236 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16238 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16239 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16240 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16241 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16242 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16244
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16245 static void m68k_op_move_8_ai_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16246 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16247 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16248 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16250 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16252 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16253 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16254 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16255 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16256 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16257
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16259 static void m68k_op_move_8_ai_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16260 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16261 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16262 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16263
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16264 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16266 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16267 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16268 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16269 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16270 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16271
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16272
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16273 static void m68k_op_move_8_ai_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16274 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16275 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16276 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16277
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16278 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16280 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16281 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16282 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16283 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16284 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16285
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16287 static void m68k_op_move_8_ai_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16288 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16289 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16290 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16292 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16294 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16295 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16296 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16297 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16298 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16300
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16301 static void m68k_op_move_8_ai_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16302 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16303 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16304 uint32_t ea = EA_AX_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16306 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16308 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16309 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16310 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16311 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16312 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16315 static void m68k_op_move_8_pi7_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16316 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16317 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16318 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16319
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16320 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16322 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16323 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16324 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16325 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16326 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16328
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16329 static void m68k_op_move_8_pi_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16330 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16331 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16332 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16333
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16334 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16336 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16337 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16338 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16339 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16340 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16343 static void m68k_op_move_8_pi7_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16344 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16345 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16346 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16348 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16350 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16351 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16352 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16353 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16354 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16356
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16357 static void m68k_op_move_8_pi7_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16358 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16359 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16360 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16362 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16364 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16365 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16366 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16367 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16368 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16369
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16371 static void m68k_op_move_8_pi7_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16372 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16373 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16374 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16375
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16376 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16378 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16379 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16380 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16381 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16382 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16383
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16385 static void m68k_op_move_8_pi7_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16386 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16387 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16388 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16390 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16392 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16393 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16394 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16395 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16396 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16399 static void m68k_op_move_8_pi7_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16400 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16401 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16402 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16404 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16406 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16407 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16408 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16409 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16410 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16412
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16413 static void m68k_op_move_8_pi7_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16414 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16415 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16416 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16418 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16420 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16421 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16422 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16423 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16424 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16427 static void m68k_op_move_8_pi7_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16428 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16429 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16430 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16431
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16432 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16434 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16435 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16436 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16437 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16438 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16440
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16441 static void m68k_op_move_8_pi7_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16442 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16443 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16444 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16445
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16446 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16448 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16449 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16450 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16451 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16452 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16453
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16454
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16455 static void m68k_op_move_8_pi7_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16456 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16457 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16458 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16459
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16460 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16462 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16463 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16464 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16465 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16466 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16468
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16469 static void m68k_op_move_8_pi7_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16470 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16471 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16472 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16473
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16474 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16475
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16476 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16477 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16478 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16479 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16480 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16483 static void m68k_op_move_8_pi7_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16484 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16485 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16486 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16487
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16488 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16490 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16491 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16492 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16493 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16494 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16495
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16497 static void m68k_op_move_8_pi7_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16498 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16499 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16500 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16502 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16504 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16505 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16506 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16507 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16508 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16511 static void m68k_op_move_8_pi_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16512 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16513 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16514 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16516 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16518 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16519 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16520 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16521 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16522 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16523
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16524
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16525 static void m68k_op_move_8_pi_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16526 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16527 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16528 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16529
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16530 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16532 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16533 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16534 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16535 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16536 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16539 static void m68k_op_move_8_pi_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16540 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16541 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16542 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16543
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16544 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16546 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16547 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16548 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16549 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16550 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16551
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16552
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16553 static void m68k_op_move_8_pi_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16554 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16555 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16556 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16557
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16558 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16559
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16560 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16561 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16562 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16563 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16564 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16565
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16566
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16567 static void m68k_op_move_8_pi_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16568 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16569 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16570 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16571
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16572 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16574 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16575 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16576 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16577 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16578 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16579
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16580
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16581 static void m68k_op_move_8_pi_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16582 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16583 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16584 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16585
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16586 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16588 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16589 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16590 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16591 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16592 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16593
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16595 static void m68k_op_move_8_pi_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16596 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16597 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16598 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16599
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16600 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16602 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16603 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16604 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16605 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16606 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16608
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16609 static void m68k_op_move_8_pi_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16610 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16611 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16612 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16613
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16614 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16616 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16617 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16618 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16619 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16620 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16623 static void m68k_op_move_8_pi_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16624 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16625 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16626 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16627
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16628 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16629
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16630 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16631 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16632 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16633 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16634 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16637 static void m68k_op_move_8_pi_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16638 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16639 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16640 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16642 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16644 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16645 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16646 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16647 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16648 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16649
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16651 static void m68k_op_move_8_pi_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16652 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16653 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16654 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16655
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16656 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16658 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16659 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16660 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16661 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16662 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16665 static void m68k_op_move_8_pi_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16666 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16667 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16668 uint32_t ea = EA_AX_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16669
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16670 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16672 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16673 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16674 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16675 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16679 static void m68k_op_move_8_pd7_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16680 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16681 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16682 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16683
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16684 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16686 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16687 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16688 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16689 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16690 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16693 static void m68k_op_move_8_pd_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16694 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16695 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16696 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16697
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16698 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16699
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16700 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16701 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16702 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16703 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16704 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16707 static void m68k_op_move_8_pd7_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16708 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16709 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16710 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16712 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16714 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16715 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16716 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16717 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16718 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16720
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16721 static void m68k_op_move_8_pd7_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16722 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16723 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16724 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16726 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16727
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16728 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16729 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16730 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16731 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16732 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16733
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16735 static void m68k_op_move_8_pd7_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16736 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16737 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16738 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16739
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16740 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16741
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16742 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16743 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16744 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16745 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16746 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16748
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16749 static void m68k_op_move_8_pd7_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16750 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16751 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16752 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16754 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16756 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16757 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16758 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16759 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16760 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16763 static void m68k_op_move_8_pd7_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16764 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16765 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16766 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16767
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16768 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16770 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16771 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16772 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16773 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16774 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16775
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16776
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16777 static void m68k_op_move_8_pd7_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16778 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16779 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16780 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16781
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16782 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16783
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16784 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16785 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16786 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16787 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16788 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16789
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16791 static void m68k_op_move_8_pd7_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16792 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16793 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16794 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16795
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16796 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16798 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16799 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16800 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16801 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16802 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16804
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16805 static void m68k_op_move_8_pd7_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16806 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16807 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16808 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16810 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16812 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16813 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16814 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16815 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16816 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16817
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16819 static void m68k_op_move_8_pd7_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16820 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16821 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16822 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16823
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16824 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16826 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16827 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16828 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16829 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16830 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16831
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16832
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16833 static void m68k_op_move_8_pd7_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16834 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16835 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16836 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16837
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16838 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16840 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16841 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16842 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16843 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16844 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16847 static void m68k_op_move_8_pd7_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16848 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16849 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16850 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16852 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16854 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16855 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16856 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16857 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16858 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16859
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16861 static void m68k_op_move_8_pd7_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16862 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16863 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16864 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16865
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16866 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16868 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16869 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16870 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16871 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16872 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16875 static void m68k_op_move_8_pd_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16876 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16877 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16878 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16880 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16882 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16883 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16884 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16885 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16886 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16889 static void m68k_op_move_8_pd_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16890 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16891 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16892 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16894 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16896 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16897 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16898 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16899 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16900 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16902
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16903 static void m68k_op_move_8_pd_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16904 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16905 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16906 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16907
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16908 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16910 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16911 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16912 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16913 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16914 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16915
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16916
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16917 static void m68k_op_move_8_pd_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16918 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16919 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16920 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16922 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16923
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16924 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16925 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16926 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16927 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16928 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16930
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16931 static void m68k_op_move_8_pd_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16932 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16933 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16934 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16936 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16938 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16939 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16940 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16941 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16942 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16944
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16945 static void m68k_op_move_8_pd_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16946 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16947 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16948 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16949
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16950 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16952 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16953 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16954 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16955 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16956 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16959 static void m68k_op_move_8_pd_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16960 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16961 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16962 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16964 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16966 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16967 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16968 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16969 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16970 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16971
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16972
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16973 static void m68k_op_move_8_pd_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16974 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16975 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16976 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16977
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16978 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16979
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16980 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16981 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16982 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16983 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16984 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16985
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16986
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16987 static void m68k_op_move_8_pd_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16988 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16989 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16990 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16991
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16992 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16994 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16995 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16996 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16997 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16998 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17001 static void m68k_op_move_8_pd_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17002 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17003 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17004 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17006 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17007
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17008 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17009 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17010 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17011 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17012 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17013
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17015 static void m68k_op_move_8_pd_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17016 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17017 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17018 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17020 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17021
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17022 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17023 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17024 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17025 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17026 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17028
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17029 static void m68k_op_move_8_pd_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17030 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17031 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17032 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17034 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17036 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17037 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17038 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17039 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17040 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17043 static void m68k_op_move_8_di_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17044 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17045 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17046 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17048 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17050 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17051 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17052 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17053 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17054 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17057 static void m68k_op_move_8_di_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17058 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17059 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17060 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17061
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17062 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17064 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17065 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17066 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17067 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17068 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17070
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17071 static void m68k_op_move_8_di_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17072 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17073 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17074 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17075
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17076 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17078 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17079 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17080 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17081 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17082 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17085 static void m68k_op_move_8_di_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17086 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17087 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17088 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17089
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17090 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17092 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17093 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17094 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17095 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17096 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17099 static void m68k_op_move_8_di_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17100 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17101 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17102 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17103
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17104 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17106 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17107 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17108 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17109 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17110 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17113 static void m68k_op_move_8_di_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17114 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17115 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17116 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17117
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17118 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17120 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17121 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17122 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17123 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17124 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17125
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17126
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17127 static void m68k_op_move_8_di_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17128 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17129 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17130 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17132 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17134 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17135 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17136 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17137 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17138 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17139
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17140
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17141 static void m68k_op_move_8_di_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17142 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17143 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17144 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17146 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17148 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17149 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17150 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17151 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17152 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17154
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17155 static void m68k_op_move_8_di_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17156 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17157 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17158 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17159
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17160 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17162 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17163 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17164 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17165 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17166 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17169 static void m68k_op_move_8_di_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17170 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17171 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17172 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17174 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17176 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17177 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17178 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17179 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17180 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17181
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17182
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17183 static void m68k_op_move_8_di_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17184 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17185 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17186 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17187
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17188 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17190 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17191 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17192 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17193 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17194 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17196
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17197 static void m68k_op_move_8_di_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17198 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17199 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17200 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17202 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17204 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17205 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17206 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17207 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17211 static void m68k_op_move_8_di_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17212 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17213 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17214 uint32_t ea = EA_AX_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17216 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17218 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17219 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17220 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17221 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17222 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17224
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17225 static void m68k_op_move_8_ix_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17226 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17227 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17228 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17229
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17230 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17232 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17233 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17234 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17235 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17236 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17239 static void m68k_op_move_8_ix_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17240 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17241 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17242 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17244 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17246 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17247 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17248 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17249 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17250 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17252
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17253 static void m68k_op_move_8_ix_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17254 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17255 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17256 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17257
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17258 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17260 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17261 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17262 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17263 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17264 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17267 static void m68k_op_move_8_ix_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17268 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17269 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17270 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17271
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17272 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17274 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17275 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17276 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17277 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17278 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17280
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17281 static void m68k_op_move_8_ix_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17282 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17283 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17284 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17285
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17286 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17288 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17289 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17290 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17291 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17292 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17295 static void m68k_op_move_8_ix_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17296 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17297 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17298 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17300 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17302 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17303 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17304 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17305 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17306 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17309 static void m68k_op_move_8_ix_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17310 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17311 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17312 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17314 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17316 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17317 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17318 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17319 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17320 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17322
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17323 static void m68k_op_move_8_ix_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17324 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17325 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17326 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17328 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17330 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17331 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17332 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17333 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17334 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17336
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17337 static void m68k_op_move_8_ix_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17338 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17339 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17340 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17342 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17344 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17345 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17346 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17347 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17348 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17351 static void m68k_op_move_8_ix_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17352 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17353 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17354 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17356 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17357
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17358 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17359 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17360 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17361 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17362 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17364
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17365 static void m68k_op_move_8_ix_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17366 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17367 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17368 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17369
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17370 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17372 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17373 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17374 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17375 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17376 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17379 static void m68k_op_move_8_ix_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17380 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17381 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17382 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17383
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17384 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17386 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17387 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17388 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17389 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17390 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17393 static void m68k_op_move_8_ix_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17394 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17395 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17396 uint32_t ea = EA_AX_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17398 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17400 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17401 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17402 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17403 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17404 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17406
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17407 static void m68k_op_move_8_aw_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17408 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17409 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17410 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17412 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17414 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17415 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17416 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17417 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17418 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17420
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17421 static void m68k_op_move_8_aw_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17422 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17423 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17424 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17426 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17428 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17429 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17430 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17431 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17432 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17434
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17435 static void m68k_op_move_8_aw_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17436 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17437 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17438 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17440 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17442 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17443 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17444 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17445 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17446 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17448
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17449 static void m68k_op_move_8_aw_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17450 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17451 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17452 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17453
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17454 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17456 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17457 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17458 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17459 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17463 static void m68k_op_move_8_aw_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17464 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17465 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17466 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17468 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17470 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17471 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17472 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17473 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17474 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17475
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17477 static void m68k_op_move_8_aw_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17478 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17479 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17480 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17482 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17484 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17485 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17486 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17487 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17488 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17491 static void m68k_op_move_8_aw_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17492 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17493 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17494 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17495
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17496 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17497
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17498 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17499 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17500 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17501 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17502 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17504
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17505 static void m68k_op_move_8_aw_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17506 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17507 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17508 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17510 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17512 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17513 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17514 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17515 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17516 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17519 static void m68k_op_move_8_aw_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17520 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17521 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17522 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17523
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17524 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17526 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17527 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17528 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17529 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17530 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17532
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17533 static void m68k_op_move_8_aw_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17534 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17535 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17536 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17538 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17539
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17540 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17541 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17542 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17543 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17544 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17547 static void m68k_op_move_8_aw_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17548 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17549 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17550 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17551
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17552 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17554 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17555 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17556 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17557 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17558 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17559
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17561 static void m68k_op_move_8_aw_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17562 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17563 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17564 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17565
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17566 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17567
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17568 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17569 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17570 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17571 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17572 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17575 static void m68k_op_move_8_aw_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17576 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17577 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17578 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17579
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17580 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17582 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17583 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17584 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17585 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17586 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17589 static void m68k_op_move_8_al_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17590 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17591 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17592 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17593
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17594 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17596 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17597 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17598 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17599 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17600 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17603 static void m68k_op_move_8_al_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17604 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17605 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17606 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17608 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17609
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17610 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17611 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17612 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17613 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17614 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17616
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17617 static void m68k_op_move_8_al_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17618 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17619 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17620 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17622 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17623
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17624 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17625 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17626 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17627 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17628 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17629
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17631 static void m68k_op_move_8_al_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17632 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17633 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17634 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17636 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17638 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17639 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17640 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17641 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17642 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17644
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17645 static void m68k_op_move_8_al_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17646 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17647 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17648 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17649
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17650 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17651
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17652 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17653 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17654 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17655 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17656 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17659 static void m68k_op_move_8_al_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17660 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17661 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17662 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17664 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17666 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17667 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17668 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17669 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17670 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17673 static void m68k_op_move_8_al_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17674 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17675 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17676 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17678 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17679
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17680 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17681 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17682 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17683 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17684 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17687 static void m68k_op_move_8_al_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17688 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17689 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17690 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17692 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17694 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17695 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17696 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17697 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17698 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17699
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17701 static void m68k_op_move_8_al_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17702 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17703 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17704 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17706 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17708 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17709 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17710 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17711 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17712 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17715 static void m68k_op_move_8_al_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17716 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17717 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17718 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17720 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17721
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17722 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17723 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17724 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17725 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17726 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17727
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17729 static void m68k_op_move_8_al_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17730 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17731 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17732 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17733
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17734 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17735
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17736 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17737 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17738 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17739 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17740 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17741
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17743 static void m68k_op_move_8_al_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17744 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17745 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17746 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17748 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17750 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17751 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17752 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17753 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17754 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17757 static void m68k_op_move_8_al_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17758 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17759 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17760 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17762 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17763
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17764 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17765 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17766 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17767 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17768 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17771 static void m68k_op_move_16_d_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17772 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17773 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17774 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17775
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17776 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17777
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17778 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17779 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17780 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17781 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17782 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17783
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17784
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17785 static void m68k_op_move_16_d_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17786 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17787 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17788 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17789
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17790 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17792 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17793 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17794 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17795 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17796 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17799 static void m68k_op_move_16_d_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17800 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17801 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17802 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17804 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17805
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17806 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17807 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17808 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17809 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17810 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17812
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17813 static void m68k_op_move_16_d_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17814 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17815 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17816 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17817
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17818 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17819
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17820 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17821 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17822 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17823 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17824 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17827 static void m68k_op_move_16_d_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17828 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17829 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17830 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17831
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17832 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17833
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17834 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17835 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17836 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17837 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17838 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17840
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17841 static void m68k_op_move_16_d_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17842 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17843 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17844 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17846 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17847
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17848 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17849 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17850 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17851 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17852 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17855 static void m68k_op_move_16_d_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17856 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17857 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17858 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17859
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17860 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17862 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17863 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17864 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17865 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17866 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17869 static void m68k_op_move_16_d_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17870 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17871 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17872 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17874 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17876 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17877 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17878 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17879 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17880 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17883 static void m68k_op_move_16_d_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17884 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17885 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17886 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17888 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17889
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17890 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17891 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17892 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17893 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17894 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17897 static void m68k_op_move_16_d_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17898 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17899 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17900 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17902 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17904 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17905 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17906 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17907 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17908 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17911 static void m68k_op_move_16_d_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17912 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17913 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17914 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17915
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17916 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17918 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17919 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17920 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17921 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17922 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17923
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17925 static void m68k_op_move_16_d_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17926 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17927 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17928 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17930 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17932 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17933 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17934 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17935 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17936 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17939 static void m68k_op_move_16_ai_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17940 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17941 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17942 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17944 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17946 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17947 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17948 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17949 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17953 static void m68k_op_move_16_ai_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17954 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17955 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17956 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17958 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17959
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17960 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17961 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17962 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17963 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17964 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17966
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17967 static void m68k_op_move_16_ai_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17968 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17969 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17970 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17971
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17972 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17974 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17975 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17976 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17977 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17978 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17979
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17980
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17981 static void m68k_op_move_16_ai_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17982 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17983 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17984 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17985
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17986 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17988 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17989 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17990 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17991 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17992 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17995 static void m68k_op_move_16_ai_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17996 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17997 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17998 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18000 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18001
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18002 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18003 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18004 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18005 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18006 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18007
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18009 static void m68k_op_move_16_ai_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18010 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18011 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18012 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18013
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18014 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18016 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18017 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18018 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18019 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18020 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18021
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18023 static void m68k_op_move_16_ai_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18024 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18025 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18026 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18028 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18030 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18031 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18032 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18033 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18034 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18037 static void m68k_op_move_16_ai_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18038 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18039 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18040 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18042 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18043
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18044 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18045 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18046 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18047 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18048 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18050
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18051 static void m68k_op_move_16_ai_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18052 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18053 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18054 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18056 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18058 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18059 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18060 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18061 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18062 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18064
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18065 static void m68k_op_move_16_ai_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18066 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18067 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18068 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18070 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18072 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18073 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18074 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18075 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18079 static void m68k_op_move_16_ai_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18081 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18082 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18084 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18086 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18087 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18088 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18089 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18090 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18092
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18093 static void m68k_op_move_16_ai_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18094 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18095 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18096 uint32_t ea = EA_AX_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18098 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18100 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18101 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18102 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18103 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18104 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18106
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18107 static void m68k_op_move_16_pi_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18108 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18109 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18110 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18112 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18114 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18115 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18116 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18117 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18118 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18120
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18121 static void m68k_op_move_16_pi_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18122 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18123 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18124 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18125
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18126 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18128 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18129 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18130 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18131 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18132 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18135 static void m68k_op_move_16_pi_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18136 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18137 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18138 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18139
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18140 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18142 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18143 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18144 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18145 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18146 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18149 static void m68k_op_move_16_pi_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18150 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18151 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18152 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18154 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18156 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18157 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18158 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18159 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18160 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18163 static void m68k_op_move_16_pi_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18165 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18166 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18168 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18169
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18170 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18171 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18172 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18173 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18174 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18176
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18177 static void m68k_op_move_16_pi_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18178 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18179 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18180 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18181
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18182 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18184 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18185 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18186 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18187 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18188 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18191 static void m68k_op_move_16_pi_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18192 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18193 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18194 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18196 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18198 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18199 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18200 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18201 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18202 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18205 static void m68k_op_move_16_pi_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18206 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18207 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18208 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18210 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18212 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18213 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18214 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18215 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18216 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18219 static void m68k_op_move_16_pi_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18220 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18221 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18222 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18224 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18226 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18227 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18228 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18229 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18230 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18233 static void m68k_op_move_16_pi_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18234 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18235 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18236 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18238 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18240 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18241 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18242 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18243 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18244 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18247 static void m68k_op_move_16_pi_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18248 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18249 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18250 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18252 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18254 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18255 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18256 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18257 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18258 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18261 static void m68k_op_move_16_pi_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18262 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18263 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18264 uint32_t ea = EA_AX_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18266 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18267
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18268 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18269 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18270 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18271 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18272 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18275 static void m68k_op_move_16_pd_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18276 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18277 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18278 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18280 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18282 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18283 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18284 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18285 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18286 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18289 static void m68k_op_move_16_pd_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18290 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18291 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18292 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18294 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18295
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18296 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18297 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18298 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18299 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18300 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18302
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18303 static void m68k_op_move_16_pd_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18304 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18305 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18306 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18308 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18310 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18311 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18312 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18313 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18314 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18316
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18317 static void m68k_op_move_16_pd_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18318 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18319 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18320 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18322 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18324 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18325 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18326 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18327 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18328 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18331 static void m68k_op_move_16_pd_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18332 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18333 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18334 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18336 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18338 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18339 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18340 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18341 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18342 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18344
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18345 static void m68k_op_move_16_pd_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18346 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18347 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18348 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18350 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18352 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18353 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18354 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18355 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18356 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18357
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18358
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18359 static void m68k_op_move_16_pd_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18360 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18361 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18362 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18364 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18366 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18367 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18368 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18369 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18370 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18373 static void m68k_op_move_16_pd_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18374 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18375 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18376 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18378 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18380 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18381 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18382 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18383 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18384 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18386
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18387 static void m68k_op_move_16_pd_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18388 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18389 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18390 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18392 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18394 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18395 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18396 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18397 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18398 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18401 static void m68k_op_move_16_pd_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18402 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18403 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18404 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18406 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18407
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18408 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18409 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18410 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18411 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18412 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18414
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18415 static void m68k_op_move_16_pd_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18416 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18417 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18418 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18420 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18422 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18423 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18424 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18425 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18426 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18428
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18429 static void m68k_op_move_16_pd_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18430 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18431 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18432 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18434 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18436 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18437 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18438 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18439 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18440 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18443 static void m68k_op_move_16_di_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18444 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18445 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18446 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18448 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18450 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18451 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18452 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18453 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18454 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18457 static void m68k_op_move_16_di_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18458 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18459 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18460 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18462 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18464 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18465 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18466 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18467 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18468 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18471 static void m68k_op_move_16_di_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18472 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18473 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18474 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18475
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18476 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18477
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18478 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18479 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18480 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18481 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18482 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18484
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18485 static void m68k_op_move_16_di_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18486 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18487 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18488 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18490 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18492 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18493 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18494 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18495 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18496 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18497
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18498
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18499 static void m68k_op_move_16_di_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18500 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18501 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18502 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18504 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18505
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18506 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18507 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18508 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18509 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18510 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18513 static void m68k_op_move_16_di_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18514 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18515 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18516 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18518 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18519
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18520 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18521 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18522 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18523 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18524 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18526
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18527 static void m68k_op_move_16_di_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18528 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18529 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18530 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18532 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18533
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18534 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18535 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18536 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18537 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18538 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18539
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18540
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18541 static void m68k_op_move_16_di_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18542 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18543 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18544 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18546 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18548 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18549 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18550 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18551 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18552 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18555 static void m68k_op_move_16_di_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18556 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18557 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18558 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18559
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18560 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18562 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18563 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18564 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18565 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18566 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18567
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18568
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18569 static void m68k_op_move_16_di_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18570 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18571 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18572 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18574 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18576 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18577 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18578 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18579 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18580 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18583 static void m68k_op_move_16_di_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18584 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18585 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18586 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18588 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18590 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18591 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18592 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18593 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18594 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18597 static void m68k_op_move_16_di_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18598 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18599 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18600 uint32_t ea = EA_AX_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18602 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18604 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18605 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18606 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18607 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18608 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18609
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18611 static void m68k_op_move_16_ix_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18612 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18613 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18614 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18616 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18618 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18619 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18620 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18621 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18622 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18623
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18625 static void m68k_op_move_16_ix_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18626 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18627 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18628 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18629
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18630 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18631
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18632 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18633 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18634 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18635 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18636 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18639 static void m68k_op_move_16_ix_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18640 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18641 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18642 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18644 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18646 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18647 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18648 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18649 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18650 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18651
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18653 static void m68k_op_move_16_ix_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18654 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18655 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18656 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18658 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18660 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18661 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18662 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18663 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18664 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18667 static void m68k_op_move_16_ix_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18668 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18669 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18670 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18672 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18673
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18674 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18675 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18676 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18677 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18678 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18679
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18681 static void m68k_op_move_16_ix_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18682 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18683 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18684 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18686 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18688 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18689 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18690 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18691 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18692 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18694
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18695 static void m68k_op_move_16_ix_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18696 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18697 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18698 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18699
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18700 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18702 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18703 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18704 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18705 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18706 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18709 static void m68k_op_move_16_ix_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18711 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18712 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18714 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18716 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18717 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18718 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18719 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18720 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18721
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18723 static void m68k_op_move_16_ix_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18724 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18725 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18726 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18727
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18728 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18730 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18731 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18732 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18733 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18734 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18735
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18737 static void m68k_op_move_16_ix_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18738 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18739 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18740 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18741
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18742 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18744 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18745 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18746 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18747 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18748 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18751 static void m68k_op_move_16_ix_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18752 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18753 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18754 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18756 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18758 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18759 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18760 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18761 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18762 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18763
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18765 static void m68k_op_move_16_ix_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18766 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18767 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18768 uint32_t ea = EA_AX_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18770 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18771
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18772 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18773 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18774 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18775 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18776 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18777
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18778
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18779 static void m68k_op_move_16_aw_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18780 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18781 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18782 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18783
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18784 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18786 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18787 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18788 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18789 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18790 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18793 static void m68k_op_move_16_aw_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18794 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18795 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18796 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18798 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18799
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18800 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18801 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18802 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18803 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18804 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18805
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18806
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18807 static void m68k_op_move_16_aw_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18808 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18809 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18810 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18812 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18814 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18815 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18816 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18817 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18818 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18819
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18820
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18821 static void m68k_op_move_16_aw_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18822 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18823 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18824 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18826 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18828 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18829 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18830 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18831 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18832 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18833
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18835 static void m68k_op_move_16_aw_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18836 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18837 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18838 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18840 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18841
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18842 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18843 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18844 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18845 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18846 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18847
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18848
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18849 static void m68k_op_move_16_aw_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18850 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18851 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18852 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18854 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18856 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18857 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18858 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18859 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18860 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18863 static void m68k_op_move_16_aw_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18864 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18865 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18866 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18868 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18870 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18871 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18872 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18873 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18874 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18876
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18877 static void m68k_op_move_16_aw_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18878 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18879 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18880 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18882 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18884 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18885 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18886 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18887 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18888 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18889
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18890
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18891 static void m68k_op_move_16_aw_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18892 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18893 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18894 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18896 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18897
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18898 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18899 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18900 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18901 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18902 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18904
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18905 static void m68k_op_move_16_aw_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18906 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18907 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18908 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18910 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18912 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18913 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18914 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18915 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18916 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18918
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18919 static void m68k_op_move_16_aw_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18920 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18921 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18922 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18923
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18924 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18926 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18927 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18928 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18929 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18930 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18933 static void m68k_op_move_16_aw_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18934 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18935 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18936 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18938 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18940 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18941 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18942 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18943 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18944 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18947 static void m68k_op_move_16_al_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18948 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18949 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18950 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18952 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18954 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18955 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18956 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18957 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18958 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18959
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18960
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18961 static void m68k_op_move_16_al_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18962 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18963 uint32_t res = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18964 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18966 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18967
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18968 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18969 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18970 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18971 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18972 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18974
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18975 static void m68k_op_move_16_al_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18976 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18977 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18978 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18979
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18980 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18982 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18983 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18984 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18985 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18986 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18988
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18989 static void m68k_op_move_16_al_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18990 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18991 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18992 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18994 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18995
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18996 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18997 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18998 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18999 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19000 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19001
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19002
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19003 static void m68k_op_move_16_al_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19004 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19005 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19006 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19007
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19008 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19010 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19011 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19012 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19013 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19014 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19016
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19017 static void m68k_op_move_16_al_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19018 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19019 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19020 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19021
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19022 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19024 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19025 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19026 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19027 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19028 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19030
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19031 static void m68k_op_move_16_al_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19032 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19033 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19034 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19036 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19037
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19038 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19039 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19040 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19041 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19042 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19043
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19044
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19045 static void m68k_op_move_16_al_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19046 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19047 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19048 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19050 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19052 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19053 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19054 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19055 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19056 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19058
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19059 static void m68k_op_move_16_al_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19060 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19061 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19062 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19064 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19065
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19066 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19067 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19068 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19069 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19070 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19073 static void m68k_op_move_16_al_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19074 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19075 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19076 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19078 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19079
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19080 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19081 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19082 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19083 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19084 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19087 static void m68k_op_move_16_al_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19088 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19089 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19090 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19092 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19093
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19094 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19095 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19096 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19097 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19098 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19101 static void m68k_op_move_16_al_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19102 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19103 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19104 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19106 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19108 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19109 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19110 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19111 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19112 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19114
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19115 static void m68k_op_move_32_d_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19116 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19117 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19118 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19120 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19121
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19122 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19123 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19124 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19125 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19126 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19128
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19129 static void m68k_op_move_32_d_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19130 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19131 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19132 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19134 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19135
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19136 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19137 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19138 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19139 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19140 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19143 static void m68k_op_move_32_d_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19144 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19145 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19146 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19148 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19149
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19150 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19151 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19152 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19153 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19154 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19157 static void m68k_op_move_32_d_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19158 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19159 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19160 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19162 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19163
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19164 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19165 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19166 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19167 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19168 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19169
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19170
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19171 static void m68k_op_move_32_d_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19172 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19173 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19174 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19176 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19177
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19178 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19179 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19180 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19181 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19182 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19185 static void m68k_op_move_32_d_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19186 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19187 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19188 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19190 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19191
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19192 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19193 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19194 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19195 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19196 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19198
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19199 static void m68k_op_move_32_d_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19200 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19201 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19202 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19204 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19205
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19206 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19207 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19208 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19209 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19210 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19212
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19213 static void m68k_op_move_32_d_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19214 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19215 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19216 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19218 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19219
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19220 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19221 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19222 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19223 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19224 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19226
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19227 static void m68k_op_move_32_d_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19228 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19229 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19230 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19232 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19233
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19234 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19235 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19236 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19237 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19238 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19240
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19241 static void m68k_op_move_32_d_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19242 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19243 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19244 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19246 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19248 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19249 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19250 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19251 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19252 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19255 static void m68k_op_move_32_d_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19256 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19257 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19258 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19260 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19261
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19262 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19263 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19264 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19265 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19266 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19267
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19268
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19269 static void m68k_op_move_32_d_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19270 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19271 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19272 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19274 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19276 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19277 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19278 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19279 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19280 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19283 static void m68k_op_move_32_ai_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19284 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19285 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19286 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19288 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19290 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19291 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19292 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19293 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19294 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19295
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19296
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19297 static void m68k_op_move_32_ai_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19298 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19299 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19300 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19302 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19303
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19304 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19305 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19306 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19307 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19308 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19310
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19311 static void m68k_op_move_32_ai_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19312 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19313 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19314 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19316 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19317
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19318 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19319 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19320 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19321 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19322 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19325 static void m68k_op_move_32_ai_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19326 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19327 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19328 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19330 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19332 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19333 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19334 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19335 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19336 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19338
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19339 static void m68k_op_move_32_ai_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19340 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19341 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19342 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19344 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19345
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19346 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19347 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19348 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19349 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19350 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19352
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19353 static void m68k_op_move_32_ai_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19354 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19355 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19356 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19357
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19358 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19360 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19361 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19362 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19363 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19364 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19367 static void m68k_op_move_32_ai_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19369 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19370 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19372 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19373
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19374 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19375 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19376 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19377 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19378 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19380
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19381 static void m68k_op_move_32_ai_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19382 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19383 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19384 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19386 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19388 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19389 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19390 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19391 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19392 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19395 static void m68k_op_move_32_ai_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19396 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19397 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19398 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19400 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19401
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19402 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19403 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19404 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19405 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19406 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19407
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19408
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19409 static void m68k_op_move_32_ai_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19410 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19411 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19412 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19414 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19415
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19416 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19417 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19418 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19419 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19420 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19423 static void m68k_op_move_32_ai_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19424 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19425 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19426 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19428 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19429
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19430 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19431 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19432 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19433 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19434 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19436
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19437 static void m68k_op_move_32_ai_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19438 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19439 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19440 uint32_t ea = EA_AX_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19442 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19444 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19445 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19446 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19447 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19448 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19451 static void m68k_op_move_32_pi_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19452 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19453 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19454 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19456 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19457
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19458 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19459 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19460 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19461 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19462 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19464
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19465 static void m68k_op_move_32_pi_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19466 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19467 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19468 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19470 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19471
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19472 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19473 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19474 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19475 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19476 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19477
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19478
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19479 static void m68k_op_move_32_pi_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19480 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19481 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19482 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19484 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19485
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19486 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19487 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19488 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19489 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19490 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19493 static void m68k_op_move_32_pi_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19494 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19495 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19496 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19497
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19498 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19500 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19501 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19502 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19503 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19504 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19505
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19507 static void m68k_op_move_32_pi_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19508 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19509 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19510 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19512 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19514 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19515 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19516 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19517 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19518 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19519
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19520
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19521 static void m68k_op_move_32_pi_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19522 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19523 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19524 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19526 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19527
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19528 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19529 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19530 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19531 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19532 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19533
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19534
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19535 static void m68k_op_move_32_pi_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19536 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19537 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19538 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19539
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19540 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19542 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19543 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19544 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19545 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19546 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19549 static void m68k_op_move_32_pi_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19550 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19551 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19552 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19554 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19555
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19556 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19557 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19558 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19559 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19560 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19562
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19563 static void m68k_op_move_32_pi_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19564 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19565 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19566 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19567
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19568 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19570 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19571 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19572 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19573 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19574 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19576
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19577 static void m68k_op_move_32_pi_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19578 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19579 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19580 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19582 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19583
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19584 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19585 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19586 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19587 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19588 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19591 static void m68k_op_move_32_pi_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19592 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19593 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19594 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19596 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19598 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19599 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19600 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19601 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19602 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19604
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19605 static void m68k_op_move_32_pi_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19606 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19607 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19608 uint32_t ea = EA_AX_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19609
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19610 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19612 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19613 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19614 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19615 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19616 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19619 static void m68k_op_move_32_pd_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19620 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19621 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19622 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19623
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19624 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19625 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19627 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19628 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19629 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19630 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19631 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19632
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19633
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19634 static void m68k_op_move_32_pd_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19635 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19636 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19637 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19639 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19640 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19642 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19643 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19644 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19645 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19646 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19648
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19649 static void m68k_op_move_32_pd_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19650 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19651 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19652 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19653
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19654 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19655 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19656
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19657 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19658 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19659 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19660 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19661 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19662
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19664 static void m68k_op_move_32_pd_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19665 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19666 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19667 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19668
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19669 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19670 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19672 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19673 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19674 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19675 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19679 static void m68k_op_move_32_pd_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19680 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19681 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19682 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19683
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19684 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19685 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19687 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19688 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19689 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19690 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19691 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19694 static void m68k_op_move_32_pd_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19695 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19696 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19697 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19698
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19699 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19700 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19702 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19703 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19704 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19705 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19706 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19709 static void m68k_op_move_32_pd_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19711 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19712 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19714 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19715 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19716
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19717 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19718 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19719 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19720 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19721 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19723
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19724 static void m68k_op_move_32_pd_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19725 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19726 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19727 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19729 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19730 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19731
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19732 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19733 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19734 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19735 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19736 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19738
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19739 static void m68k_op_move_32_pd_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19740 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19741 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19742 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19744 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19745 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19746
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19747 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19748 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19749 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19750 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19751 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19752
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19754 static void m68k_op_move_32_pd_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19755 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19756 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19757 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19758
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19759 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19760 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19762 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19763 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19764 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19765 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19766 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19767
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19768
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19769 static void m68k_op_move_32_pd_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19770 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19771 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19772 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19774 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19775 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19776
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19777 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19778 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19779 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19780 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19781 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19783
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19784 static void m68k_op_move_32_pd_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19785 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19786 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19787 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19788
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19789 m68ki_write_16((mc68kcpu), ea+2, res & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19790 m68ki_write_16((mc68kcpu), ea, (res >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19792 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19793 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19794 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19795 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19796 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19799 static void m68k_op_move_32_di_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19800 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19801 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19802 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19804 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19805
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19806 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19807 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19808 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19809 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19810 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19812
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19813 static void m68k_op_move_32_di_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19814 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19815 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19816 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19817
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19818 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19819
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19820 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19821 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19822 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19823 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19824 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19825
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19827 static void m68k_op_move_32_di_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19828 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19829 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19830 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19831
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19832 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19833
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19834 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19835 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19836 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19837 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19838 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19840
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19841 static void m68k_op_move_32_di_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19842 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19843 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19844 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19846 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19847
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19848 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19849 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19850 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19851 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19852 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19855 static void m68k_op_move_32_di_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19856 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19857 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19858 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19859
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19860 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19862 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19863 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19864 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19865 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19866 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19869 static void m68k_op_move_32_di_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19870 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19871 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19872 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19874 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19876 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19877 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19878 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19879 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19880 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19883 static void m68k_op_move_32_di_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19884 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19885 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19886 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19888 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19889
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19890 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19891 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19892 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19893 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19894 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19897 static void m68k_op_move_32_di_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19898 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19899 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19900 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19902 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19904 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19905 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19906 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19907 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19908 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19911 static void m68k_op_move_32_di_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19912 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19913 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19914 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19915
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19916 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19918 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19919 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19920 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19921 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19922 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19923
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19925 static void m68k_op_move_32_di_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19926 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19927 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19928 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19930 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19932 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19933 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19934 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19935 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19936 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19937
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19939 static void m68k_op_move_32_di_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19940 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19941 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19942 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19944 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19946 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19947 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19948 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19949 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19953 static void m68k_op_move_32_di_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19954 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19955 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19956 uint32_t ea = EA_AX_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19958 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19959
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19960 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19961 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19962 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19963 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19964 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19966
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19967 static void m68k_op_move_32_ix_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19968 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19969 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19970 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19971
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19972 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19974 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19975 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19976 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19977 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19978 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19979
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19980
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19981 static void m68k_op_move_32_ix_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19982 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19983 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19984 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19985
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19986 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19988 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19989 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19990 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19991 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19992 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19995 static void m68k_op_move_32_ix_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19996 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19997 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19998 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20000 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20001
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20002 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20003 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20004 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20005 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20006 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20007
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20009 static void m68k_op_move_32_ix_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20010 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20011 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20012 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20013
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20014 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20016 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20017 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20018 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20019 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20020 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20021
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20023 static void m68k_op_move_32_ix_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20024 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20025 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20026 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20028 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20030 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20031 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20032 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20033 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20034 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20037 static void m68k_op_move_32_ix_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20038 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20039 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20040 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20042 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20043
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20044 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20045 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20046 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20047 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20048 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20050
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20051 static void m68k_op_move_32_ix_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20052 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20053 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20054 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20056 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20058 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20059 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20060 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20061 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20062 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20064
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20065 static void m68k_op_move_32_ix_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20066 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20067 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20068 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20070 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20072 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20073 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20074 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20075 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20079 static void m68k_op_move_32_ix_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20081 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20082 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20084 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20086 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20087 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20088 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20089 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20090 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20092
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20093 static void m68k_op_move_32_ix_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20094 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20095 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20096 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20098 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20100 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20101 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20102 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20103 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20104 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20106
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20107 static void m68k_op_move_32_ix_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20108 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20109 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20110 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20112 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20114 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20115 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20116 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20117 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20118 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20120
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20121 static void m68k_op_move_32_ix_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20122 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20123 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20124 uint32_t ea = EA_AX_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20125
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20126 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20128 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20129 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20130 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20131 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20132 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20135 static void m68k_op_move_32_aw_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20136 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20137 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20138 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20139
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20140 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20142 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20143 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20144 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20145 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20146 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20149 static void m68k_op_move_32_aw_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20150 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20151 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20152 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20154 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20156 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20157 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20158 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20159 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20160 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20163 static void m68k_op_move_32_aw_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20165 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20166 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20168 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20169
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20170 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20171 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20172 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20173 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20174 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20176
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20177 static void m68k_op_move_32_aw_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20178 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20179 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20180 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20181
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20182 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20184 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20185 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20186 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20187 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20188 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20191 static void m68k_op_move_32_aw_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20192 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20193 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20194 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20196 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20198 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20199 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20200 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20201 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20202 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20205 static void m68k_op_move_32_aw_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20206 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20207 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20208 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20210 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20212 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20213 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20214 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20215 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20216 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20219 static void m68k_op_move_32_aw_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20220 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20221 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20222 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20224 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20226 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20227 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20228 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20229 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20230 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20233 static void m68k_op_move_32_aw_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20234 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20235 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20236 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20238 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20240 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20241 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20242 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20243 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20244 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20247 static void m68k_op_move_32_aw_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20248 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20249 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20250 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20252 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20254 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20255 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20256 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20257 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20258 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20261 static void m68k_op_move_32_aw_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20262 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20263 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20264 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20266 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20267
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20268 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20269 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20270 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20271 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20272 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20275 static void m68k_op_move_32_aw_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20276 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20277 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20278 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20280 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20282 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20283 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20284 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20285 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20286 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20289 static void m68k_op_move_32_aw_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20290 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20291 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20292 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20294 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20295
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20296 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20297 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20298 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20299 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20300 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20302
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20303 static void m68k_op_move_32_al_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20304 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20305 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20306 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20308 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20310 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20311 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20312 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20313 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20314 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20316
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20317 static void m68k_op_move_32_al_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20318 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20319 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20320 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20322 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20324 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20325 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20326 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20327 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20328 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20331 static void m68k_op_move_32_al_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20332 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20333 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20334 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20336 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20338 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20339 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20340 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20341 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20342 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20344
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20345 static void m68k_op_move_32_al_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20346 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20347 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20348 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20350 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20352 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20353 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20354 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20355 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20356 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20357
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20358
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20359 static void m68k_op_move_32_al_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20360 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20361 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20362 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20364 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20366 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20367 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20368 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20369 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20370 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20373 static void m68k_op_move_32_al_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20374 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20375 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20376 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20378 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20380 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20381 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20382 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20383 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20384 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20386
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20387 static void m68k_op_move_32_al_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20388 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20389 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20390 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20392 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20394 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20395 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20396 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20397 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20398 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20401 static void m68k_op_move_32_al_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20402 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20403 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20404 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20406 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20407
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20408 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20409 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20410 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20411 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20412 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20414
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20415 static void m68k_op_move_32_al_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20416 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20417 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20418 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20420 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20422 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20423 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20424 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20425 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20426 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20428
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20429 static void m68k_op_move_32_al_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20430 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20431 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20432 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20434 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20436 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20437 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20438 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20439 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20440 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20443 static void m68k_op_move_32_al_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20444 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20445 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20446 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20448 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20450 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20451 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20452 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20453 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20454 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20457 static void m68k_op_move_32_al_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20458 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20459 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20460 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20462 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20464 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20465 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20466 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20467 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20468 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20471 static void m68k_op_movea_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20472 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20473 AX(mc68kcpu) = MAKE_INT_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20474 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20475
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20477 static void m68k_op_movea_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20478 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20479 AX(mc68kcpu) = MAKE_INT_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20480 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20483 static void m68k_op_movea_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20484 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20485 AX(mc68kcpu) = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20486 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20487
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20488
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20489 static void m68k_op_movea_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20490 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20491 AX(mc68kcpu) = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20492 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20493
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20495 static void m68k_op_movea_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20496 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20497 AX(mc68kcpu) = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20498 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20501 static void m68k_op_movea_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20502 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20503 AX(mc68kcpu) = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20504 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20505
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20507 static void m68k_op_movea_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20508 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20509 AX(mc68kcpu) = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20510 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20513 static void m68k_op_movea_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20514 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20515 AX(mc68kcpu) = MAKE_INT_16(OPER_AW_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20516 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20519 static void m68k_op_movea_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20520 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20521 AX(mc68kcpu) = MAKE_INT_16(OPER_AL_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20522 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20523
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20524
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20525 static void m68k_op_movea_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20526 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20527 AX(mc68kcpu) = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20528 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20529
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20530
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20531 static void m68k_op_movea_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20532 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20533 AX(mc68kcpu) = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20534 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20537 static void m68k_op_movea_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20538 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20539 AX(mc68kcpu) = MAKE_INT_16(OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20540 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20543 static void m68k_op_movea_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20544 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20545 AX(mc68kcpu) = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20546 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20549 static void m68k_op_movea_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20550 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20551 AX(mc68kcpu) = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20552 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20555 static void m68k_op_movea_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20556 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20557 AX(mc68kcpu) = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20558 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20559
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20561 static void m68k_op_movea_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20562 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20563 AX(mc68kcpu) = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20564 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20565
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20566
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20567 static void m68k_op_movea_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20568 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20569 AX(mc68kcpu) = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20570 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20571
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20572
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20573 static void m68k_op_movea_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20574 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20575 AX(mc68kcpu) = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20576 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20577
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20578
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20579 static void m68k_op_movea_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20580 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20581 AX(mc68kcpu) = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20582 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20583
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20584
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20585 static void m68k_op_movea_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20586 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20587 AX(mc68kcpu) = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20588 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20591 static void m68k_op_movea_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20592 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20593 AX(mc68kcpu) = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20594 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20597 static void m68k_op_movea_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20598 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20599 AX(mc68kcpu) = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20600 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20603 static void m68k_op_movea_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20604 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20605 AX(mc68kcpu) = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20606 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20608
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20609 static void m68k_op_movea_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20610 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20611 AX(mc68kcpu) = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20612 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20613
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20614
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20615 static void m68k_op_move_16_frc_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20616 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20617 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20618 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20619 DY(mc68kcpu) = MASK_OUT_BELOW_16(DY(mc68kcpu)) | m68ki_get_ccr(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20620 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20621 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20622 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20623 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20625
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20626 static void m68k_op_move_16_frc_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20627 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20628 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20629 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20630 m68ki_write_16((mc68kcpu), EA_AY_AI_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20631 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20632 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20633 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20634 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20637 static void m68k_op_move_16_frc_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20638 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20639 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20640 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20641 m68ki_write_16((mc68kcpu), EA_AY_PI_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20642 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20643 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20644 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20645 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20646
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20648 static void m68k_op_move_16_frc_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20649 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20650 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20651 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20652 m68ki_write_16((mc68kcpu), EA_AY_PD_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20653 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20654 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20655 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20656 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20659 static void m68k_op_move_16_frc_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20660 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20661 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20662 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20663 m68ki_write_16((mc68kcpu), EA_AY_DI_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20664 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20665 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20666 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20667 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20668
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20669
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20670 static void m68k_op_move_16_frc_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20671 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20672 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20673 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20674 m68ki_write_16((mc68kcpu), EA_AY_IX_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20675 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20677 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20678 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20679
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20681 static void m68k_op_move_16_frc_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20682 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20683 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20684 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20685 m68ki_write_16((mc68kcpu), EA_AW_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20686 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20687 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20688 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20689 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20692 static void m68k_op_move_16_frc_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20693 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20694 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20695 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20696 m68ki_write_16((mc68kcpu), EA_AL_16(mc68kcpu), m68ki_get_ccr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20697 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20698 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20699 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20700 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20702
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20703 static void m68k_op_move_16_toc_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20704 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20705 m68ki_set_ccr((mc68kcpu), DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20706 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20709 static void m68k_op_move_16_toc_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20711 m68ki_set_ccr((mc68kcpu), OPER_AY_AI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20712 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20715 static void m68k_op_move_16_toc_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20716 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20717 m68ki_set_ccr((mc68kcpu), OPER_AY_PI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20718 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20720
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20721 static void m68k_op_move_16_toc_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20722 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20723 m68ki_set_ccr((mc68kcpu), OPER_AY_PD_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20727 static void m68k_op_move_16_toc_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20728 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20729 m68ki_set_ccr((mc68kcpu), OPER_AY_DI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20730 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20731
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20732
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20733 static void m68k_op_move_16_toc_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20734 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20735 m68ki_set_ccr((mc68kcpu), OPER_AY_IX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20736 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20738
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20739 static void m68k_op_move_16_toc_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20740 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20741 m68ki_set_ccr((mc68kcpu), OPER_AW_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20742 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20744
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20745 static void m68k_op_move_16_toc_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20746 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20747 m68ki_set_ccr((mc68kcpu), OPER_AL_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20748 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20751 static void m68k_op_move_16_toc_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20752 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20753 m68ki_set_ccr((mc68kcpu), OPER_PCDI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20754 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20757 static void m68k_op_move_16_toc_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20758 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20759 m68ki_set_ccr((mc68kcpu), OPER_PCIX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20760 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20763 static void m68k_op_move_16_toc_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20764 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20765 m68ki_set_ccr((mc68kcpu), OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20766 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20767
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20768
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20769 static void m68k_op_move_16_frs_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20770 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20771 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20772 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20773 DY(mc68kcpu) = MASK_OUT_BELOW_16(DY(mc68kcpu)) | m68ki_get_sr(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20774 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20775 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20776 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20777 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20778
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20780 static void m68k_op_move_16_frs_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20781 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20782 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20783 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20784 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20785 m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20786 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20787 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20788 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20789 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20792 static void m68k_op_move_16_frs_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20793 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20794 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20795 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20796 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20797 m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20798 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20799 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20800 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20801 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20802
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20804 static void m68k_op_move_16_frs_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20805 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20806 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20807 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20808 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20809 m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20810 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20811 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20812 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20813 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20816 static void m68k_op_move_16_frs_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20817 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20818 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20819 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20820 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20821 m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20822 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20823 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20824 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20825 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20828 static void m68k_op_move_16_frs_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20829 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20830 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20831 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20832 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20833 m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20834 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20835 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20836 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20837 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20840 static void m68k_op_move_16_frs_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20841 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20842 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20843 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20844 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20845 m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20846 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20847 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20848 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20849 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20850
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20852 static void m68k_op_move_16_frs_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20853 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20854 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type) || (mc68kcpu)->s_flag) /* NS990408 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20855 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20856 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20857 m68ki_write_16((mc68kcpu), ea, m68ki_get_sr(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20858 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20859 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20860 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20861 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20863
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20864 static void m68k_op_move_16_tos_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20865 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20866 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20867 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20868 m68ki_set_sr((mc68kcpu), DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20869 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20870 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20871 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20872 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20875 static void m68k_op_move_16_tos_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20876 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20877 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20878 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20879 uint32_t new_sr = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20880 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20881 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20882 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20883 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20884 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20885 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20888 static void m68k_op_move_16_tos_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20889 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20890 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20891 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20892 uint32_t new_sr = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20893 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20894 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20895 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20896 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20897 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20898 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20900
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20901 static void m68k_op_move_16_tos_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20902 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20903 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20904 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20905 uint32_t new_sr = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20906 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20907 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20908 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20909 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20910 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20911 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20912
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20913
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20914 static void m68k_op_move_16_tos_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20915 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20916 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20917 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20918 uint32_t new_sr = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20919 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20920 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20921 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20922 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20923 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20924 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20927 static void m68k_op_move_16_tos_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20928 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20929 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20930 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20931 uint32_t new_sr = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20932 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20933 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20934 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20935 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20936 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20937 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20940 static void m68k_op_move_16_tos_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20941 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20942 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20943 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20944 uint32_t new_sr = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20945 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20946 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20947 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20948 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20949 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20953 static void m68k_op_move_16_tos_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20954 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20955 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20956 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20957 uint32_t new_sr = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20958 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20959 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20960 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20961 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20962 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20963 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20966 static void m68k_op_move_16_tos_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20967 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20968 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20969 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20970 uint32_t new_sr = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20971 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20972 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20973 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20974 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20975 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20976 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20977
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20978
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20979 static void m68k_op_move_16_tos_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20980 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20981 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20982 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20983 uint32_t new_sr = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20984 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20985 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20986 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20987 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20988 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20989 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20991
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20992 static void m68k_op_move_16_tos_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20993 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20994 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20995 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20996 uint32_t new_sr = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20997 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20998 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20999 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21000 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21001 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21002 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21004
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21005 static void m68k_op_move_32_fru(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21006 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21007 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21008 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21009 AY(mc68kcpu) = REG_USP(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21010 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21011 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21012 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21013 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21016 static void m68k_op_move_32_tou(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21017 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21018 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21019 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21020 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21021 REG_USP(mc68kcpu) = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21022 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21023 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21024 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21025 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21028 static void m68k_op_movec_32_cr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21029 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21030 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21031 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21032
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21034 static void m68k_op_movec_32_rc(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21035 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21036 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21037 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21040 static void m68k_op_movem_16_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21041 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21042 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21043 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21044 uint32_t ea = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21045 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21047 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21048 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21049 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21050 ea -= 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21051 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[15-i]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21052 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21053 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21054 AY(mc68kcpu) = ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21056 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21057 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21058
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21060 static void m68k_op_movem_16_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21061 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21062 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21063 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21064 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21065 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21066
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21067 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21068 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21069 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21070 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21071 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21072 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21073 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21075 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21079 static void m68k_op_movem_16_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21081 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21082 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21083 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21084 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21086 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21087 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21088 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21089 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21090 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21091 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21092 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21093
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21094 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21095 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21096
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21098 static void m68k_op_movem_16_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21099 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21100 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21101 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21102 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21103 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21104
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21105 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21106 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21107 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21108 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21109 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21110 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21111 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21113 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21114 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21115
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21116
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21117 static void m68k_op_movem_16_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21118 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21119 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21120 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21121 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21122 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21123
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21124 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21125 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21126 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21127 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21128 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21129 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21130 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21132 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21133 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21135
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21136 static void m68k_op_movem_16_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21137 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21138 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21139 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21140 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21141 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21143 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21144 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21145 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21146 m68ki_write_16((mc68kcpu), ea, MASK_OUT_ABOVE_16(REG_DA(mc68kcpu)[i]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21147 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21148 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21149 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21150
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21151 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21152 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21154
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21155 static void m68k_op_movem_32_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21156 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21157 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21158 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21159 uint32_t ea = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21160 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21162 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21163 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21165 ea -= 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21166 m68ki_write_16((mc68kcpu), ea+2, REG_DA(mc68kcpu)[15-i] & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21167 m68ki_write_16((mc68kcpu), ea, (REG_DA(mc68kcpu)[15-i] >> 16) & 0xFFFF );
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21168 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21169 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21170 AY(mc68kcpu) = ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21171
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21172 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21173 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21176 static void m68k_op_movem_32_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21177 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21178 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21179 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21180 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21181 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21182
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21183 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21184 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21185 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21186 m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21187 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21188 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21189 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21191 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21192 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21194
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21195 static void m68k_op_movem_32_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21196 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21197 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21198 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21199 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21200 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21202 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21203 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21204 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21205 m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21206 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21207 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21210 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21211 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21212
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21213
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21214 static void m68k_op_movem_32_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21215 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21216 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21217 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21218 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21219 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21220
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21221 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21222 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21223 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21224 m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21225 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21226 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21227 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21229 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21230 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21233 static void m68k_op_movem_32_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21234 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21235 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21236 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21237 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21238 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21240 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21241 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21242 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21243 m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21244 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21245 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21246 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21248 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21249 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21252 static void m68k_op_movem_32_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21253 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21254 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21255 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21256 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21257 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21259 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21260 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21261 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21262 m68ki_write_32((mc68kcpu), ea, REG_DA(mc68kcpu)[i]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21263 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21264 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21265 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21267 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21268 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21269
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21270
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21271 static void m68k_op_movem_16_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21272 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21273 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21274 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21275 uint32_t ea = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21276 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21277
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21278 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21279 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21280 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21281 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21282 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21283 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21284 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21285 AY(mc68kcpu) = ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21287 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21288 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21291 static void m68k_op_movem_16_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21292 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21293 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21294 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21295 uint32_t ea = EA_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21296 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21298 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21299 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21300 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21301 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21302 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21303 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21304 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21306 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21307 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21310 static void m68k_op_movem_16_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21311 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21312 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21313 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21314 uint32_t ea = EA_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21315 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21316
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21317 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21318 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21319 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21320 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21321 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21322 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21323 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21325 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21326 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21328
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21329 static void m68k_op_movem_16_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21330 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21331 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21332 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21333 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21334 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21336 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21337 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21338 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21339 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21340 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21341 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21342 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21344 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21345 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21346
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21348 static void m68k_op_movem_16_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21349 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21350 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21351 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21352 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21353 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21354
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21355 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21356 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21357 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21358 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21359 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21360 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21361 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21362
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21363 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21364 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21367 static void m68k_op_movem_16_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21369 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21370 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21371 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21372 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21373
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21374 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21375 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21376 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21377 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21378 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21379 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21380 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21382 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21383 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21385
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21386 static void m68k_op_movem_16_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21387 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21388 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21389 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21390 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21391 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21393 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21394 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21395 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21396 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21397 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21398 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21399 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21401 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21402 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21405 static void m68k_op_movem_16_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21406 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21407 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21408 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21409 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21410 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21412 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21413 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21414 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21415 REG_DA(mc68kcpu)[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16((mc68kcpu), ea)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21416 ea += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21417 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21418 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21420 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_w) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21421 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21423
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21424 static void m68k_op_movem_32_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21425 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21426 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21427 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21428 uint32_t ea = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21429 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21431 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21432 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21433 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21434 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21435 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21436 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21437 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21438 AY(mc68kcpu) = ea;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21440 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21441 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21444 static void m68k_op_movem_32_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21445 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21446 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21447 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21448 uint32_t ea = EA_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21449 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21451 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21452 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21453 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21454 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21455 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21456 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21457 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21458
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21459 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21463 static void m68k_op_movem_32_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21464 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21465 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21466 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21467 uint32_t ea = EA_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21468 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21470 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21471 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21472 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21473 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21474 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21475 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21476 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21477
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21478 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21479 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21480
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21482 static void m68k_op_movem_32_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21483 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21484 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21485 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21486 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21487 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21488
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21489 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21490 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21491 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21492 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21493 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21494 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21495 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21497 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21498 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21501 static void m68k_op_movem_32_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21502 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21503 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21504 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21505 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21506 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21507
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21508 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21509 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21510 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21511 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21512 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21513 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21514 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21516 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21517 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21519
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21520 static void m68k_op_movem_32_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21521 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21522 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21523 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21524 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21525 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21526
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21527 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21528 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21529 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21530 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21531 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21532 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21534
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21535 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21536 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21539 static void m68k_op_movem_32_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21540 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21541 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21542 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21543 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21544 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21546 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21547 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21548 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21549 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21550 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21551 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21552 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21554 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21555 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21556
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21557
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21558 static void m68k_op_movem_32_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21559 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21560 uint32_t i = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21561 uint32_t register_list = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21562 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21563 uint32_t count = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21564
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21565 for(; i < 16; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21566 if(register_list & (1 << i))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21567 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21568 REG_DA(mc68kcpu)[i] = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21569 ea += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21570 count++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21571 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21572
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21573 (mc68kcpu)->c.current_cycle += (count<<(mc68kcpu)->cyc_movem_l) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21574 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21576
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21577 static void m68k_op_movep_16_re(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21578 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21579 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21580 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21582 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(src >> 8));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21583 m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21584 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21585
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21587 static void m68k_op_movep_32_re(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21588 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21589 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21590 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21591
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21592 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(src >> 24));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21593 m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src >> 16));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21594 m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src >> 8));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21595 m68ki_write_8((mc68kcpu), ea += 2, MASK_OUT_ABOVE_8(src));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21596 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21598
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21599 static void m68k_op_movep_16_er(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21600 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21601 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21602 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21604 *r_dst = MASK_OUT_BELOW_16(*r_dst) | ((m68ki_read_8((mc68kcpu), ea) << 8) + m68ki_read_8((mc68kcpu), ea + 2));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21605 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21608 static void m68k_op_movep_32_er(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21609 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21610 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21612 DX(mc68kcpu) = (m68ki_read_8((mc68kcpu), ea) << 24) + (m68ki_read_8((mc68kcpu), ea + 2) << 16)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21613 + (m68ki_read_8((mc68kcpu), ea + 4) << 8) + m68ki_read_8((mc68kcpu), ea + 6);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21614 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21616
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21617 static void m68k_op_moves_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21618 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21619 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21620 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21623 static void m68k_op_moves_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21624 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21625 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21626 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21627
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21628
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21629 static void m68k_op_moves_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21630 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21631 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21632 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21633
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21634
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21635 static void m68k_op_moves_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21636 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21637 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21638 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21639
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21640
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21641 static void m68k_op_moves_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21642 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21643 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21644 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21646
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21647 static void m68k_op_moves_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21648 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21649 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21650 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21651
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21653 static void m68k_op_moves_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21654 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21655 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21656 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21659 static void m68k_op_moves_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21660 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21661 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21662 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21665 static void m68k_op_moves_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21666 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21667 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21668 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21669
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21671 static void m68k_op_moves_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21672 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21673 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21674 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21675
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21676
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21677 static void m68k_op_moves_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21678 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21679 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21680 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21681
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21682
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21683 static void m68k_op_moves_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21684 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21685 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21686 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21688
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21689 static void m68k_op_moves_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21690 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21691 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21692 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21694
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21695 static void m68k_op_moves_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21696 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21697 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21698 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21699
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21701 static void m68k_op_moves_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21702 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21703 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21704 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21707 static void m68k_op_moves_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21708 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21709 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21710 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21712
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21713 static void m68k_op_moves_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21714 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21715 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21716 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21719 static void m68k_op_moves_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21720 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21721 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21722 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21723
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21724
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21725 static void m68k_op_moves_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21726 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21727 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21728 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21731 static void m68k_op_moves_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21732 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21733 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21734 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21735
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21737 static void m68k_op_moves_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21738 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21739 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21740 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21741
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21743 static void m68k_op_moves_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21744 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21745 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21746 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21748
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21749 static void m68k_op_moves_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21750 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21751 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21752 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21754
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21755 static void m68k_op_moveq_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21756 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21757 uint32_t res = DX(mc68kcpu) = MAKE_INT_8(MASK_OUT_ABOVE_8((mc68kcpu)->ir));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21758
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21759 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21760 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21761 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21762 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21763 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21765
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21766 static void m68k_op_move16_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21767 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21768 uint16_t w2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21769 int ax = (mc68kcpu)->ir & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21770 int ay = (w2 >> 12) & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21771 m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay], m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21772 m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay]+4, m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]+4));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21773 m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay]+8, m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]+8));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21774 m68ki_write_32((mc68kcpu), REG_A(mc68kcpu)[ay]+12, m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[ax]+12));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21775
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21776 REG_A(mc68kcpu)[ax] += 16;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21777 REG_A(mc68kcpu)[ay] += 16;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21778 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21781 static void m68k_op_muls_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21782 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21783 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21784 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(DY(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21786 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21787
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21788 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21789 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21790 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21791 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21792 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21793
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21794
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21795 static void m68k_op_muls_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21796 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21797 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21798 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_AI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21799
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21800 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21801
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21802 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21803 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21804 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21805 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21806 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21807
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21808
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21809 static void m68k_op_muls_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21810 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21811 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21812 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_PI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21814 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21816 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21817 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21818 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21819 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21820 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21821
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21822
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21823 static void m68k_op_muls_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21824 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21825 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21826 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_PD_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21828 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21829
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21830 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21831 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21832 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21833 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21834 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21836
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21837 static void m68k_op_muls_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21838 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21839 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21840 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_DI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21841
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21842 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21843
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21844 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21845 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21846 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21847 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21848 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21850
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21851 static void m68k_op_muls_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21852 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21853 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21854 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_IX_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21856 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21857
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21858 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21859 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21860 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21861 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21862 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21863
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21864
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21865 static void m68k_op_muls_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21866 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21867 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21868 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AW_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21870 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21871
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21872 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21873 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21874 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21875 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21876 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21877
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21878
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21879 static void m68k_op_muls_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21880 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21881 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21882 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AL_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21884 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21885
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21886 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21887 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21888 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21889 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21890 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21891
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21892
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21893 static void m68k_op_muls_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21894 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21895 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21896 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_PCDI_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21897
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21898 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21900 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21901 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21902 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21903 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21904 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21906
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21907 static void m68k_op_muls_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21908 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21909 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21910 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_PCIX_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21912 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21913
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21914 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21915 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21916 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21917 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21918 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21919
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21920
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21921 static void m68k_op_muls_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21922 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21923 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21924 uint32_t res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_I_16(mc68kcpu)) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21926 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21927
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21928 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21929 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21930 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21931 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21932 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21933
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21934
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21935 static void m68k_op_mulu_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21936 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21937 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21938 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu)) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21940 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21942 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21943 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21944 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21945 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21946 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21948
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21949 static void m68k_op_mulu_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21950 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21951 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21952 uint32_t res = OPER_AY_AI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21954 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21955
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21956 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21957 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21958 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21959 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21960 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21962
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21963 static void m68k_op_mulu_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21964 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21965 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21966 uint32_t res = OPER_AY_PI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21967
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21968 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21970 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21971 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21972 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21973 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21974 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21975
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21977 static void m68k_op_mulu_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21978 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21979 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21980 uint32_t res = OPER_AY_PD_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21982 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21984 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21985 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21986 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21987 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21988 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21991 static void m68k_op_mulu_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21992 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21993 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21994 uint32_t res = OPER_AY_DI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21995
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21996 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21998 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21999 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22000 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22001 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22002 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22004
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22005 static void m68k_op_mulu_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22006 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22007 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22008 uint32_t res = OPER_AY_IX_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22010 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22011
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22012 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22013 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22014 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22015 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22016 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22017
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22019 static void m68k_op_mulu_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22020 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22021 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22022 uint32_t res = OPER_AW_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22024 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22025
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22026 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22027 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22028 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22029 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22030 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22031
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22032
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22033 static void m68k_op_mulu_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22034 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22035 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22036 uint32_t res = OPER_AL_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22037
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22038 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22040 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22041 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22042 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22043 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22044 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22045
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22047 static void m68k_op_mulu_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22048 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22049 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22050 uint32_t res = OPER_PCDI_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22052 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22053
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22054 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22055 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22056 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22057 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22058 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22060
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22061 static void m68k_op_mulu_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22062 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22063 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22064 uint32_t res = OPER_PCIX_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22065
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22066 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22067
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22068 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22069 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22070 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22071 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22072 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22073
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22075 static void m68k_op_mulu_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22076 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22077 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22078 uint32_t res = OPER_I_16(mc68kcpu) * MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22079
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22080 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22081
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22082 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22083 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22084 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22085 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22086 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22087
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22088
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22089 static void m68k_op_mull_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22090 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22091 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22092 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22093 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22094 uint64_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22095 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22096 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22098 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22100 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22101 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22102 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22103 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22104 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22105 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22106 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22107 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22108 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22109 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22110 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22111 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22112 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22113 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22114 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22115 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22116 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22117 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22119 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22120 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22121 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22122 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22123 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22124 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22125 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22126 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22127 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22128 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22129 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22130 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22131 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22132 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22133 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22134 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22135 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22136 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22139 static void m68k_op_mull_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22140 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22141 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22142 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22143 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22144 uint64_t src = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22145 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22146 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22148 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22149
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22150 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22151 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22152 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22153 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22154 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22155 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22156 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22157 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22158 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22159 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22160 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22161 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22162 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22163 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22164 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22165 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22166 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22167 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22169 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22170 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22171 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22172 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22173 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22174 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22175 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22176 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22177 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22178 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22179 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22180 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22181 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22182 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22183 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22184 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22185 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22186 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22187
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22188
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22189 static void m68k_op_mull_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22190 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22191 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22192 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22193 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22194 uint64_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22195 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22196 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22198 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22200 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22201 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22202 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22203 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22204 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22205 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22206 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22207 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22208 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22209 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22210 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22211 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22212 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22213 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22214 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22215 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22216 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22217 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22219 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22220 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22221 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22222 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22223 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22224 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22225 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22226 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22227 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22228 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22229 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22230 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22231 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22232 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22233 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22234 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22235 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22236 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22239 static void m68k_op_mull_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22240 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22241 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22242 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22243 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22244 uint64_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22245 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22246 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22248 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22250 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22251 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22252 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22253 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22254 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22255 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22256 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22257 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22258 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22259 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22260 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22261 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22262 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22263 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22264 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22265 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22266 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22267 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22268
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22269 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22270 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22271 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22272 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22273 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22274 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22275 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22276 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22277 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22278 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22279 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22280 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22281 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22282 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22283 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22284 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22285 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22286 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22289 static void m68k_op_mull_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22290 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22291 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22292 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22293 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22294 uint64_t src = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22295 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22296 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22298 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22300 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22301 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22302 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22303 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22304 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22305 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22306 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22307 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22308 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22309 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22310 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22311 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22312 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22313 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22314 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22315 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22316 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22317 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22318
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22319 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22320 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22321 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22322 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22323 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22324 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22325 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22326 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22327 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22328 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22329 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22330 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22331 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22332 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22333 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22334 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22335 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22336 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22338
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22339 static void m68k_op_mull_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22340 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22341 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22342 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22343 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22344 uint64_t src = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22345 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22346 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22348 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22350 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22351 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22352 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22353 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22354 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22355 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22356 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22357 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22358 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22359 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22360 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22361 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22362 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22363 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22364 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22365 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22366 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22367 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22368
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22369 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22370 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22371 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22372 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22373 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22374 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22375 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22376 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22377 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22378 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22379 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22380 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22381 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22382 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22383 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22384 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22385 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22386 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22389 static void m68k_op_mull_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22390 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22391 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22392 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22393 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22394 uint64_t src = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22395 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22396 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22398 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22400 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22401 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22402 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22403 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22404 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22405 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22406 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22407 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22408 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22409 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22410 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22411 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22412 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22413 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22414 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22415 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22416 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22417 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22419 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22420 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22421 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22422 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22423 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22424 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22425 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22426 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22427 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22428 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22429 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22430 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22431 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22432 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22433 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22434 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22435 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22436 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22437
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22439 static void m68k_op_mull_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22440 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22441 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22442 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22443 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22444 uint64_t src = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22445 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22446 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22448 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22450 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22451 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22452 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22453 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22454 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22455 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22456 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22457 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22458 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22459 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22461 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22462 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22463 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22464 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22465 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22466 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22467 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22468
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22469 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22470 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22471 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22472 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22473 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22474 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22475 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22476 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22477 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22478 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22479 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22480 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22481 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22482 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22483 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22484 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22485 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22486 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22487
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22488
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22489 static void m68k_op_mull_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22490 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22491 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22492 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22493 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22494 uint64_t src = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22495 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22496 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22497
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22498 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22500 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22501 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22502 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22503 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22504 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22505 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22506 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22507 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22508 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22509 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22510 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22511 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22512 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22513 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22514 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22515 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22516 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22517 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22519 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22520 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22521 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22522 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22523 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22524 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22525 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22526 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22527 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22528 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22529 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22530 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22531 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22532 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22533 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22534 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22535 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22536 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22539 static void m68k_op_mull_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22540 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22541 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22542 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22543 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22544 uint64_t src = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22545 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22546 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22548 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22549
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22550 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22551 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22552 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22553 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22554 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22555 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22556 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22557 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22558 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22559 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22560 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22561 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22562 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22563 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22564 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22565 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22566 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22567 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22568
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22569 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22570 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22571 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22572 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22573 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22574 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22575 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22576 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22577 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22578 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22579 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22580 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22581 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22582 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22583 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22584 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22585 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22586 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22589 static void m68k_op_mull_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22590 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22591 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22592 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22593 uint32_t word2 = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22594 uint64_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22595 uint64_t dst = REG_D(mc68kcpu)[(word2 >> 12) & 7];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22596 uint64_t res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22598 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22599
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22600 if(BIT_B(word2)) /* signed */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22601 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22602 res = (int64_t)((int32_t)src) * (int64_t)((int32_t)dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22603 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22604 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22605 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22606 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22607 (mc68kcpu)->v_flag = ((int64_t)res != (int32_t)res)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22608 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22609 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22610 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22611 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22612 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22613 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22614 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22615 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22616 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22617 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22619 res = src * dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22620 if(!BIT_A(word2))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22621 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22622 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22623 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22624 (mc68kcpu)->v_flag = (res > 0xffffffff)<<7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22625 REG_D(mc68kcpu)[(word2 >> 12) & 7] = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22626 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22627 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22628 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res) | (res>>32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22629 (mc68kcpu)->n_flag = NFLAG_64(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22630 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22631 REG_D(mc68kcpu)[word2 & 7] = (res >> 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22632 REG_D(mc68kcpu)[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22633 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22634 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22635 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22636 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22639 static void m68k_op_nbcd_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22640 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22641 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22642 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22643 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22644
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22645 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22646 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22647 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22648
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22649 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22650 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22651
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22652 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22653
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22654 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22655
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22656 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22658 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22659 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22660 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22661 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22662 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22663 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22664 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22665 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22666 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22667 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22668 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22669 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22672 static void m68k_op_nbcd_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22673 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22674 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22675 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22676 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22678 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22679 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22680 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22681
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22682 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22683 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22684
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22685 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22687 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22688
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22689 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22691 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22692 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22693 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22694 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22695 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22696 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22697 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22698 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22699 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22700 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22701 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22702 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22703
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22704
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22705 static void m68k_op_nbcd_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22706 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22707 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22708 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22709 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22710
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22711 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22712 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22713 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22715 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22716 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22718 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22720 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22721
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22722 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22723
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22724 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22725 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22726 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22727 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22728 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22729 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22730 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22731 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22732 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22733 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22734 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22735 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22738 static void m68k_op_nbcd_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22739 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22740 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22741 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22742 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22744 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22745 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22746 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22748 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22749 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22751 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22752
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22753 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22754
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22755 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22757 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22758 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22759 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22760 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22761 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22762 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22763 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22764 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22765 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22766 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22767 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22768 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22769
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22771 static void m68k_op_nbcd_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22772 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22773 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22774 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22775 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22776
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22777 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22778 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22779 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22781 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22782 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22783
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22784 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22786 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22787
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22788 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22789
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22790 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22791 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22792 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22793 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22794 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22795 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22796 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22797 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22798 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22799 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22800 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22801 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22802
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22804 static void m68k_op_nbcd_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22805 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22806 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22807 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22808 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22810 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22811 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22812 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22814 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22815 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22816
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22817 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22819 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22820
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22821 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22822
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22823 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22824 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22825 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22826 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22827 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22828 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22829 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22830 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22831 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22832 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22833 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22834 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22836
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22837 static void m68k_op_nbcd_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22838 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22839 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22840 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22841 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22842
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22843 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22844 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22845 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22847 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22848 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22850 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22852 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22853
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22854 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22856 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22857 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22858 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22859 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22860 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22861 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22862 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22863 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22864 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22865 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22866 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22867 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22870 static void m68k_op_nbcd_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22871 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22872 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22873 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22874 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22876 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22877 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22878 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22880 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22881 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22883 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22884
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22885 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22887 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22889 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22890 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22891 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22892 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22893 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22894 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22895 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22896 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22897 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22898 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22899 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22900 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22902
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22903 static void m68k_op_nbcd_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22904 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22905 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22906 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22907 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22908
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22909 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22910 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22911 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22912
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22913 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22914 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22915
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22916 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22918 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22919
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22920 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22922 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22923 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22924 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22925 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22926 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22927 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22928 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22929 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22930 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22931 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22932 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22933 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22934
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22936 static void m68k_op_nbcd_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22937 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22938 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22939 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22940 uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22942 if(res != 0x9a)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22943 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22944 (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22946 if((res & 0x0f) == 0xa)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22947 res = (res & 0xf0) + 0x10;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22948
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22949 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22950
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22951 (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22953 m68ki_write_8((mc68kcpu), ea, MASK_OUT_ABOVE_8(res));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22954
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22955 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22956 (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22957 (mc68kcpu)->x_flag = XFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22958 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22959 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22960 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22961 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22962 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22963 (mc68kcpu)->x_flag = XFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22964 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22965 (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22966 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22967
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22969 static void m68k_op_neg_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22970 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22971 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22972 uint32_t res = 0 - MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22974 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22975 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22976 (mc68kcpu)->v_flag = *r_dst & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22977 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22978
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22979 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22980 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22983 static void m68k_op_neg_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22984 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22985 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22986 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22987 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22988
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22989 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22990 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22991 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22992 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22994 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22995 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22996
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22998 static void m68k_op_neg_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22999 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23000 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23001 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23002 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23004 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23005 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23006 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23007 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23009 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23010 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23011
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23012
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23013 static void m68k_op_neg_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23014 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23015 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23016 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23017 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23019 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23020 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23021 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23022 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23024 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23025 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23028 static void m68k_op_neg_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23029 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23030 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23031 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23032 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23034 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23035 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23036 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23037 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23039 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23040 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23043 static void m68k_op_neg_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23044 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23045 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23046 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23047 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23049 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23050 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23051 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23052 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23053
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23054 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23055 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23058 static void m68k_op_neg_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23059 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23060 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23061 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23062 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23064 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23065 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23066 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23067 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23068
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23069 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23070 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23073 static void m68k_op_neg_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23074 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23075 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23076 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23077 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23079 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23080 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23081 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23082 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23084 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23085 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23087
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23088 static void m68k_op_neg_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23089 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23090 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23091 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23092 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23093
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23094 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23095 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23096 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23097 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23099 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23100 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23101
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23102
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23103 static void m68k_op_neg_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23104 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23105 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23106 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23107 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23108
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23109 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23110 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23111 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23112 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23114 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23115 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23116
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23117
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23118 static void m68k_op_neg_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23119 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23120 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23121 uint32_t res = 0 - MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23123 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23124 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23125 (mc68kcpu)->v_flag = (*r_dst & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23126 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23128 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23129 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23130
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23132 static void m68k_op_neg_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23133 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23134 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23135 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23136 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23137
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23138 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23139 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23140 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23141 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23143 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23144 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23146
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23147 static void m68k_op_neg_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23148 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23149 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23150 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23151 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23152
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23153 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23154 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23155 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23156 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23157
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23158 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23159 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23160
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23162 static void m68k_op_neg_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23163 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23164 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23165 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23166 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23168 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23169 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23170 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23171 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23173 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23174 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23176
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23177 static void m68k_op_neg_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23178 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23179 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23180 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23181 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23182
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23183 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23184 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23185 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23186 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23187
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23188 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23189 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23191
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23192 static void m68k_op_neg_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23193 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23194 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23195 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23196 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23198 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23199 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23200 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23201 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23202
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23203 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23204 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23205
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23207 static void m68k_op_neg_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23208 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23209 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23210 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23211 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23212
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23213 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23214 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23215 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23216 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23218 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23219 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23220
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23221
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23222 static void m68k_op_neg_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23223 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23224 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23225 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23226 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23228 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23229 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23230 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23231 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23233 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23234 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23235
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23236
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23237 static void m68k_op_neg_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23238 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23239 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23240 uint32_t res = 0 - *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23241
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23242 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23243 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(*r_dst, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23244 (mc68kcpu)->v_flag = (*r_dst & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23245 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23247 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23248 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23251 static void m68k_op_neg_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23252 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23253 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23254 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23255 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23256
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23257 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23258 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23259 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23260 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23261
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23262 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23263 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23266 static void m68k_op_neg_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23267 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23268 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23269 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23270 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23271
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23272 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23273 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23274 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23275 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23277 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23278 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23280
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23281 static void m68k_op_neg_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23282 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23283 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23284 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23285 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23287 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23288 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23289 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23290 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23292 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23293 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23295
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23296 static void m68k_op_neg_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23297 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23298 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23299 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23300 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23302 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23303 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23304 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23305 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23306
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23307 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23308 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23310
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23311 static void m68k_op_neg_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23312 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23313 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23314 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23315 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23316
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23317 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23318 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23319 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23320 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23322 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23323 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23325
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23326 static void m68k_op_neg_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23327 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23328 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23329 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23330 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23332 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23333 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23334 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23335 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23336
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23337 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23338 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23339
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23340
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23341 static void m68k_op_neg_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23342 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23343 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23344 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23345 uint32_t res = 0 - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23346
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23347 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23348 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23349 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23350 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23352 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23353 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23354
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23356 static void m68k_op_negx_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23357 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23358 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23359 uint32_t res = 0 - MASK_OUT_ABOVE_8(*r_dst) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23361 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23362 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23363 (mc68kcpu)->v_flag = *r_dst & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23364
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23365 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23366 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23367
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23368 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23369 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23372 static void m68k_op_negx_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23373 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23374 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23375 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23376 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23378 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23379 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23380 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23382 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23383 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23385 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23386 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23389 static void m68k_op_negx_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23390 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23391 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23392 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23393 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23395 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23396 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23397 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23399 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23400 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23401
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23402 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23403 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23406 static void m68k_op_negx_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23407 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23408 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23409 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23410 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23412 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23413 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23414 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23415
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23416 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23417 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23419 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23420 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23421
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23423 static void m68k_op_negx_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23424 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23425 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23426 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23427 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23428
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23429 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23430 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23431 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23433 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23434 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23436 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23437 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23440 static void m68k_op_negx_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23441 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23442 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23443 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23444 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23445
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23446 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23447 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23448 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23450 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23451 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23452
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23453 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23454 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23457 static void m68k_op_negx_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23458 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23459 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23460 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23461 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23463 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23464 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23465 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23466
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23467 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23468 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23470 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23471 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23472
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23473
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23474 static void m68k_op_negx_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23475 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23476 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23477 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23478 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23479
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23480 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23481 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23482 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23484 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23485 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23486
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23487 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23488 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23491 static void m68k_op_negx_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23492 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23493 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23494 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23495 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23497 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23498 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23499 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23501 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23502 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23504 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23505 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23507
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23508 static void m68k_op_negx_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23509 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23510 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23511 uint32_t src = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23512 uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23514 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23515 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23516 (mc68kcpu)->v_flag = src & res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23517
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23518 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23519 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23520
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23521 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23522 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23523
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23524
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23525 static void m68k_op_negx_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23526 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23527 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23528 uint32_t res = 0 - MASK_OUT_ABOVE_16(*r_dst) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23529
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23530 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23531 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23532 (mc68kcpu)->v_flag = (*r_dst & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23533
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23534 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23535 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23537 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23538 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23539
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23540
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23541 static void m68k_op_negx_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23542 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23543 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23544 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23545 uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23547 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23548 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23549 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23550
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23551 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23552 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23553
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23554 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23555 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23556
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23557
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23558 static void m68k_op_negx_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23559 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23560 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23561 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23562 uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23564 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23565 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23566 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23567
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23568 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23569 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23570
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23571 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23572 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23575 static void m68k_op_negx_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23576 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23577 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23578 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23579 uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23580
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23581 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23582 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23583 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23584
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23585 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23586 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23588 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23589 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23591
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23592 static void m68k_op_negx_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23593 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23594 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23595 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23596 uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23598 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23599 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23600 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23601
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23602 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23603 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23604
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23605 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23606 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23608
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23609 static void m68k_op_negx_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23610 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23611 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23612 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23613 uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23614
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23615 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23616 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23617 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23619 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23620 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23622 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23623 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23625
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23626 static void m68k_op_negx_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23627 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23628 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23629 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23630 uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23631
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23632 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23633 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23634 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23636 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23637 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23639 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23640 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23643 static void m68k_op_negx_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23644 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23645 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23646 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23647 uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23648
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23649 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23650 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23651 (mc68kcpu)->v_flag = (src & res)>>8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23653 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23654 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23655
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23656 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23657 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23660 static void m68k_op_negx_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23661 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23662 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23663 uint32_t res = 0 - MASK_OUT_ABOVE_32(*r_dst) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23665 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23666 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(*r_dst, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23667 (mc68kcpu)->v_flag = (*r_dst & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23668
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23669 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23670 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23672 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23673 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23674
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23675
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23676 static void m68k_op_negx_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23677 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23678 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23679 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23680 uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23681
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23682 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23683 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23684 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23686 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23687 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23688
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23689 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23690 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23693 static void m68k_op_negx_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23694 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23695 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23696 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23697 uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23698
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23699 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23700 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23701 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23702
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23703 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23704 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23705
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23706 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23707 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23709
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23710 static void m68k_op_negx_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23711 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23712 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23713 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23714 uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23716 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23717 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23718 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23720 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23721 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23723 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23727 static void m68k_op_negx_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23728 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23729 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23730 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23731 uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23732
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23733 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23734 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23735 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23737 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23738 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23739
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23740 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23741 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23744 static void m68k_op_negx_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23745 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23746 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23747 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23748 uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23750 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23751 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23752 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23754 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23755 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23757 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23758 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23759
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23760
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23761 static void m68k_op_negx_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23762 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23763 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23764 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23765 uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23766
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23767 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23768 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23769 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23771 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23772 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23774 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23775 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23776
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23777
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23778 static void m68k_op_negx_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23779 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23780 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23781 uint32_t src = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23782 uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23783
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23784 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23785 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23786 (mc68kcpu)->v_flag = (src & res)>>24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23787
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23788 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23789 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23791 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23792 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23793
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23794
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23795 static void m68k_op_nop(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23796 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23797 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23798 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23799
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23800
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23801 static void m68k_op_not_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23802 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23803 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23804 uint32_t res = MASK_OUT_ABOVE_8(~*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23805
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23806 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23807
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23808 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23809 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23810 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23811 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23812 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23815 static void m68k_op_not_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23816 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23817 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23818 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23819
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23820 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23821
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23822 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23823 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23824 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23825 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23826 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23828
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23829 static void m68k_op_not_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23830 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23831 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23832 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23833
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23834 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23836 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23837 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23838 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23839 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23840 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23841
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23842
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23843 static void m68k_op_not_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23844 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23845 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23846 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23847
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23848 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23850 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23851 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23852 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23853 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23854 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23856
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23857 static void m68k_op_not_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23858 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23859 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23860 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23862 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23863
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23864 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23865 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23866 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23867 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23868 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23870
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23871 static void m68k_op_not_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23872 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23873 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23874 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23876 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23877
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23878 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23879 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23880 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23881 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23882 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23884
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23885 static void m68k_op_not_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23886 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23887 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23888 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23889
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23890 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23891
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23892 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23893 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23894 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23895 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23896 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23897
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23898
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23899 static void m68k_op_not_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23900 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23901 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23902 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23904 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23906 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23907 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23908 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23909 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23910 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23912
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23913 static void m68k_op_not_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23914 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23915 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23916 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23918 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23919
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23920 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23921 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23922 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23923 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23924 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23927 static void m68k_op_not_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23928 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23929 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23930 uint32_t res = MASK_OUT_ABOVE_8(~m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23932 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23933
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23934 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23935 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23936 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23937 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23938 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23940
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23941 static void m68k_op_not_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23942 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23943 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23944 uint32_t res = MASK_OUT_ABOVE_16(~*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23946 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23948 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23949 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23950 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23951 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23952 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23954
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23955 static void m68k_op_not_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23956 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23957 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23958 uint32_t res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23959
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23960 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23962 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23963 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23964 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23965 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23966 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23967
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23969 static void m68k_op_not_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23970 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23971 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23972 uint32_t res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23974 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23975
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23976 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23977 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23978 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23979 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23980 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23983 static void m68k_op_not_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23984 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23985 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23986 uint32_t res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23988 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23990 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23991 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23992 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23993 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23994 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23995
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23996
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23997 static void m68k_op_not_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23998 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23999 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24000 uint32_t res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24001
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24002 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24004 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24005 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24006 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24007 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24008 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24010
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24011 static void m68k_op_not_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24012 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24013 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24014 uint32_t res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24016 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24017
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24018 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24019 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24020 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24021 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24022 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24024
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24025 static void m68k_op_not_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24026 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24027 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24028 uint32_t res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24030 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24031
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24032 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24033 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24034 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24035 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24036 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24037
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24039 static void m68k_op_not_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24040 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24041 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24042 uint32_t res = MASK_OUT_ABOVE_16(~m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24043
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24044 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24045
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24046 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24047 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24048 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24049 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24050 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24052
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24053 static void m68k_op_not_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24054 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24055 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24056 uint32_t res = *r_dst = MASK_OUT_ABOVE_32(~*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24058 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24059 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24060 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24061 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24062 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24064
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24065 static void m68k_op_not_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24066 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24067 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24068 uint32_t res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24070 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24072 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24073 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24074 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24075 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24076 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24079 static void m68k_op_not_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24081 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24082 uint32_t res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24084 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24086 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24087 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24088 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24089 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24090 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24092
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24093 static void m68k_op_not_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24094 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24095 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24096 uint32_t res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24098 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24100 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24101 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24102 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24103 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24104 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24106
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24107 static void m68k_op_not_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24108 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24109 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24110 uint32_t res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24112 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24114 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24115 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24116 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24117 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24118 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24120
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24121 static void m68k_op_not_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24122 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24123 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24124 uint32_t res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24125
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24126 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24128 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24129 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24130 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24131 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24132 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24135 static void m68k_op_not_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24136 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24137 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24138 uint32_t res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24139
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24140 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24142 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24143 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24144 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24145 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24146 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24149 static void m68k_op_not_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24150 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24151 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24152 uint32_t res = MASK_OUT_ABOVE_32(~m68ki_read_32((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24153
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24154 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24156 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24157 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24158 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24159 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24160 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24163 static void m68k_op_or_8_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24165 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= MASK_OUT_ABOVE_8(DY(mc68kcpu))));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24166
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24167 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24168 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24169 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24170 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24171 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24174 static void m68k_op_or_8_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24175 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24176 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_AI_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24177
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24178 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24179 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24180 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24181 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24182 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24185 static void m68k_op_or_8_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24186 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24187 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_PI_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24188
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24189 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24190 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24191 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24192 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24193 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24194
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24196 static void m68k_op_or_8_er_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24197 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24198 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_A7_PI_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24200 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24201 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24202 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24203 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24204 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24205
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24207 static void m68k_op_or_8_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24208 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24209 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_PD_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24211 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24212 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24213 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24214 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24215 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24218 static void m68k_op_or_8_er_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24219 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24220 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_A7_PD_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24221
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24222 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24223 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24224 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24225 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24226 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24229 static void m68k_op_or_8_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24230 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24231 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_DI_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24233 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24234 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24235 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24236 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24237 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24240 static void m68k_op_or_8_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24241 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24242 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AY_IX_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24244 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24245 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24246 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24247 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24248 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24251 static void m68k_op_or_8_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24252 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24253 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AW_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24255 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24256 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24257 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24258 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24259 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24261
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24262 static void m68k_op_or_8_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24263 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24264 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_AL_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24266 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24267 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24268 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24269 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24270 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24271
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24272
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24273 static void m68k_op_or_8_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24274 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24275 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_PCDI_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24277 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24278 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24279 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24280 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24281 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24283
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24284 static void m68k_op_or_8_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24285 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24286 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_PCIX_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24288 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24289 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24290 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24291 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24292 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24295 static void m68k_op_or_8_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24296 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24297 uint32_t res = MASK_OUT_ABOVE_8((DX(mc68kcpu) |= OPER_I_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24298
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24299 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24300 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24301 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24302 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24303 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24304
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24306 static void m68k_op_or_16_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24307 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24308 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= MASK_OUT_ABOVE_16(DY(mc68kcpu))));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24310 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24311 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24312 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24313 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24314 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24316
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24317 static void m68k_op_or_16_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24318 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24319 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_AI_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24320
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24321 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24322 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24323 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24324 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24325 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24326
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24328 static void m68k_op_or_16_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24329 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24330 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_PI_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24332 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24333 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24334 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24335 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24336 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24337
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24338
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24339 static void m68k_op_or_16_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24340 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24341 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_PD_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24343 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24344 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24345 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24346 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24347 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24348
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24350 static void m68k_op_or_16_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24351 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24352 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_DI_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24353
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24354 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24355 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24356 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24357 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24358 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24361 static void m68k_op_or_16_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24362 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24363 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AY_IX_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24364
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24365 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24366 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24367 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24368 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24369 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24372 static void m68k_op_or_16_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24373 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24374 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AW_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24375
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24376 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24377 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24378 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24379 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24380 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24383 static void m68k_op_or_16_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24384 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24385 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_AL_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24386
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24387 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24388 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24389 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24390 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24391 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24394 static void m68k_op_or_16_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24395 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24396 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_PCDI_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24397
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24398 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24399 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24400 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24401 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24402 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24405 static void m68k_op_or_16_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24406 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24407 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_PCIX_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24408
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24409 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24410 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24411 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24412 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24413 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24414
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24415
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24416 static void m68k_op_or_16_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24417 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24418 uint32_t res = MASK_OUT_ABOVE_16((DX(mc68kcpu) |= OPER_I_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24420 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24421 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24422 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24423 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24424 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24427 static void m68k_op_or_32_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24428 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24429 uint32_t res = DX(mc68kcpu) |= DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24431 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24432 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24433 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24434 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24435 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24436
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24437
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24438 static void m68k_op_or_32_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24439 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24440 uint32_t res = DX(mc68kcpu) |= OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24442 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24443 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24444 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24445 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24446 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24448
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24449 static void m68k_op_or_32_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24450 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24451 uint32_t res = DX(mc68kcpu) |= OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24452
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24453 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24454 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24455 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24456 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24457 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24458
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24459
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24460 static void m68k_op_or_32_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24461 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24462 uint32_t res = DX(mc68kcpu) |= OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24464 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24465 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24466 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24467 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24468 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24469
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24471 static void m68k_op_or_32_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24472 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24473 uint32_t res = DX(mc68kcpu) |= OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24475 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24476 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24477 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24478 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24479 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24480
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24482 static void m68k_op_or_32_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24483 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24484 uint32_t res = DX(mc68kcpu) |= OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24485
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24486 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24487 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24488 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24489 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24490 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24493 static void m68k_op_or_32_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24494 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24495 uint32_t res = DX(mc68kcpu) |= OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24496
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24497 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24498 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24499 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24500 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24501 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24502
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24504 static void m68k_op_or_32_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24505 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24506 uint32_t res = DX(mc68kcpu) |= OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24507
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24508 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24509 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24510 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24511 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24512 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24514
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24515 static void m68k_op_or_32_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24516 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24517 uint32_t res = DX(mc68kcpu) |= OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24519 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24520 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24521 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24522 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24523 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24524
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24526 static void m68k_op_or_32_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24527 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24528 uint32_t res = DX(mc68kcpu) |= OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24529
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24530 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24531 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24532 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24533 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24534 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24537 static void m68k_op_or_32_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24538 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24539 uint32_t res = DX(mc68kcpu) |= OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24540
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24541 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24542 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24543 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24544 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24545 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24548 static void m68k_op_or_8_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24549 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24550 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24551 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24552
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24553 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24555 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24556 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24557 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24558 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24559 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24562 static void m68k_op_or_8_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24563 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24564 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24565 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24566
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24567 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24568
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24569 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24570 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24571 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24572 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24573 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24576 static void m68k_op_or_8_re_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24577 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24578 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24579 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24580
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24581 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24583 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24584 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24585 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24586 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24587 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24590 static void m68k_op_or_8_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24591 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24592 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24593 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24595 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24597 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24598 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24599 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24600 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24601 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24604 static void m68k_op_or_8_re_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24605 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24606 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24607 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24608
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24609 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24611 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24612 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24613 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24614 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24615 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24616
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24618 static void m68k_op_or_8_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24619 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24620 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24621 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24623 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24625 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24626 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24627 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24628 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24629 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24631
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24632 static void m68k_op_or_8_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24633 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24634 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24635 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24637 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24639 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24640 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24641 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24642 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24643 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24644
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24645
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24646 static void m68k_op_or_8_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24647 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24648 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24649 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24651 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24653 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24654 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24655 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24656 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24657 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24660 static void m68k_op_or_8_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24661 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24662 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24663 uint32_t res = MASK_OUT_ABOVE_8(DX(mc68kcpu) | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24665 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24667 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24668 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24669 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24670 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24671 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24673
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24674 static void m68k_op_or_16_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24675 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24676 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24677 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24679 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24681 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24682 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24683 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24684 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24685 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24688 static void m68k_op_or_16_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24689 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24690 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24691 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24693 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24694
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24695 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24696 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24697 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24698 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24699 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24702 static void m68k_op_or_16_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24703 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24704 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24705 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24707 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24709 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24710 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24711 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24712 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24713 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24716 static void m68k_op_or_16_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24717 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24718 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24719 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24720
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24721 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24723 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24724 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24725 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24726 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24727 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24728
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24729
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24730 static void m68k_op_or_16_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24731 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24732 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24733 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24735 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24737 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24738 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24739 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24740 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24741 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24744 static void m68k_op_or_16_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24745 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24746 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24747 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24748
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24749 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24751 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24752 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24753 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24754 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24755 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24758 static void m68k_op_or_16_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24759 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24760 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24761 uint32_t res = MASK_OUT_ABOVE_16(DX(mc68kcpu) | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24763 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24765 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24766 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24767 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24768 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24769 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24771
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24772 static void m68k_op_or_32_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24773 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24774 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24775 uint32_t res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24776
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24777 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24778
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24779 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24780 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24781 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24782 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24783 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24784
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24786 static void m68k_op_or_32_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24787 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24788 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24789 uint32_t res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24791 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24793 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24794 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24795 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24796 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24797 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24799
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24800 static void m68k_op_or_32_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24801 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24802 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24803 uint32_t res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24804
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24805 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24806
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24807 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24808 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24809 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24810 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24811 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24812
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24814 static void m68k_op_or_32_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24815 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24816 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24817 uint32_t res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24819 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24820
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24821 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24822 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24823 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24824 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24825 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24828 static void m68k_op_or_32_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24829 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24830 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24831 uint32_t res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24832
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24833 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24835 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24836 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24837 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24838 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24839 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24840
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24841
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24842 static void m68k_op_or_32_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24843 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24844 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24845 uint32_t res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24847 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24848
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24849 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24850 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24851 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24852 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24853 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24856 static void m68k_op_or_32_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24857 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24858 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24859 uint32_t res = DX(mc68kcpu) | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24861 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24863 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24864 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24865 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24866 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24867 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24870 static void m68k_op_ori_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24871 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24872 uint32_t res = MASK_OUT_ABOVE_8((DY(mc68kcpu) |= OPER_I_8(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24874 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24875 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24876 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24877 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24878 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24880
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24881 static void m68k_op_ori_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24882 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24883 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24884 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24885 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24887 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24889 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24890 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24891 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24892 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24893 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24896 static void m68k_op_ori_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24897 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24898 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24899 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24900 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24901
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24902 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24904 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24905 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24906 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24907 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24908 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24911 static void m68k_op_ori_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24912 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24913 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24914 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24915 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24916
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24917 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24918
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24919 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24920 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24921 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24922 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24923 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24926 static void m68k_op_ori_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24927 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24928 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24929 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24930 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24932 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24933
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24934 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24935 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24936 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24937 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24938 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24940
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24941 static void m68k_op_ori_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24942 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24943 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24944 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24945 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24947 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24948
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24949 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24950 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24951 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24952 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24953 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24954
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24955
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24956 static void m68k_op_ori_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24957 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24958 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24959 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24960 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24962 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24964 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24965 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24966 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24967 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24968 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24970
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24971 static void m68k_op_ori_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24972 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24973 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24974 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24975 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24977 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24978
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24979 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24980 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24981 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24982 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24983 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24984
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24985
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24986 static void m68k_op_ori_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24987 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24988 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24989 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24990 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24991
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24992 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24994 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24995 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24996 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24997 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24998 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25001 static void m68k_op_ori_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25002 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25003 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25004 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25005 uint32_t res = MASK_OUT_ABOVE_8(src | m68ki_read_8((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25006
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25007 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25009 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25010 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25011 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25012 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25013 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25016 static void m68k_op_ori_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25017 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25018 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu) |= OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25020 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25021 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25022 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25023 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25024 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25025
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25027 static void m68k_op_ori_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25028 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25029 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25030 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25031 uint32_t res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25032
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25033 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25034
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25035 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25036 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25037 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25038 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25039 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25040
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25042 static void m68k_op_ori_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25043 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25044 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25045 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25046 uint32_t res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25048 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25049
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25050 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25051 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25052 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25053 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25054 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25057 static void m68k_op_ori_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25058 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25059 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25060 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25061 uint32_t res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25063 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25064
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25065 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25066 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25067 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25068 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25069 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25070
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25072 static void m68k_op_ori_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25073 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25074 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25075 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25076 uint32_t res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25078 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25079
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25080 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25081 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25082 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25083 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25084 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25087 static void m68k_op_ori_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25088 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25089 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25090 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25091 uint32_t res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25092
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25093 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25094
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25095 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25096 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25097 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25098 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25099 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25100
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25101
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25102 static void m68k_op_ori_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25103 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25104 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25105 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25106 uint32_t res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25108 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25109
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25110 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25111 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25112 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25113 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25114 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25115
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25116
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25117 static void m68k_op_ori_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25118 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25119 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25120 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25121 uint32_t res = MASK_OUT_ABOVE_16(src | m68ki_read_16((mc68kcpu), ea));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25123 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25124
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25125 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25126 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25127 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25128 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25129 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25130
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25132 static void m68k_op_ori_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25133 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25134 uint32_t res = DY(mc68kcpu) |= OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25135
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25136 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25137 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25138 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25139 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25140 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25143 static void m68k_op_ori_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25144 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25145 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25146 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25147 uint32_t res = src | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25149 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25150
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25151 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25152 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25153 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25154 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25155 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25157
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25158 static void m68k_op_ori_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25159 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25160 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25161 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25162 uint32_t res = src | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25163
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25164 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25165
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25166 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25167 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25168 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25169 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25170 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25171
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25173 static void m68k_op_ori_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25174 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25175 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25176 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25177 uint32_t res = src | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25178
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25179 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25180
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25181 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25182 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25183 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25184 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25185 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25186
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25187
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25188 static void m68k_op_ori_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25189 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25190 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25191 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25192 uint32_t res = src | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25194 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25196 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25197 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25198 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25199 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25200 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25202
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25203 static void m68k_op_ori_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25204 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25205 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25206 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25207 uint32_t res = src | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25208
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25209 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25211 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25212 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25213 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25214 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25215 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25217
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25218 static void m68k_op_ori_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25219 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25220 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25221 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25222 uint32_t res = src | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25224 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25225
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25226 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25227 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25228 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25229 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25230 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25232
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25233 static void m68k_op_ori_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25234 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25235 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25236 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25237 uint32_t res = src | m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25239 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25240
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25241 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25242 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25243 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25244 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25245 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25248 static void m68k_op_ori_16_toc(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25249 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25250 m68ki_set_ccr((mc68kcpu), m68ki_get_ccr(mc68kcpu) | OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25251 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25252
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25254 static void m68k_op_ori_16_tos(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25255 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25256 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25257 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25258 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25259 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25260 m68ki_set_sr((mc68kcpu), m68ki_get_sr(mc68kcpu) | src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25261 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25262 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25263 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25264 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25267 static void m68k_op_pack_16_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25268 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25269 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25270 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25271 /* Note: DX(mc68kcpu) and DY(mc68kcpu) are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25272 uint32_t src = DY(mc68kcpu) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25273 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25275 *r_dst = MASK_OUT_BELOW_8(*r_dst) | ((src >> 4) & 0x00f0) | (src & 0x000f);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25276 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25277 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25278 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25279 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25280
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25282 static void m68k_op_pack_16_mm_ax7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25283 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25284 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25285 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25286 /* Note: AX and AY are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25287 uint32_t ea_src = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25288 uint32_t src = m68ki_read_8((mc68kcpu), ea_src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25289 ea_src = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25290 src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25292 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25293 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25294 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25295 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25296 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25297
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25298
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25299 static void m68k_op_pack_16_mm_ay7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25300 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25301 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25302 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25303 /* Note: AX and AY are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25304 uint32_t ea_src = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25305 uint32_t src = m68ki_read_8((mc68kcpu), ea_src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25306 ea_src = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25307 src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25309 m68ki_write_8((mc68kcpu), EA_AX_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25310 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25311 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25312 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25313 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25316 static void m68k_op_pack_16_mm_axy7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25317 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25318 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25319 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25320 uint32_t ea_src = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25321 uint32_t src = m68ki_read_8((mc68kcpu), ea_src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25322 ea_src = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25323 src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25325 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25326 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25327 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25328 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25329 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25332 static void m68k_op_pack_16_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25333 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25334 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25335 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25336 /* Note: AX and AY are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25337 uint32_t ea_src = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25338 uint32_t src = m68ki_read_8((mc68kcpu), ea_src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25339 ea_src = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25340 src = ((src << 8) | m68ki_read_8((mc68kcpu), ea_src)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25342 m68ki_write_8((mc68kcpu), EA_AX_PD_8(mc68kcpu), ((src >> 8) & 0x000f) | ((src<<4) & 0x00f0));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25343 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25344 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25345 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25346 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25348
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25349 static void m68k_op_pea_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25350 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25351 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25352
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25353 m68ki_push_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25354 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25356
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25357 static void m68k_op_pea_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25358 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25359 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25361 m68ki_push_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25362 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25364
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25365 static void m68k_op_pea_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25366 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25367 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25368
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25369 m68ki_push_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25370 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25373 static void m68k_op_pea_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25374 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25375 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25376
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25377 m68ki_push_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25378 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25380
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25381 static void m68k_op_pea_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25382 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25383 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25385 m68ki_push_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25386 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25389 static void m68k_op_pea_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25390 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25391 uint32_t ea = EA_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25392
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25393 m68ki_push_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25394 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25395
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25396
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25397 static void m68k_op_pea_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25398 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25399 uint32_t ea = EA_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25401 m68ki_push_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25402 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25405 static void m68k_op_pflusha_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25406 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25407 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25408 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25409
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25411 static void m68k_op_pflushan_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25412 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25413 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25414 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25415
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25417 static void m68k_op_pmmu_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25418 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25420 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25421 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25423
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25424 static void m68k_op_ptest_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25425 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25427 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25428 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25429
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25431 static void m68k_op_reset(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25432 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25433 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25434 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25435 m68k_reset_handler handler = (m68k_reset_handler)(mc68kcpu)->c.reset_handler;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25436 handler(&(mc68kcpu)->c);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25437 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_reset;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25438 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25439 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25440 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25441 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25444 static void m68k_op_ror_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25445 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25446 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25447 uint32_t orig_shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25448 uint32_t shift = orig_shift & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25449 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25450 uint32_t res = ROR_8(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25452 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25453 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25454
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25455 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25457 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25458 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25459 (mc68kcpu)->c_flag = src << (9-orig_shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25460 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25461 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25464 static void m68k_op_ror_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25465 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25466 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25467 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25468 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25469 uint32_t res = ROR_16(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25471 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25472 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25473
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25474 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25475
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25476 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25477 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25478 (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25479 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25480 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25481
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25483 static void m68k_op_ror_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25484 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25485 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25486 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25487 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25488 uint32_t res = ROR_32(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25490 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25491 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25493 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25495 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25496 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25497 (mc68kcpu)->c_flag = src << (9-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25498 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25499 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25502 static void m68k_op_ror_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25503 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25504 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25505 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25506 uint32_t shift = orig_shift & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25507 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25508 uint32_t res = ROR_8(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25510 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25511 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25512 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25514 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25515 (mc68kcpu)->c_flag = src << (8-((shift-1)&7));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25516 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25517 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25518 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25519 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25520 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25522 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25523 (mc68kcpu)->n_flag = NFLAG_8(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25524 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25525 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25526 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25527
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25528
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25529 static void m68k_op_ror_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25530 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25531 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25532 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25533 uint32_t shift = orig_shift & 15;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25534 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25535 uint32_t res = ROR_16(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25537 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25538 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25539 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25540
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25541 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25542 (mc68kcpu)->c_flag = (src >> ((shift - 1) & 15)) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25543 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25544 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25545 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25546 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25547 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25549 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25550 (mc68kcpu)->n_flag = NFLAG_16(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25551 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25552 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25553 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25555
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25556 static void m68k_op_ror_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25557 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25558 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25559 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25560 uint32_t shift = orig_shift & 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25561 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25562 uint32_t res = ROR_32(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25564 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25565 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25566 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25567
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25568 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25569 (mc68kcpu)->c_flag = (src >> ((shift - 1) & 31)) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25570 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25571 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25572 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25573 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25574 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25576 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25577 (mc68kcpu)->n_flag = NFLAG_32(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25578 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25579 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25580 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25583 static void m68k_op_ror_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25584 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25585 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25586 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25587 uint32_t res = ROR_16(src, 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25589 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25591 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25592 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25593 (mc68kcpu)->c_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25594 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25595 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25596
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25598 static void m68k_op_ror_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25599 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25600 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25601 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25602 uint32_t res = ROR_16(src, 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25604 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25606 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25607 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25608 (mc68kcpu)->c_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25609 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25610 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25612
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25613 static void m68k_op_ror_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25614 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25615 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25616 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25617 uint32_t res = ROR_16(src, 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25619 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25620
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25621 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25622 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25623 (mc68kcpu)->c_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25624 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25625 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25627
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25628 static void m68k_op_ror_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25629 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25630 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25631 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25632 uint32_t res = ROR_16(src, 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25633
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25634 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25636 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25637 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25638 (mc68kcpu)->c_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25639 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25640 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25643 static void m68k_op_ror_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25644 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25645 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25646 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25647 uint32_t res = ROR_16(src, 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25648
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25649 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25651 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25652 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25653 (mc68kcpu)->c_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25654 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25655 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25656
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25657
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25658 static void m68k_op_ror_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25659 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25660 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25661 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25662 uint32_t res = ROR_16(src, 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25664 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25666 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25667 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25668 (mc68kcpu)->c_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25669 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25670 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25673 static void m68k_op_ror_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25674 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25675 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25676 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25677 uint32_t res = ROR_16(src, 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25679 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25681 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25682 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25683 (mc68kcpu)->c_flag = src << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25684 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25685 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25688 static void m68k_op_rol_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25689 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25690 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25691 uint32_t orig_shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25692 uint32_t shift = orig_shift & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25693 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25694 uint32_t res = ROL_8(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25695
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25696 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25697 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25698
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25699 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25701 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25702 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25703 (mc68kcpu)->c_flag = src << orig_shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25704 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25705 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25708 static void m68k_op_rol_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25709 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25710 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25711 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25712 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25713 uint32_t res = ROL_16(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25715 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25716 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25718 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25720 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25721 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25722 (mc68kcpu)->c_flag = src >> (8-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25723 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25727 static void m68k_op_rol_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25728 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25729 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25730 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25731 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25732 uint32_t res = ROL_32(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25733
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25734 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25735 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25737 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25738
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25739 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25740 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25741 (mc68kcpu)->c_flag = src >> (24-shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25742 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25743 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25744
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25745
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25746 static void m68k_op_rol_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25747 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25748 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25749 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25750 uint32_t shift = orig_shift & 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25751 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25752 uint32_t res = ROL_8(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25753
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25754 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25755 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25756 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25757
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25758 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25759 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25760 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25761 (mc68kcpu)->c_flag = src << shift;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25762 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25763 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25764 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25765 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25766 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25767 (mc68kcpu)->c_flag = (src & 1)<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25768 (mc68kcpu)->n_flag = NFLAG_8(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25769 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25770 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25771 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25772 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25774 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25775 (mc68kcpu)->n_flag = NFLAG_8(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25776 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25777 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25778 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25781 static void m68k_op_rol_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25782 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25783 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25784 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25785 uint32_t shift = orig_shift & 15;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25786 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25787 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, shift));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25788
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25789 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25790 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25791 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25793 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25794 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25795 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25796 (mc68kcpu)->c_flag = (src << shift) >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25797 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25798 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25799 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25800 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25801 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25802 (mc68kcpu)->c_flag = (src & 1)<<8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25803 (mc68kcpu)->n_flag = NFLAG_16(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25804 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25805 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25806 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25807 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25808
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25809 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25810 (mc68kcpu)->n_flag = NFLAG_16(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25811 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25812 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25813 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25816 static void m68k_op_rol_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25817 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25818 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25819 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25820 uint32_t shift = orig_shift & 31;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25821 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25822 uint32_t res = ROL_32(src, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25823
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25824 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25825 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25826 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25828 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25829
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25830 (mc68kcpu)->c_flag = (src >> ((32 - shift) & 0x1f)) << 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25831 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25832 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25833 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25834 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25835 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25836
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25837 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25838 (mc68kcpu)->n_flag = NFLAG_32(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25839 (mc68kcpu)->not_z_flag = src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25840 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25841 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25842
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25843
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25844 static void m68k_op_rol_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25845 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25846 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25847 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25848 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25849
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25850 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25852 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25853 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25854 (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25855 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25856 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25857
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25858
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25859 static void m68k_op_rol_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25860 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25861 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25862 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25863 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25864
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25865 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25867 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25868 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25869 (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25870 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25871 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25872
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25874 static void m68k_op_rol_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25875 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25876 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25877 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25878 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25880 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25882 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25883 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25884 (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25885 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25886 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25889 static void m68k_op_rol_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25890 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25891 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25892 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25893 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25895 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25896
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25897 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25898 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25899 (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25900 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25901 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25902
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25904 static void m68k_op_rol_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25905 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25906 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25907 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25908 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25910 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25912 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25913 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25914 (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25915 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25916 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25918
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25919 static void m68k_op_rol_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25920 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25921 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25922 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25923 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25925 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25927 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25928 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25929 (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25930 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25931 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25932
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25933
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25934 static void m68k_op_rol_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25935 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25936 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25937 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25938 uint32_t res = MASK_OUT_ABOVE_16(ROL_16(src, 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25940 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25942 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25943 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25944 (mc68kcpu)->c_flag = src >> 7;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25945 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25946 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25948
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25949 static void m68k_op_roxr_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25950 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25951 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25952 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25953 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25954 uint32_t res = ROR_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25955
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25956 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25957 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25959 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25960 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25962 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25964 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25965 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25966 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25967 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25968
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25970 static void m68k_op_roxr_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25971 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25972 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25973 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25974 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25975 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25977 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25978 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25979
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25980 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25981 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25983 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25984
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25985 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25986 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25987 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25988 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25991 static void m68k_op_roxr_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25992 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25993 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25994 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25995 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25996 uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25998 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25999 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26001 res = ROR_33_64(res, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26002
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26003 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26004 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26006 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26007
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26008 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26009 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26010 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26011 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26012
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26013
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26014 static void m68k_op_roxr_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26015 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26016 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26017 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26019 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26020 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26021 uint32_t shift = orig_shift % 9;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26022 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26023 uint32_t res = ROR_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26024
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26025 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26027 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26028 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26029
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26030 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26031 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26032 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26033 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26034 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26035 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26037 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26038 (mc68kcpu)->n_flag = NFLAG_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26039 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26040 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26041 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26043
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26044 static void m68k_op_roxr_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26045 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26046 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26047 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26049 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26050 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26051 uint32_t shift = orig_shift % 17;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26052 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26053 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26054
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26055 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26056
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26057 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26058 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26060 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26061 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26062 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26063 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26064 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26065 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26066
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26067 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26068 (mc68kcpu)->n_flag = NFLAG_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26069 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26070 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26071 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26073
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26074 static void m68k_op_roxr_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26075 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26076 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26077 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26079 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26080 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26081 uint32_t shift = orig_shift % 33;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26082 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26083 uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26085 res = ROR_33_64(res, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26087 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26088
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26089 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26090 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26092 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26093 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26094 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26095 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26096 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26097 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26099 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26100 (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26101 (mc68kcpu)->not_z_flag = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26102 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26103 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26104
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26106 static void m68k_op_roxr_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26107 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26108 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26109 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26110 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26112 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26113 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26114
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26115 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26116
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26117 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26118 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26119 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26120 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26121
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26123 static void m68k_op_roxr_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26125 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26126 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26127 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26128
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26129 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26130 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26132 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26133
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26134 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26135 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26136 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26137 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26139
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26140 static void m68k_op_roxr_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26141 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26142 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26143 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26144 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26146 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26147 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26148
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26149 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26150
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26151 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26152 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26153 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26154 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26157 static void m68k_op_roxr_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26158 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26159 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26160 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26161 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26163 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26164 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26165
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26166 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26168 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26169 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26170 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26171 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26174 static void m68k_op_roxr_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26175 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26176 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26177 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26178 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26180 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26181 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26182
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26183 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26185 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26186 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26187 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26188 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26191 static void m68k_op_roxr_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26192 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26193 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26194 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26195 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26196
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26197 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26198 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26200 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26202 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26203 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26204 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26205 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26207
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26208 static void m68k_op_roxr_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26209 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26210 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26211 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26212 uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26213
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26214 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26215 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26217 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26219 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26220 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26221 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26222 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26224
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26225 static void m68k_op_roxl_8_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26226 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26227 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26228 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26229 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26230 uint32_t res = ROL_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26232 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26233 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26234
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26235 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26236 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26238 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26240 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26241 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26242 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26243 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26244
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26246 static void m68k_op_roxl_16_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26247 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26248 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26249 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26250 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26251 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26252
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26253 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26254 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26255
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26256 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26257 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26259 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26261 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26262 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26263 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26264 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26265
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26267 static void m68k_op_roxl_32_s(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26268 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26269 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26270 uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26271 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26272 uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26273
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26274 if(shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26275 (mc68kcpu)->c.current_cycle += (shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26277 res = ROL_33_64(res, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26278
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26279 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26280 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26282 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26283
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26284 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26285 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26286 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26287 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26290 static void m68k_op_roxl_8_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26291 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26292 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26293 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26295
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26296 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26297 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26298 uint32_t shift = orig_shift % 9;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26299 uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26300 uint32_t res = ROL_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26301
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26302 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26303
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26304 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26305 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26306
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26307 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26308 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26309 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26310 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26311 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26312 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26313
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26314 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26315 (mc68kcpu)->n_flag = NFLAG_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26316 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26317 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26318 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26319
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26320
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26321 static void m68k_op_roxl_16_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26322 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26323 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26324 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26325
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26326 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26327 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26328 uint32_t shift = orig_shift % 17;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26329 uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26330 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26332 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26333
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26334 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26335 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26336
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26337 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26338 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26339 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26340 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26341 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26342 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26344 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26345 (mc68kcpu)->n_flag = NFLAG_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26346 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26347 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26348 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26349
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26351 static void m68k_op_roxl_32_r(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26352 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26353 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26354 uint32_t orig_shift = DX(mc68kcpu) & 0x3f;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26356 if(orig_shift != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26357 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26358 uint32_t shift = orig_shift % 33;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26359 uint64_t src = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26360 uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26362 res = ROL_33_64(res, shift);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26363
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26364 (mc68kcpu)->c.current_cycle += (orig_shift<<(mc68kcpu)->cyc_shift) * (mc68kcpu)->c.options->gen.clock_divider;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26366 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 24;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26367 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26368
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26369 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26370 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26371 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26372 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26373 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26374 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26375
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26376 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26377 (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26378 (mc68kcpu)->not_z_flag = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26379 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26380 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26381
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26383 static void m68k_op_roxl_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26384 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26385 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26386 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26387 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26388
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26389 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26390 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26392 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26394 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26395 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26396 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26397 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26400 static void m68k_op_roxl_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26401 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26402 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26403 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26404 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26406 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26407 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26408
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26409 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26411 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26412 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26413 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26414 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26415
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26417 static void m68k_op_roxl_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26418 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26419 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26420 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26421 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26423 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26424 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26426 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26428 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26429 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26430 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26431 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26434 static void m68k_op_roxl_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26435 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26436 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26437 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26438 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26440 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26441 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26443 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26444
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26445 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26446 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26447 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26448 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26451 static void m68k_op_roxl_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26452 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26453 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26454 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26455 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26457 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26458 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26459
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26460 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26462 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26463 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26464 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26465 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26466
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26468 static void m68k_op_roxl_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26469 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26470 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26471 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26472 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26473
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26474 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26475 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26477 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26478
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26479 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26480 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26481 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26482 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26484
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26485 static void m68k_op_roxl_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26486 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26487 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26488 uint32_t src = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26489 uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26491 (mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26492 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26493
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26494 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26495
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26496 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26497 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26498 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26499 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26502 static void m68k_op_rtd_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26503 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26504 if(CPU_TYPE_IS_010_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26505 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26506 uint32_t new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26507
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26508 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26509 REG_A(mc68kcpu)[7] = MASK_OUT_ABOVE_32(REG_A(mc68kcpu)[7] + MAKE_INT_16(OPER_I_16(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26510 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26511 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26512 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26513 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26514 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26516
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26517 static void m68k_op_rte_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26518 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26519 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26520 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26521 uint32_t new_sr;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26522 uint32_t new_pc;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26523 uint32_t format_word;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26524
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26525 /* if (!(mc68kcpu)->rte_instr_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26526 ((mc68kcpu)->rte_instr_callback)(1);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26527 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26528
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26529 if(CPU_TYPE_IS_000((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26530 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26531 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26532 new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26533 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26534 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26536 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26537 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26539 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26540 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26542 if(CPU_TYPE_IS_010((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26543 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26544 format_word = m68ki_read_16((mc68kcpu), REG_A(mc68kcpu)[7]+6) >> 12;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26545 if(format_word == 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26546 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26547 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26548 new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26549 m68ki_fake_pull_16(mc68kcpu); /* format word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26550 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26551 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26552 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26553 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26554 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26555 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26556 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26557 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26558 /* Not handling bus fault (9) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26559 m68ki_exception_format_error(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26560 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26561 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26562
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26563 /* Otherwise it's 020 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26564 rte_loop:
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26565 format_word = m68ki_read_16((mc68kcpu), REG_A(mc68kcpu)[7]+6) >> 12;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26566 switch(format_word)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26567 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26568 case 0: /* Normal */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26569 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26570 new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26571 m68ki_fake_pull_16(mc68kcpu); /* format word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26572 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26573 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26574 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26575 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26576 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26577 case 1: /* Throwaway */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26578 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26579 m68ki_fake_pull_32(mc68kcpu); /* program counter */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26580 m68ki_fake_pull_16(mc68kcpu); /* format word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26581 m68ki_set_sr_noint((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26582 goto rte_loop;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26583 case 2: /* Trap */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26584 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26585 new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26586 m68ki_fake_pull_16(mc68kcpu); /* format word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26587 m68ki_fake_pull_32(mc68kcpu); /* address */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26588 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26589 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26590 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26591 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26592 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26593 case 7: /* 68040 access error */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26594 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26595 new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26596 m68ki_fake_pull_16(mc68kcpu); /* $06: format word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26597 m68ki_fake_pull_32(mc68kcpu); /* $08: effective address */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26598 m68ki_fake_pull_16(mc68kcpu); /* $0c: special status word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26599 m68ki_fake_pull_16(mc68kcpu); /* $0e: wb3s */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26600 m68ki_fake_pull_16(mc68kcpu); /* $10: wb2s */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26601 m68ki_fake_pull_16(mc68kcpu); /* $12: wb1s */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26602 m68ki_fake_pull_32(mc68kcpu); /* $14: data fault address */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26603 m68ki_fake_pull_32(mc68kcpu); /* $18: wb3a */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26604 m68ki_fake_pull_32(mc68kcpu); /* $1c: wb3d */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26605 m68ki_fake_pull_32(mc68kcpu); /* $20: wb2a */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26606 m68ki_fake_pull_32(mc68kcpu); /* $24: wb2d */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26607 m68ki_fake_pull_32(mc68kcpu); /* $28: wb1a */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26608 m68ki_fake_pull_32(mc68kcpu); /* $2c: wb1d/pd0 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26609 m68ki_fake_pull_32(mc68kcpu); /* $30: pd1 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26610 m68ki_fake_pull_32(mc68kcpu); /* $34: pd2 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26611 m68ki_fake_pull_32(mc68kcpu); /* $38: pd3 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26612 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26613 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26614 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26615 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26616 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26618 case 0x0a: /* Bus Error at instruction boundary */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26619 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26620 new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26621 m68ki_fake_pull_16(mc68kcpu); /* $06: format word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26622 m68ki_fake_pull_16(mc68kcpu); /* $08: internal register */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26623 m68ki_fake_pull_16(mc68kcpu); /* $0a: special status word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26624 m68ki_fake_pull_16(mc68kcpu); /* $0c: instruction pipe stage c */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26625 m68ki_fake_pull_16(mc68kcpu); /* $0e: instruction pipe stage b */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26626 m68ki_fake_pull_32(mc68kcpu); /* $10: data fault address */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26627 m68ki_fake_pull_32(mc68kcpu); /* $14: internal registers */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26628 m68ki_fake_pull_32(mc68kcpu); /* $18: data output buffer */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26629 m68ki_fake_pull_32(mc68kcpu); /* $1c: internal registers */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26631 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26632 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26633 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26634 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26635 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26636 case 0x0b: /* Bus Error - Instruction Execution in Progress */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26637 new_sr = m68ki_pull_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26638 new_pc = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26639 m68ki_fake_pull_16(mc68kcpu); /* $06: format word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26640 m68ki_fake_pull_16(mc68kcpu); /* $08: internal register */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26641 m68ki_fake_pull_16(mc68kcpu); /* $0a: special status word */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26642 m68ki_fake_pull_16(mc68kcpu); /* $0c: instruction pipe stage c */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26643 m68ki_fake_pull_16(mc68kcpu); /* $0e: instruction pipe stage b */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26644 m68ki_fake_pull_32(mc68kcpu); /* $10: data fault address */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26645 m68ki_fake_pull_32(mc68kcpu); /* $14: internal registers */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26646 m68ki_fake_pull_32(mc68kcpu); /* $18: data output buffer */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26647 m68ki_fake_pull_32(mc68kcpu); /* $1c: internal registers */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26648 m68ki_fake_pull_32(mc68kcpu); /* $20: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26649 m68ki_fake_pull_32(mc68kcpu); /* $24: stage B address */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26650 m68ki_fake_pull_32(mc68kcpu); /* $28: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26651 m68ki_fake_pull_32(mc68kcpu); /* $2c: data input buffer */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26652 m68ki_fake_pull_32(mc68kcpu); /* $30: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26653 m68ki_fake_pull_16(mc68kcpu); /* $34: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26654 m68ki_fake_pull_16(mc68kcpu); /* $36: version #, internal information */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26655 m68ki_fake_pull_32(mc68kcpu); /* $38: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26656 m68ki_fake_pull_32(mc68kcpu); /* $3c: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26657 m68ki_fake_pull_32(mc68kcpu); /* $40: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26658 m68ki_fake_pull_32(mc68kcpu); /* $44: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26659 m68ki_fake_pull_32(mc68kcpu); /* $48: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26660 m68ki_fake_pull_32(mc68kcpu); /* $4c: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26661 m68ki_fake_pull_32(mc68kcpu); /* $50: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26662 m68ki_fake_pull_32(mc68kcpu); /* $54: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26663 m68ki_fake_pull_32(mc68kcpu); /* $58: */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26664
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26665 m68ki_jump((mc68kcpu), new_pc);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26666 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26667 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26668 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26669 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26670 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26671 /* Not handling long or short bus fault */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26672 (mc68kcpu)->instr_mode = INSTRUCTION_YES;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26673 (mc68kcpu)->run_mode = RUN_MODE_NORMAL;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26674 m68ki_exception_format_error(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26675 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26677 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26678 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26679
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26680
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26681 static void m68k_op_rtm_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26682 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26683 /*if(CPU_TYPE_IS_020_VARIANT((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26684 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26685 m68ki_trace_t0(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26686 mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (rtm)\n",
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26687 (mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26688 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26689 }*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26690 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26691 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26692
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26693
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26694 static void m68k_op_rtr_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26695 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26696 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26697 m68ki_set_ccr((mc68kcpu), m68ki_pull_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26698 m68ki_jump((mc68kcpu), m68ki_pull_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26699 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26702 static void m68k_op_rts_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26703 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26704 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26705 m68ki_jump((mc68kcpu), m68ki_pull_32(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26706 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26709 static void m68k_op_sbcd_8_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26711 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26712 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26713 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26714 uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26716 // (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26717 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to assume cleared. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26719 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26720 res -= 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26721 res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26722 if(res > 0x99)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26723 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26724 res += 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26725 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26726 (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26727 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26728 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26729 (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26731 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26732
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26733 // (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26734 // (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26735 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26736
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26737 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26738 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26739
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26740
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26741 static void m68k_op_sbcd_8_mm_ax7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26742 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26743 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26744 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26745 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26746 uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26748 // (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26749 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26751 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26752 res -= 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26753 res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26754 if(res > 0x99)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26755 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26756 res += 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26757 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26758 (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26759 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26760 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26761 (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26763 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26765 // (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26766 // (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26767 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26768
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26769 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26770 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26771
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26772
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26773 static void m68k_op_sbcd_8_mm_ay7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26774 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26775 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26776 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26777 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26778 uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26780 // (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26781 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26783 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26784 res -= 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26785 res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26786 if(res > 0x99)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26787 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26788 res += 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26789 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26790 (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26791 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26792 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26793 (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26794
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26795 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26796
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26797 // (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26798 // (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26799 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26800
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26801 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26802 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26804
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26805 static void m68k_op_sbcd_8_mm_axy7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26806 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26807 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26808 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26809 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26810 uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26812 // (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26813 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26815 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26816 res -= 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26817 res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26818 if(res > 0x99)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26819 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26820 res += 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26821 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26822 (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26823 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26824 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26825 (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26827 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26828
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26829 // (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26830 // (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26831 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26832
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26833 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26834 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26836
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26837 static void m68k_op_sbcd_8_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26838 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26839 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26840 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26841 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26842 uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26843
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26844 // (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26845 (mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26847 if(res > 9)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26848 res -= 6;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26849 res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26850 if(res > 0x99)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26851 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26852 res += 0xa0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26853 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SET;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26854 (mc68kcpu)->n_flag = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26855 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26856 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26857 (mc68kcpu)->n_flag = (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26858
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26859 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26861 // (mc68kcpu)->v_flag &= res; /* Undefined V behavior part II */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26862 // (mc68kcpu)->n_flag = NFLAG_8(res); /* Undefined N behavior */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26863 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26864
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26865 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26866 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26868
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26869 static void m68k_op_st_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26870 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26871 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26872 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26873
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26875 static void m68k_op_st_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26876 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26877 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26878 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26880
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26881 static void m68k_op_st_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26882 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26883 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26884 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26885
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26887 static void m68k_op_st_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26888 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26889 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26890 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26891
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26892
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26893 static void m68k_op_st_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26894 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26895 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26896 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26897
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26898
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26899 static void m68k_op_st_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26900 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26901 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26902 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26904
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26905 static void m68k_op_st_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26906 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26907 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26908 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26910
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26911 static void m68k_op_st_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26912 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26913 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26914 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26915
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26916
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26917 static void m68k_op_st_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26918 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26919 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26920 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26922
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26923 static void m68k_op_st_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26924 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26925 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26926 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26927
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26928
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26929 static void m68k_op_sf_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26930 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26931 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26932 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26933
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26934
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26935 static void m68k_op_sf_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26936 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26937 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26938 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26940
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26941 static void m68k_op_sf_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26942 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26943 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26944 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26945
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26947 static void m68k_op_sf_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26948 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26949 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26951
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26952
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26953 static void m68k_op_sf_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26954 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26955 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26956 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26959 static void m68k_op_sf_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26960 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26961 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26962 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26963
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26965 static void m68k_op_sf_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26966 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26967 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26968 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26969
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26970
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26971 static void m68k_op_sf_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26972 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26973 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26974 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26975
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26977 static void m68k_op_sf_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26978 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26979 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26980 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26981
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26983 static void m68k_op_sf_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26984 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26985 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26986 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26988
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26989 static void m68k_op_shi_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26990 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26991 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26992 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26993 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26994 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26995 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26996 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26997 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26998 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26999
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27001 static void m68k_op_sls_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27002 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27003 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27004 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27005 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27006 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27007 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27008 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27009 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27010 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27011
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27012
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27013 static void m68k_op_scc_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27014 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27015 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27016 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27017 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27018 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27019 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27020 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27021 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27022 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27024
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27025 static void m68k_op_scs_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27026 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27027 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27028 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27029 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27030 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27031 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27032 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27033 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27034 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27037 static void m68k_op_sne_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27038 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27039 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27040 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27041 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27042 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27043 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27044 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27045 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27046 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27047
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27049 static void m68k_op_seq_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27050 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27051 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27052 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27053 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27054 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27055 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27056 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27057 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27058 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27060
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27061 static void m68k_op_svc_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27062 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27063 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27064 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27065 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27066 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27067 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27068 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27069 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27070 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27073 static void m68k_op_svs_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27074 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27075 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27076 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27077 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27078 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27079 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27080 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27081 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27082 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27085 static void m68k_op_spl_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27086 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27087 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27088 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27089 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27090 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27091 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27092 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27093 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27094 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27095
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27096
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27097 static void m68k_op_smi_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27098 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27099 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27100 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27101 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27102 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27103 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27104 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27105 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27106 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27108
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27109 static void m68k_op_sge_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27110 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27111 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27112 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27113 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27114 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27115 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27116 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27117 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27118 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27120
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27121 static void m68k_op_slt_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27122 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27123 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27124 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27125 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27126 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27127 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27128 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27129 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27130 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27132
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27133 static void m68k_op_sgt_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27134 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27135 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27136 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27137 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27138 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27139 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27140 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27141 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27142 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27144
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27145 static void m68k_op_sle_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27146 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27147 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27148 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27149 DY(mc68kcpu) |= 0xff;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27150 (mc68kcpu)->c.current_cycle += (mc68kcpu)->cyc_scc_r_true;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27151 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27152 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27153 DY(mc68kcpu) &= 0xffffff00;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27154 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27155
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27157 static void m68k_op_shi_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27158 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27159 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27160 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27161
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27163 static void m68k_op_shi_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27164 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27165 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27166 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27168
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27169 static void m68k_op_shi_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27170 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27171 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27172 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27175 static void m68k_op_shi_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27176 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27177 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27178 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27180
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27181 static void m68k_op_shi_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27182 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27183 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27184 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27185
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27186
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27187 static void m68k_op_shi_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27188 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27189 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27190 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27191
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27192
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27193 static void m68k_op_shi_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27194 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27195 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27196 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27197
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27198
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27199 static void m68k_op_shi_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27200 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27201 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27202 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27203
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27204
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27205 static void m68k_op_shi_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27206 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27207 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_HI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27208 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27209
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27211 static void m68k_op_sls_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27212 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27213 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27214 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27217 static void m68k_op_sls_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27218 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27219 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27220 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27221
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27222
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27223 static void m68k_op_sls_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27224 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27225 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27226 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27229 static void m68k_op_sls_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27230 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27231 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27232 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27233
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27234
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27235 static void m68k_op_sls_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27236 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27237 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27238 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27240
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27241 static void m68k_op_sls_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27242 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27243 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27244 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27247 static void m68k_op_sls_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27248 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27249 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27250 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27251
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27252
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27253 static void m68k_op_sls_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27254 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27255 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27256 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27257
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27259 static void m68k_op_sls_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27260 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27261 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_LS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27262 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27263
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27265 static void m68k_op_scc_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27266 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27267 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27268 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27269
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27270
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27271 static void m68k_op_scc_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27272 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27273 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27274 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27276
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27277 static void m68k_op_scc_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27278 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27279 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27280 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27283 static void m68k_op_scc_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27284 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27285 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27286 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27289 static void m68k_op_scc_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27290 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27291 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27292 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27295 static void m68k_op_scc_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27296 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27297 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27298 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27300
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27301 static void m68k_op_scc_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27302 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27303 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27304 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27305
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27306
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27307 static void m68k_op_scc_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27308 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27309 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27310 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27311
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27312
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27313 static void m68k_op_scc_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27314 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27315 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_CC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27316 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27317
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27318
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27319 static void m68k_op_scs_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27320 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27321 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27322 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27325 static void m68k_op_scs_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27326 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27327 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27328 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27329
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27331 static void m68k_op_scs_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27332 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27333 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27334 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27336
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27337 static void m68k_op_scs_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27338 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27339 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27340 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27343 static void m68k_op_scs_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27344 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27345 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27346 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27347
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27348
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27349 static void m68k_op_scs_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27350 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27351 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27352 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27353
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27354
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27355 static void m68k_op_scs_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27356 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27357 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27358 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27360
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27361 static void m68k_op_scs_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27362 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27363 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27364 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27365
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27367 static void m68k_op_scs_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27368 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27369 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_CS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27370 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27373 static void m68k_op_sne_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27374 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27375 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27376 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27377
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27379 static void m68k_op_sne_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27380 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27381 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27382 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27383
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27384
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27385 static void m68k_op_sne_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27386 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27387 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27388 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27390
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27391 static void m68k_op_sne_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27392 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27393 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27394 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27395
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27396
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27397 static void m68k_op_sne_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27398 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27399 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27400 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27401
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27402
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27403 static void m68k_op_sne_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27404 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27405 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27406 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27407
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27408
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27409 static void m68k_op_sne_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27410 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27411 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27412 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27413
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27414
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27415 static void m68k_op_sne_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27416 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27417 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27418 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27420
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27421 static void m68k_op_sne_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27422 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27423 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_NE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27424 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27425
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27427 static void m68k_op_seq_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27428 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27429 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27430 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27431
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27432
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27433 static void m68k_op_seq_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27434 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27435 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27436 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27437
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27439 static void m68k_op_seq_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27440 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27441 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27442 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27443
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27444
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27445 static void m68k_op_seq_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27446 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27447 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27448 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27449
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27451 static void m68k_op_seq_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27452 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27453 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27454 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27456
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27457 static void m68k_op_seq_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27458 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27459 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27460 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27463 static void m68k_op_seq_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27464 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27465 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27466 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27468
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27469 static void m68k_op_seq_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27470 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27471 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27472 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27473
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27475 static void m68k_op_seq_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27476 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27477 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_EQ(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27478 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27479
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27480
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27481 static void m68k_op_svc_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27482 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27483 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27484 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27485
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27486
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27487 static void m68k_op_svc_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27488 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27489 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27490 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27491
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27493 static void m68k_op_svc_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27494 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27495 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27496 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27497
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27498
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27499 static void m68k_op_svc_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27500 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27501 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27502 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27504
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27505 static void m68k_op_svc_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27506 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27507 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27508 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27509
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27511 static void m68k_op_svc_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27512 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27513 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27514 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27516
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27517 static void m68k_op_svc_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27518 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27519 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27520 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27521
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27523 static void m68k_op_svc_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27524 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27525 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27526 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27527
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27528
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27529 static void m68k_op_svc_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27530 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27531 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_VC(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27532 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27533
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27534
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27535 static void m68k_op_svs_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27536 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27537 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27538 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27539
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27540
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27541 static void m68k_op_svs_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27542 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27543 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27544 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27545
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27547 static void m68k_op_svs_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27548 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27549 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27550 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27551
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27552
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27553 static void m68k_op_svs_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27554 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27555 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27556 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27557
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27558
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27559 static void m68k_op_svs_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27560 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27561 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27562 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27564
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27565 static void m68k_op_svs_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27566 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27567 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27568 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27569
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27570
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27571 static void m68k_op_svs_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27572 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27573 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27574 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27576
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27577 static void m68k_op_svs_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27578 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27579 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27580 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27581
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27583 static void m68k_op_svs_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27584 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27585 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_VS(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27586 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27589 static void m68k_op_spl_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27590 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27591 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27592 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27593
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27595 static void m68k_op_spl_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27596 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27597 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27598 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27599
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27600
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27601 static void m68k_op_spl_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27602 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27603 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27604 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27607 static void m68k_op_spl_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27608 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27609 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27610 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27612
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27613 static void m68k_op_spl_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27614 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27615 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27616 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27617
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27619 static void m68k_op_spl_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27620 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27621 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27622 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27623
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27625 static void m68k_op_spl_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27626 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27627 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27628 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27629
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27631 static void m68k_op_spl_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27632 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27633 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27634 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27635
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27637 static void m68k_op_spl_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27638 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27639 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_PL(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27640 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27641
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27643 static void m68k_op_smi_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27644 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27645 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27646 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27648
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27649 static void m68k_op_smi_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27650 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27651 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27652 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27653
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27655 static void m68k_op_smi_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27656 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27657 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27658 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27660
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27661 static void m68k_op_smi_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27662 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27663 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27664 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27665
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27667 static void m68k_op_smi_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27668 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27669 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27670 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27672
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27673 static void m68k_op_smi_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27674 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27675 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27676 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27677
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27679 static void m68k_op_smi_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27680 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27681 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27682 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27683
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27684
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27685 static void m68k_op_smi_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27686 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27687 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27688 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27689
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27691 static void m68k_op_smi_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27692 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27693 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_MI(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27694 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27695
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27696
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27697 static void m68k_op_sge_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27698 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27699 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27700 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27702
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27703 static void m68k_op_sge_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27704 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27705 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27706 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27708
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27709 static void m68k_op_sge_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27710 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27711 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27712 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27713
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27715 static void m68k_op_sge_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27716 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27717 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27718 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27719
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27720
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27721 static void m68k_op_sge_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27722 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27723 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27727 static void m68k_op_sge_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27728 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27729 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27730 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27731
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27732
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27733 static void m68k_op_sge_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27734 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27735 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27736 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27737
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27738
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27739 static void m68k_op_sge_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27740 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27741 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27742 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27744
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27745 static void m68k_op_sge_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27746 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27747 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_GE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27748 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27751 static void m68k_op_slt_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27752 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27753 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27754 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27756
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27757 static void m68k_op_slt_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27758 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27759 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27760 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27761
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27763 static void m68k_op_slt_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27764 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27765 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27766 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27767
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27768
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27769 static void m68k_op_slt_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27770 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27771 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27772 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27773
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27774
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27775 static void m68k_op_slt_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27776 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27777 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27778 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27781 static void m68k_op_slt_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27782 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27783 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27784 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27785
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27786
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27787 static void m68k_op_slt_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27788 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27789 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27790 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27792
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27793 static void m68k_op_slt_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27794 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27795 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27796 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27799 static void m68k_op_slt_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27800 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27801 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_LT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27802 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27804
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27805 static void m68k_op_sgt_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27806 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27807 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27808 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27809
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27810
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27811 static void m68k_op_sgt_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27812 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27813 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27814 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27815
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27816
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27817 static void m68k_op_sgt_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27818 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27819 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27820 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27821
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27822
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27823 static void m68k_op_sgt_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27824 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27825 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27826 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27828
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27829 static void m68k_op_sgt_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27830 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27831 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27832 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27833
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27835 static void m68k_op_sgt_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27836 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27837 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27838 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27840
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27841 static void m68k_op_sgt_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27842 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27843 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27844 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27847 static void m68k_op_sgt_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27848 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27849 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27850 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27852
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27853 static void m68k_op_sgt_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27854 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27855 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_GT(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27856 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27857
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27858
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27859 static void m68k_op_sle_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27860 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27861 m68ki_write_8((mc68kcpu), EA_AY_AI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27862 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27863
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27864
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27865 static void m68k_op_sle_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27866 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27867 m68ki_write_8((mc68kcpu), EA_AY_PI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27868 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27869
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27870
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27871 static void m68k_op_sle_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27872 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27873 m68ki_write_8((mc68kcpu), EA_A7_PI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27874 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27875
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27876
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27877 static void m68k_op_sle_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27878 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27879 m68ki_write_8((mc68kcpu), EA_AY_PD_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27880 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27881
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27883 static void m68k_op_sle_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27884 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27885 m68ki_write_8((mc68kcpu), EA_A7_PD_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27886 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27888
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27889 static void m68k_op_sle_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27890 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27891 m68ki_write_8((mc68kcpu), EA_AY_DI_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27892 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27895 static void m68k_op_sle_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27896 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27897 m68ki_write_8((mc68kcpu), EA_AY_IX_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27898 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27900
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27901 static void m68k_op_sle_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27902 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27903 m68ki_write_8((mc68kcpu), EA_AW_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27904 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27905
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27906
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27907 static void m68k_op_sle_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27908 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27909 m68ki_write_8((mc68kcpu), EA_AL_8(mc68kcpu), COND_LE(mc68kcpu) ? 0xff : 0);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27910 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27912
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27913 static void m68k_op_stop(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27914 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27915 if((mc68kcpu)->s_flag)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27916 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27917 uint32_t new_sr = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27918 m68ki_trace_t0(mc68kcpu); /* auto-disable (see m68kcpu.h) */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27919 (mc68kcpu)->stopped |= STOP_LEVEL_STOP;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27920 m68ki_set_sr((mc68kcpu), new_sr);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27921 (mc68kcpu)->c.current_cycle = (mc68kcpu)->c.target_cycle;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27922 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27923 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27924 m68ki_exception_privilege_violation(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27925 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27927
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27928 static void m68k_op_sub_8_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27929 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27930 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27931 uint32_t src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27932 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27933 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27934
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27935 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27936 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27937 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27938 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27940 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27941 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27942
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27944 static void m68k_op_sub_8_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27945 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27946 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27947 uint32_t src = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27948 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27949 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27950
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27951 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27952 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27953 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27954 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27955
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27956 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27957 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27959
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27960 static void m68k_op_sub_8_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27961 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27962 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27963 uint32_t src = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27964 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27965 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27966
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27967 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27968 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27969 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27970 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27971
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27972 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27973 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27974
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27975
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27976 static void m68k_op_sub_8_er_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27977 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27978 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27979 uint32_t src = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27980 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27981 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27983 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27984 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27985 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27986 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27987
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27988 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27989 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27991
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27992 static void m68k_op_sub_8_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27993 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27994 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27995 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27996 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27997 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27998
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27999 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28000 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28001 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28002 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28003
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28004 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28005 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28006
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28007
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28008 static void m68k_op_sub_8_er_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28009 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28010 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28011 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28012 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28013 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28015 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28016 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28017 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28018 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28020 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28021 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28022
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28024 static void m68k_op_sub_8_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28025 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28026 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28027 uint32_t src = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28028 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28029 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28030
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28031 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28032 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28033 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28034 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28036 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28037 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28038
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28039
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28040 static void m68k_op_sub_8_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28041 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28042 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28043 uint32_t src = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28044 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28045 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28047 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28048 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28049 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28050 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28052 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28053 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28054
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28056 static void m68k_op_sub_8_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28057 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28058 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28059 uint32_t src = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28060 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28061 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28063 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28064 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28065 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28066 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28067
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28068 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28069 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28070
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28072 static void m68k_op_sub_8_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28073 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28074 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28075 uint32_t src = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28076 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28077 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28078
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28079 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28080 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28081 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28082 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28083
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28084 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28085 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28087
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28088 static void m68k_op_sub_8_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28089 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28090 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28091 uint32_t src = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28092 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28093 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28094
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28095 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28096 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28097 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28098 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28100 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28101 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28102
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28103
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28104 static void m68k_op_sub_8_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28105 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28106 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28107 uint32_t src = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28108 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28109 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28110
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28111 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28112 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28113 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28114 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28115
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28116 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28117 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28120 static void m68k_op_sub_8_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28121 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28122 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28123 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28124 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28125 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28126
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28127 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28128 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28129 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28130 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28132 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28133 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28135
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28136 static void m68k_op_sub_16_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28137 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28138 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28139 uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28140 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28141 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28142
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28143 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28144 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28145 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28146 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28148 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28149 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28150
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28151
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28152 static void m68k_op_sub_16_er_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28153 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28154 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28155 uint32_t src = MASK_OUT_ABOVE_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28156 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28157 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28158
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28159 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28160 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28161 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28162 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28163
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28164 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28165 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28166
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28168 static void m68k_op_sub_16_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28169 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28170 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28171 uint32_t src = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28172 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28173 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28174
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28175 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28176 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28177 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28178 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28180 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28181 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28182
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28183
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28184 static void m68k_op_sub_16_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28185 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28186 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28187 uint32_t src = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28188 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28189 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28190
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28191 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28192 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28193 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28194 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28196 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28197 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28198
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28200 static void m68k_op_sub_16_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28201 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28202 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28203 uint32_t src = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28204 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28205 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28207 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28208 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28209 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28210 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28212 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28213 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28214
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28216 static void m68k_op_sub_16_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28217 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28218 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28219 uint32_t src = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28220 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28221 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28222
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28223 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28224 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28225 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28226 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28228 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28229 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28230
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28232 static void m68k_op_sub_16_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28233 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28234 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28235 uint32_t src = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28236 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28237 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28239 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28240 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28241 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28242 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28244 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28245 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28246
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28247
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28248 static void m68k_op_sub_16_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28249 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28250 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28251 uint32_t src = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28252 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28253 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28254
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28255 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28256 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28257 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28258 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28260 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28261 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28262
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28263
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28264 static void m68k_op_sub_16_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28265 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28266 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28267 uint32_t src = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28268 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28269 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28270
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28271 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28272 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28273 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28274 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28276 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28277 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28278
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28279
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28280 static void m68k_op_sub_16_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28281 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28282 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28283 uint32_t src = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28284 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28285 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28287 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28288 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28289 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28290 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28292 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28293 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28295
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28296 static void m68k_op_sub_16_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28297 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28298 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28299 uint32_t src = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28300 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28301 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28302
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28303 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28304 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28305 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28306 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28308 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28309 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28310
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28311
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28312 static void m68k_op_sub_16_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28313 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28314 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28315 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28316 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28317 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28318
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28319 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28320 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28321 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28322 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28324 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28325 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28326
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28327
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28328 static void m68k_op_sub_32_er_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28329 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28330 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28331 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28332 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28333 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28334
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28335 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28336 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28337 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28338 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28339
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28340 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28341 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28342
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28343
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28344 static void m68k_op_sub_32_er_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28345 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28346 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28347 uint32_t src = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28348 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28349 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28351 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28352 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28353 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28354 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28356 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28357 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28358
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28359
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28360 static void m68k_op_sub_32_er_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28361 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28362 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28363 uint32_t src = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28364 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28365 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28366
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28367 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28368 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28369 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28370 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28372 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28373 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28374
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28375
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28376 static void m68k_op_sub_32_er_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28377 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28378 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28379 uint32_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28380 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28381 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28383 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28384 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28385 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28386 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28388 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28389 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28390
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28391
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28392 static void m68k_op_sub_32_er_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28393 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28394 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28395 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28396 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28397 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28398
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28399 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28400 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28401 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28402 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28404 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28405 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28406
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28407
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28408 static void m68k_op_sub_32_er_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28409 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28410 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28411 uint32_t src = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28412 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28413 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28414
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28415 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28416 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28417 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28418 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28420 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28421 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28423
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28424 static void m68k_op_sub_32_er_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28425 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28426 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28427 uint32_t src = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28428 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28429 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28430
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28431 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28432 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28433 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28434 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28436 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28437 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28439
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28440 static void m68k_op_sub_32_er_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28441 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28442 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28443 uint32_t src = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28444 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28445 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28446
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28447 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28448 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28449 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28450 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28452 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28453 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28454
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28455
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28456 static void m68k_op_sub_32_er_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28457 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28458 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28459 uint32_t src = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28460 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28461 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28462
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28463 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28464 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28465 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28466 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28468 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28469 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28470
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28471
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28472 static void m68k_op_sub_32_er_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28473 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28474 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28475 uint32_t src = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28476 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28477 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28478
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28479 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28480 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28481 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28482 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28484 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28485 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28486
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28487
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28488 static void m68k_op_sub_32_er_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28489 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28490 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28491 uint32_t src = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28492 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28493 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28494
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28495 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28496 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28497 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28498 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28500 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28501 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28502
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28504 static void m68k_op_sub_32_er_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28505 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28506 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28507 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28508 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28509 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28510
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28511 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28512 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28513 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28514 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28516 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28517 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28518
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28519
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28520 static void m68k_op_sub_8_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28521 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28522 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28523 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28524 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28525 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28526
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28527 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28528 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28529 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28530 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28532 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28534
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28535
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28536 static void m68k_op_sub_8_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28537 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28538 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28539 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28540 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28541 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28543 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28544 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28545 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28546 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28548 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28549 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28550
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28551
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28552 static void m68k_op_sub_8_re_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28553 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28554 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28555 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28556 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28557 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28558
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28559 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28560 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28561 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28562 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28564 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28565 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28566
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28567
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28568 static void m68k_op_sub_8_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28569 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28570 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28571 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28572 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28573 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28574
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28575 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28576 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28577 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28578 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28579
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28580 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28581 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28582
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28583
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28584 static void m68k_op_sub_8_re_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28585 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28586 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28587 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28588 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28589 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28590
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28591 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28592 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28593 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28594 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28596 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28597 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28598
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28599
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28600 static void m68k_op_sub_8_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28601 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28602 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28603 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28604 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28605 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28606
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28607 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28608 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28609 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28610 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28612 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28613 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28614
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28616 static void m68k_op_sub_8_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28617 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28618 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28619 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28620 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28621 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28623 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28624 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28625 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28626 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28627
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28628 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28629 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28631
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28632 static void m68k_op_sub_8_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28633 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28634 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28635 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28636 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28637 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28638
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28639 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28640 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28641 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28642 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28644 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28645 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28646
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28648 static void m68k_op_sub_8_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28649 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28650 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28651 uint32_t src = MASK_OUT_ABOVE_8(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28652 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28653 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28654
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28655 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28656 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28657 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28658 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28660 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28661 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28662
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28663
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28664 static void m68k_op_sub_16_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28665 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28666 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28667 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28668 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28669 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28670
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28671 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28672 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28673 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28674 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28675
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28676 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28677 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28678
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28679
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28680 static void m68k_op_sub_16_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28681 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28682 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28683 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28684 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28685 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28686
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28687 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28688 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28689 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28690 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28692 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28693 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28694
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28695
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28696 static void m68k_op_sub_16_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28697 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28698 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28699 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28700 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28701 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28702
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28703 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28704 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28705 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28706 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28707
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28708 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28709 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28710
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28712 static void m68k_op_sub_16_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28713 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28714 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28715 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28716 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28717 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28719 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28720 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28721 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28722 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28723
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28724 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28725 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28727
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28728 static void m68k_op_sub_16_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28729 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28730 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28731 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28732 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28733 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28734
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28735 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28736 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28737 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28738 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28739
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28740 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28741 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28742
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28744 static void m68k_op_sub_16_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28745 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28746 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28747 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28748 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28749 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28750
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28751 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28752 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28753 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28754 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28755
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28756 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28757 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28758
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28759
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28760 static void m68k_op_sub_16_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28761 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28762 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28763 uint32_t src = MASK_OUT_ABOVE_16(DX(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28764 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28765 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28766
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28767 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28768 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28769 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28770 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28771
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28772 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28773 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28774
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28775
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28776 static void m68k_op_sub_32_re_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28777 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28778 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28779 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28780 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28781 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28782
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28783 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28784 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28785 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28786 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28787
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28788 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28789 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28790
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28792 static void m68k_op_sub_32_re_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28793 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28794 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28795 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28796 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28797 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28798
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28799 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28800 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28801 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28802 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28803
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28804 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28805 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28806
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28807
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28808 static void m68k_op_sub_32_re_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28809 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28810 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28811 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28812 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28813 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28814
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28815 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28816 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28817 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28818 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28819
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28820 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28821 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28822
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28823
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28824 static void m68k_op_sub_32_re_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28825 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28826 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28827 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28828 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28829 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28830
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28831 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28832 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28833 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28834 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28836 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28837 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28838
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28839
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28840 static void m68k_op_sub_32_re_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28841 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28842 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28843 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28844 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28845 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28846
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28847 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28848 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28849 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28850 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28852 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28853 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28854
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28855
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28856 static void m68k_op_sub_32_re_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28857 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28858 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28859 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28860 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28861 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28862
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28863 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28864 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28865 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28866 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28868 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28869 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28870
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28871
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28872 static void m68k_op_sub_32_re_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28873 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28874 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28875 uint32_t src = DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28876 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28877 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28878
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28879 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28880 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28881 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28882 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28884 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28885 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28886
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28887
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28888 static void m68k_op_suba_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28889 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28890 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28891
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28892 *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(DY(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28893 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28894
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28896 static void m68k_op_suba_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28897 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28898 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28900 *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(AY(mc68kcpu)));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28901 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28902
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28903
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28904 static void m68k_op_suba_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28905 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28906 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28907 uint32_t src = MAKE_INT_16(OPER_AY_AI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28908
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28909 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28910 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28912
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28913 static void m68k_op_suba_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28914 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28915 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28916 uint32_t src = MAKE_INT_16(OPER_AY_PI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28917
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28918 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28919 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28920
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28921
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28922 static void m68k_op_suba_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28923 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28924 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28925 uint32_t src = MAKE_INT_16(OPER_AY_PD_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28926
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28927 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28928 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28929
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28930
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28931 static void m68k_op_suba_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28932 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28933 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28934 uint32_t src = MAKE_INT_16(OPER_AY_DI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28935
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28936 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28937 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28939
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28940 static void m68k_op_suba_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28941 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28942 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28943 uint32_t src = MAKE_INT_16(OPER_AY_IX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28944
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28945 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28946 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28948
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28949 static void m68k_op_suba_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28950 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28951 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28952 uint32_t src = MAKE_INT_16(OPER_AW_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28953
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28954 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28955 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28956
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28958 static void m68k_op_suba_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28959 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28960 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28961 uint32_t src = MAKE_INT_16(OPER_AL_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28962
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28963 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28964 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28966
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28967 static void m68k_op_suba_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28968 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28969 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28970 uint32_t src = MAKE_INT_16(OPER_PCDI_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28971
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28972 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28973 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28974
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28975
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28976 static void m68k_op_suba_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28977 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28978 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28979 uint32_t src = MAKE_INT_16(OPER_PCIX_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28980
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28981 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28982 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28984
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28985 static void m68k_op_suba_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28986 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28987 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28988 uint32_t src = MAKE_INT_16(OPER_I_16(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28990 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28991 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28992
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28993
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28994 static void m68k_op_suba_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28995 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28996 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28998 *r_dst = MASK_OUT_ABOVE_32(*r_dst - DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28999 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29001
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29002 static void m68k_op_suba_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29003 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29004 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29006 *r_dst = MASK_OUT_ABOVE_32(*r_dst - AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29007 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29009
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29010 static void m68k_op_suba_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29011 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29012 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29013 uint32_t src = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29014
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29015 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29016 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29017
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29019 static void m68k_op_suba_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29020 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29021 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29022 uint32_t src = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29023
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29024 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29025 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29027
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29028 static void m68k_op_suba_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29029 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29030 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29031 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29032
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29033 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29034 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29037 static void m68k_op_suba_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29038 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29039 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29040 uint32_t src = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29042 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29043 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29044
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29045
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29046 static void m68k_op_suba_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29047 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29048 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29049 uint32_t src = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29050
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29051 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29052 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29053
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29054
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29055 static void m68k_op_suba_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29056 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29057 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29058 uint32_t src = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29059
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29060 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29061 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29064 static void m68k_op_suba_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29065 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29066 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29067 uint32_t src = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29068
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29069 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29070 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29071
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29073 static void m68k_op_suba_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29074 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29075 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29076 uint32_t src = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29077
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29078 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29079 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29080
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29081
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29082 static void m68k_op_suba_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29083 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29084 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29085 uint32_t src = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29087 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29088 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29089
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29091 static void m68k_op_suba_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29092 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29093 uint32_t* r_dst = &AX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29094 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29095
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29096 *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29097 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29099
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29100 static void m68k_op_subi_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29101 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29102 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29103 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29104 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29105 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29106
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29107 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29108 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29109 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29110 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29111
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29112 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29113 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29114
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29115
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29116 static void m68k_op_subi_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29117 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29118 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29119 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29120 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29121 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29123 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29124 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29125 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29126 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29128 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29129 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29130
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29131
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29132 static void m68k_op_subi_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29133 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29134 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29135 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29136 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29137 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29138
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29139 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29140 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29141 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29142 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29143
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29144 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29145 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29146
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29148 static void m68k_op_subi_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29149 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29150 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29151 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29152 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29153 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29154
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29155 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29156 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29157 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29158 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29159
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29160 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29161 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29163
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29164 static void m68k_op_subi_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29165 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29166 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29167 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29168 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29169 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29170
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29171 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29172 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29173 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29174 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29175
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29176 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29177 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29178
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29180 static void m68k_op_subi_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29181 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29182 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29183 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29184 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29185 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29186
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29187 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29188 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29189 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29190 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29191
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29192 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29193 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29194
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29195
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29196 static void m68k_op_subi_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29197 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29198 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29199 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29200 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29201 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29202
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29203 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29204 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29205 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29206 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29207
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29208 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29209 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29210
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29212 static void m68k_op_subi_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29213 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29214 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29215 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29216 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29217 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29218
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29219 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29220 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29221 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29222 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29224 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29225 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29226
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29228 static void m68k_op_subi_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29229 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29230 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29231 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29232 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29233 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29234
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29235 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29236 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29237 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29238 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29239
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29240 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29241 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29242
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29243
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29244 static void m68k_op_subi_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29245 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29246 uint32_t src = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29247 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29248 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29249 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29251 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29252 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29253 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29254 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29255
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29256 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29257 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29258
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29260 static void m68k_op_subi_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29261 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29262 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29263 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29264 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29265 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29267 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29268 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29269 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29270 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29271
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29272 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29273 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29274
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29276 static void m68k_op_subi_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29277 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29278 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29279 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29280 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29281 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29283 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29284 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29285 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29286 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29287
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29288 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29289 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29290
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29291
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29292 static void m68k_op_subi_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29293 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29294 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29295 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29296 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29297 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29298
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29299 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29300 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29301 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29302 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29303
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29304 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29305 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29306
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29307
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29308 static void m68k_op_subi_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29309 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29310 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29311 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29312 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29313 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29314
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29315 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29316 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29317 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29318 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29319
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29320 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29321 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29322
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29323
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29324 static void m68k_op_subi_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29325 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29326 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29327 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29328 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29329 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29330
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29331 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29332 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29333 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29334 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29335
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29336 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29337 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29338
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29339
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29340 static void m68k_op_subi_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29341 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29342 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29343 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29344 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29345 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29346
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29347 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29348 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29349 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29350 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29352 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29353 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29354
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29355
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29356 static void m68k_op_subi_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29357 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29358 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29359 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29360 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29361 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29362
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29363 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29364 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29365 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29366 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29367
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29368 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29369 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29370
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29371
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29372 static void m68k_op_subi_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29373 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29374 uint32_t src = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29375 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29376 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29377 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29379 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29380 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29381 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29382 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29383
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29384 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29385 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29386
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29387
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29388 static void m68k_op_subi_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29389 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29390 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29391 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29392 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29393 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29395 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29396 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29397 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29398 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29399
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29400 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29401 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29402
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29403
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29404 static void m68k_op_subi_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29405 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29406 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29407 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29408 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29409 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29410
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29411 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29412 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29413 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29414 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29415
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29416 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29417 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29418
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29419
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29420 static void m68k_op_subi_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29421 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29422 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29423 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29424 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29425 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29426
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29427 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29428 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29429 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29430 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29431
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29432 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29433 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29434
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29435
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29436 static void m68k_op_subi_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29437 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29438 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29439 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29440 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29441 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29442
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29443 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29444 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29445 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29446 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29447
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29448 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29449 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29450
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29452 static void m68k_op_subi_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29453 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29454 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29455 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29456 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29457 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29458
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29459 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29460 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29461 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29462 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29463
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29464 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29465 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29466
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29468 static void m68k_op_subi_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29469 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29470 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29471 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29472 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29473 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29474
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29475 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29476 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29477 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29478 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29479
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29480 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29481 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29482
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29484 static void m68k_op_subi_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29485 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29486 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29487 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29488 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29489 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29490
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29491 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29492 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29493 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29494 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29495
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29496 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29497 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29498
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29500 static void m68k_op_subi_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29501 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29502 uint32_t src = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29503 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29504 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29505 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29506
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29507 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29508 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29509 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29510 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29511
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29512 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29513 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29514
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29515
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29516 static void m68k_op_subq_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29517 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29518 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29519 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29520 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29521 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29523 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29524 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29525 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29526 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29527
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29528 *r_dst = MASK_OUT_BELOW_8(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29529 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29530
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29532 static void m68k_op_subq_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29533 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29534 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29535 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29536 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29537 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29538
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29539 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29540 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29541 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29542 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29543
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29544 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29545 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29546
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29547
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29548 static void m68k_op_subq_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29549 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29550 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29551 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29552 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29553 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29554
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29555 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29556 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29557 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29558 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29559
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29560 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29561 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29562
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29563
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29564 static void m68k_op_subq_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29565 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29566 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29567 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29568 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29569 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29570
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29571 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29572 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29573 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29574 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29575
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29576 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29577 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29578
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29579
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29580 static void m68k_op_subq_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29581 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29582 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29583 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29584 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29585 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29586
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29587 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29588 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29589 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29590 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29591
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29592 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29593 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29594
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29595
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29596 static void m68k_op_subq_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29597 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29598 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29599 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29600 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29601 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29602
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29603 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29604 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29605 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29606 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29608 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29609 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29612 static void m68k_op_subq_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29613 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29614 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29615 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29616 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29617 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29619 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29620 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29621 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29622 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29623
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29624 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29625 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29626
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29627
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29628 static void m68k_op_subq_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29629 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29630 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29631 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29632 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29633 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29634
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29635 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29636 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29637 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29638 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29639
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29640 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29641 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29644 static void m68k_op_subq_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29645 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29646 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29647 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29648 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29649 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29650
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29651 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29652 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29653 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29654 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29655
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29656 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29657 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29658
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29659
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29660 static void m68k_op_subq_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29661 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29662 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29663 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29664 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29665 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29666
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29667 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29668 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29669 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29670 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29671
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29672 m68ki_write_8((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29673 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29674
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29675
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29676 static void m68k_op_subq_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29677 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29678 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29679 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29680 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29681 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29682
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29683 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29684 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29685 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29686 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29687
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29688 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29689 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29690
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29691
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29692 static void m68k_op_subq_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29693 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29694 uint32_t* r_dst = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29695
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29696 *r_dst = MASK_OUT_ABOVE_32(*r_dst - (((((mc68kcpu)->ir >> 9) - 1) & 7) + 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29697 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29698
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29699
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29700 static void m68k_op_subq_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29701 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29702 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29703 uint32_t ea = EA_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29704 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29705 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29706
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29707 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29708 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29709 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29710 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29711
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29712 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29713 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29714
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29715
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29716 static void m68k_op_subq_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29717 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29718 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29719 uint32_t ea = EA_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29720 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29721 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29722
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29723 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29724 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29725 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29726 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29727
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29728 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29729 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29731
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29732 static void m68k_op_subq_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29733 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29734 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29735 uint32_t ea = EA_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29736 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29737 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29738
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29739 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29740 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29741 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29742 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29743
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29744 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29745 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29746
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29747
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29748 static void m68k_op_subq_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29749 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29750 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29751 uint32_t ea = EA_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29752 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29753 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29754
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29755 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29756 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29757 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29758 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29759
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29760 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29761 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29762
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29763
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29764 static void m68k_op_subq_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29765 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29766 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29767 uint32_t ea = EA_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29768 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29769 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29770
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29771 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29772 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29773 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29774 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29775
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29776 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29777 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29778
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29779
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29780 static void m68k_op_subq_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29781 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29782 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29783 uint32_t ea = EA_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29784 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29785 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29786
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29787 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29788 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29789 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29790 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29791
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29792 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29793 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29794
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29795
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29796 static void m68k_op_subq_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29797 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29798 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29799 uint32_t ea = EA_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29800 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29801 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29802
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29803 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29804 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29805 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29806 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29807
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29808 m68ki_write_16((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29809 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29810
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29811
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29812 static void m68k_op_subq_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29813 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29814 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29815 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29816 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29817 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29818
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29819 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29820 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29821 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29822 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29823
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29824 *r_dst = (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29825 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29826
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29827
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29828 static void m68k_op_subq_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29829 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29830 uint32_t* r_dst = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29831
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29832 *r_dst = MASK_OUT_ABOVE_32(*r_dst - (((((mc68kcpu)->ir >> 9) - 1) & 7) + 1));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29833 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29834
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29835
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29836 static void m68k_op_subq_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29837 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29838 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29839 uint32_t ea = EA_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29840 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29841 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29842
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29843 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29844 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29845 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29846 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29847
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29848 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29849 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29850
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29851
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29852 static void m68k_op_subq_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29853 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29854 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29855 uint32_t ea = EA_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29856 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29857 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29858
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29859 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29860 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29861 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29862 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29863
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29864 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29865 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29866
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29867
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29868 static void m68k_op_subq_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29869 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29870 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29871 uint32_t ea = EA_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29872 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29873 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29874
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29875 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29876 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29877 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29878 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29879
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29880 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29881 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29882
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29883
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29884 static void m68k_op_subq_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29885 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29886 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29887 uint32_t ea = EA_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29888 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29889 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29890
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29891 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29892 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29893 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29894 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29895
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29896 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29897 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29898
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29899
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29900 static void m68k_op_subq_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29901 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29902 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29903 uint32_t ea = EA_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29904 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29905 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29906
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29907 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29908 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29909 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29910 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29911
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29912 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29913 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29914
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29915
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29916 static void m68k_op_subq_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29917 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29918 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29919 uint32_t ea = EA_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29920 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29921 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29922
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29923 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29924 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29925 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29926 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29927
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29928 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29929 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29930
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29931
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29932 static void m68k_op_subq_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29933 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29934 uint32_t src = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29935 uint32_t ea = EA_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29936 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29937 uint32_t res = dst - src;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29938
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29939 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29940 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29941 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29942 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29943
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29944 m68ki_write_32((mc68kcpu), ea, (mc68kcpu)->not_z_flag);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29945 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29946
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29947
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29948 static void m68k_op_subx_8_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29949 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29950 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29951 uint32_t src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29952 uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29953 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29954
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29955 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29956 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29957 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29958
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29959 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29960 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29961
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29962 *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29963 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29964
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29965
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29966 static void m68k_op_subx_16_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29967 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29968 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29969 uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29970 uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29971 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29972
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29973 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29974 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29975 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29976
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29977 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29978 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29979
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29980 *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29981 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29982
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29983
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29984 static void m68k_op_subx_32_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29985 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29986 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29987 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29988 uint32_t dst = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29989 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29990
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29991 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29992 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29993 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29994
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29995 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29996 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29997
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29998 *r_dst = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29999 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30000
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30001
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30002 static void m68k_op_subx_8_mm_ax7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30003 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30004 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30005 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30006 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30007 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30008
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30009 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30010 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30011 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30012
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30013 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30014 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30015
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30016 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30017 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30018
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30019
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30020 static void m68k_op_subx_8_mm_ay7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30021 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30022 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30023 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30024 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30025 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30026
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30027 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30028 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30029 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30030
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30031 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30032 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30033
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30034 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30035 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30036
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30037
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30038 static void m68k_op_subx_8_mm_axy7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30039 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30040 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30041 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30042 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30043 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30044
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30045 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30046 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30047 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30048
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30049 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30050 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30051
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30052 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30053 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30054
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30055
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30056 static void m68k_op_subx_8_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30057 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30058 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30059 uint32_t ea = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30060 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30061 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30062
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30063 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30064 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30065 (mc68kcpu)->v_flag = VFLAG_SUB_8(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30066
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30067 res = MASK_OUT_ABOVE_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30068 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30069
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30070 m68ki_write_8((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30071 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30072
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30073
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30074 static void m68k_op_subx_16_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30075 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30076 uint32_t src = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30077 uint32_t ea = EA_AX_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30078 uint32_t dst = m68ki_read_16((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30079 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30080
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30081 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30082 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30083 (mc68kcpu)->v_flag = VFLAG_SUB_16(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30084
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30085 res = MASK_OUT_ABOVE_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30086 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30087
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30088 m68ki_write_16((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30089 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30091
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30092 static void m68k_op_subx_32_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30093 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30094 uint32_t src = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30095 uint32_t ea = EA_AX_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30096 uint32_t dst = m68ki_read_32((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30097 uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30098
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30099 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30100 (mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30101 (mc68kcpu)->v_flag = VFLAG_SUB_32(src, dst, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30102
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30103 res = MASK_OUT_ABOVE_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30104 (mc68kcpu)->not_z_flag |= res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30105
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30106 m68ki_write_32((mc68kcpu), ea, res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30107 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30108
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30109
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30110 static void m68k_op_swap_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30111 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30112 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30113
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30114 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_32(*r_dst<<16);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30115 *r_dst = (*r_dst>>16) | (mc68kcpu)->not_z_flag;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30116
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30117 (mc68kcpu)->not_z_flag = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30118 (mc68kcpu)->n_flag = NFLAG_32(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30119 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30120 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30121 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30122
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30123
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30124 static void m68k_op_tas_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30125 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30126 uint32_t* r_dst = &DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30127
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30128 (mc68kcpu)->not_z_flag = MASK_OUT_ABOVE_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30129 (mc68kcpu)->n_flag = NFLAG_8(*r_dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30130 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30131 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30132 *r_dst |= 0x80;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30133 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30135
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30136 static void m68k_op_tas_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30137 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30138 uint32_t ea = EA_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30139 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30140
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30141 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30142 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30143 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30144 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30145
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30146 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30147 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30148 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30149 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30150 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30151 /* if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30152 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30153 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30154 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30155 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30157
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30158 static void m68k_op_tas_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30159 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30160 uint32_t ea = EA_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30161 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30162
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30163 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30164 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30165 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30166 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30167
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30168 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30169 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30170 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30171 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30172 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30173 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30174 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30175 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30176 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30177 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30178
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30180 static void m68k_op_tas_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30181 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30182 uint32_t ea = EA_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30183 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30184
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30185 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30186 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30187 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30188 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30190 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30191 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30192 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30193 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30194 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30195 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30196 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30197 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30198 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30199 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30200
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30201
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30202 static void m68k_op_tas_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30203 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30204 uint32_t ea = EA_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30205 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30207 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30208 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30209 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30210 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30211
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30212 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30213 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30214 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30215 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30216 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30217 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30218 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30219 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30220 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30221 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30222
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30223
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30224 static void m68k_op_tas_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30225 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30226 uint32_t ea = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30227 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30228
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30229 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30230 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30231 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30232 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30233
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30234 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30235 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30236 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30237 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30238 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30239 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30240 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30241 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30242 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30243 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30244
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30245
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30246 static void m68k_op_tas_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30247 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30248 uint32_t ea = EA_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30249 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30250
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30251 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30252 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30253 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30254 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30255
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30256 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30257 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30258 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30259 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30260 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30261 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30262 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30263 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30264 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30265 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30266
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30267
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30268 static void m68k_op_tas_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30269 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30270 uint32_t ea = EA_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30271 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30272
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30273 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30274 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30275 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30276 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30277
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30278 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30279 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30280 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30281 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30282 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30283 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30284 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30285 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30286 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30287 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30288
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30289
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30290 static void m68k_op_tas_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30291 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30292 uint32_t ea = EA_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30293 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30294
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30295 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30296 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30297 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30298 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30300 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30301 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30302 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30303 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30304 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30305 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30306 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30307 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30308 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30309 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30310
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30311
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30312 static void m68k_op_tas_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30313 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30314 uint32_t ea = EA_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30315 uint32_t dst = m68ki_read_8((mc68kcpu), ea);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30316
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30317 (mc68kcpu)->not_z_flag = dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30318 (mc68kcpu)->n_flag = NFLAG_8(dst);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30319 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30320 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30321
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30322 /* On the 68000 and 68010, the TAS instruction uses a unique bus cycle that may have
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30323 side effects (e.g. delaying DMA) or may fail to write back at all depending on the
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30324 bus implementation.
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30325 In particular, the Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30326 to fail to write back in order to function properly. */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30327 /*if (CPU_TYPE_IS_010_LESS((mc68kcpu)->cpu_type) && !(mc68kcpu)->tas_write_callback.isnull())
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30328 ((mc68kcpu)->tas_write_callback)(*(mc68kcpu)->program, ea, dst | 0x80, 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30329 else
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30330 m68ki_write_8((mc68kcpu), ea, dst | 0x80);*/
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30331 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30332
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30333
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30334 static void m68k_op_trap(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30335 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30336 /* Trap#n stacks exception frame type 0 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30337 m68ki_exception_trapN((mc68kcpu), EXCEPTION_TRAP_BASE + ((mc68kcpu)->ir & 0xf)); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30338 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30339
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30340
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30341 static void m68k_op_trapt(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30342 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30343 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30344 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30345 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30346 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30347 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30348 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30349 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30350
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30352 static void m68k_op_trapt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30353 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30354 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30355 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30356 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30357 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30358 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30359 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30360 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30361
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30362
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30363 static void m68k_op_trapt_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30364 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30365 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30366 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30367 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30368 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30369 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30370 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30371 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30373
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30374 static void m68k_op_trapf(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30375 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30376 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30377 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30378 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30379 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30380 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30381 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30382
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30383
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30384 static void m68k_op_trapf_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30385 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30386 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30387 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30388 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30389 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30390 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30391 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30392 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30393
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30395 static void m68k_op_trapf_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30396 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30397 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30398 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30399 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30400 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30401 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30402 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30403 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30404
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30406 static void m68k_op_traphi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30407 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30408 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30409 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30410 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30411 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30412 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30413 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30414 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30415 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30417
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30418 static void m68k_op_trapls(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30419 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30420 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30421 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30422 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30423 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30424 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30425 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30426 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30427 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30428
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30429
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30430 static void m68k_op_trapcc(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30431 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30432 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30433 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30434 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30435 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30436 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30437 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30438 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30439 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30440
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30441
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30442 static void m68k_op_trapcs(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30443 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30444 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30445 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30446 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30447 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30448 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30449 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30450 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30451 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30452
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30453
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30454 static void m68k_op_trapne(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30455 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30456 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30457 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30458 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30459 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30460 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30461 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30462 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30463 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30464
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30465
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30466 static void m68k_op_trapeq(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30467 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30468 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30469 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30470 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30471 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30472 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30473 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30474 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30475 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30477
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30478 static void m68k_op_trapvc(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30479 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30480 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30481 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30482 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30483 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30484 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30485 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30486 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30487 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30488
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30489
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30490 static void m68k_op_trapvs(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30491 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30492 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30493 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30494 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30495 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30496 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30497 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30498 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30499 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30500
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30501
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30502 static void m68k_op_trappl(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30503 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30504 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30505 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30506 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30507 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30508 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30509 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30510 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30511 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30512
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30513
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30514 static void m68k_op_trapmi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30515 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30516 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30517 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30518 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30519 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30520 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30521 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30522 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30523 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30524
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30525
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30526 static void m68k_op_trapge(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30527 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30528 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30529 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30530 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30531 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30532 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30533 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30534 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30535 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30536
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30537
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30538 static void m68k_op_traplt(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30539 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30540 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30541 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30542 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30543 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30544 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30545 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30546 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30547 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30548
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30549
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30550 static void m68k_op_trapgt(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30551 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30552 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30553 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30554 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30555 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30556 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30557 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30558 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30559 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30562 static void m68k_op_traple(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30563 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30564 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30565 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30566 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30567 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30568 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30569 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30570 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30571 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30572
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30573
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30574 static void m68k_op_traphi_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30575 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30576 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30577 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30578 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30579 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30580 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30581 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30582 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30583 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30584 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30585 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30586 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30587 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30588
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30589
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30590 static void m68k_op_trapls_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30591 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30592 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30593 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30594 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30595 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30596 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30597 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30598 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30599 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30600 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30601 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30602 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30603 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30604
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30605
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30606 static void m68k_op_trapcc_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30607 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30608 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30609 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30610 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30611 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30612 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30613 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30614 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30615 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30616 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30617 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30618 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30619 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30620
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30622 static void m68k_op_trapcs_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30623 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30624 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30625 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30626 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30627 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30628 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30629 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30630 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30631 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30632 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30633 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30634 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30635 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30638 static void m68k_op_trapne_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30639 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30640 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30641 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30642 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30643 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30644 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30645 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30646 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30647 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30648 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30649 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30650 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30651 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30652
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30653
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30654 static void m68k_op_trapeq_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30655 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30656 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30657 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30658 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30659 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30660 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30661 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30662 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30663 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30664 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30665 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30666 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30667 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30668
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30669
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30670 static void m68k_op_trapvc_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30671 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30672 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30673 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30674 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30675 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30676 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30677 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30678 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30679 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30680 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30681 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30682 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30683 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30684
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30685
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30686 static void m68k_op_trapvs_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30687 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30688 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30689 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30690 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30691 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30692 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30693 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30694 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30695 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30696 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30697 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30698 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30699 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30700
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30701
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30702 static void m68k_op_trappl_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30703 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30704 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30705 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30706 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30707 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30708 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30709 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30710 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30711 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30712 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30713 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30714 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30715 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30716
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30717
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30718 static void m68k_op_trapmi_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30719 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30720 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30721 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30722 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30723 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30724 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30725 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30726 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30727 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30728 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30729 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30730 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30731 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30732
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30733
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30734 static void m68k_op_trapge_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30735 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30736 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30737 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30738 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30739 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30740 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30741 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30742 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30743 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30744 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30745 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30746 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30747 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30748
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30749
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30750 static void m68k_op_traplt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30751 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30752 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30753 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30754 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30755 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30756 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30757 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30758 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30759 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30760 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30761 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30762 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30763 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30764
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30765
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30766 static void m68k_op_trapgt_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30767 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30768 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30769 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30770 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30771 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30772 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30773 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30774 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30775 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30776 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30777 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30778 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30779 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30780
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30781
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30782 static void m68k_op_traple_16(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30783 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30784 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30785 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30786 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30787 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30788 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30789 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30790 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30791 REG_PC(mc68kcpu) += 2;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30792 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30793 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30794 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30795 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30796
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30797
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30798 static void m68k_op_traphi_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30799 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30800 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30801 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30802 if(COND_HI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30803 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30804 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30805 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30806 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30807 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30808 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30809 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30810 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30811 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30812
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30813
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30814 static void m68k_op_trapls_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30815 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30816 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30817 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30818 if(COND_LS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30819 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30820 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30821 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30822 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30823 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30824 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30825 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30826 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30827 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30828
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30829
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30830 static void m68k_op_trapcc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30831 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30832 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30833 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30834 if(COND_CC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30835 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30836 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30837 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30838 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30839 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30840 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30841 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30842 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30843 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30844
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30845
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30846 static void m68k_op_trapcs_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30847 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30848 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30849 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30850 if(COND_CS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30851 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30852 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30853 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30854 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30855 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30856 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30857 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30858 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30859 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30860
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30861
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30862 static void m68k_op_trapne_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30863 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30864 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30865 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30866 if(COND_NE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30867 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30868 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30869 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30870 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30871 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30872 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30873 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30874 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30875 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30876
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30877
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30878 static void m68k_op_trapeq_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30879 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30880 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30881 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30882 if(COND_EQ(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30883 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30884 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30885 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30886 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30887 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30888 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30889 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30890 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30891 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30892
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30893
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30894 static void m68k_op_trapvc_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30895 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30896 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30897 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30898 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30899 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30900 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30901 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30902 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30903 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30904 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30905 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30906 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30907 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30908
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30909
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30910 static void m68k_op_trapvs_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30911 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30912 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30913 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30914 if(COND_VS(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30915 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30916 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30917 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30918 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30919 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30920 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30921 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30922 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30923 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30924
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30925
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30926 static void m68k_op_trappl_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30927 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30928 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30929 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30930 if(COND_PL(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30931 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30932 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30933 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30934 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30935 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30936 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30937 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30938 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30939 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30940
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30941
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30942 static void m68k_op_trapmi_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30943 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30944 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30945 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30946 if(COND_MI(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30947 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30948 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30949 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30950 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30951 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30952 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30953 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30954 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30955 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30956
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30957
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30958 static void m68k_op_trapge_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30959 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30960 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30961 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30962 if(COND_GE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30963 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30964 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30965 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30966 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30967 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30968 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30969 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30970 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30971 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30972
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30973
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30974 static void m68k_op_traplt_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30975 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30976 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30977 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30978 if(COND_LT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30979 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30980 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30981 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30982 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30983 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30984 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30985 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30986 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30987 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30988
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30989
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30990 static void m68k_op_trapgt_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30991 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30992 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30993 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30994 if(COND_GT(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30995 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30996 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30997 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30998 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30999 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31000 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31001 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31002 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31003 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31004
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31005
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31006 static void m68k_op_traple_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31007 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31008 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31009 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31010 if(COND_LE(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31011 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31012 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31013 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31014 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31015 REG_PC(mc68kcpu) += 4;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31016 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31017 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31018 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31019 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31020
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31021
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31022 static void m68k_op_trapv(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31023 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31024 if(COND_VC(mc68kcpu))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31025 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31026 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31027 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31028 m68ki_exception_trap((mc68kcpu), EXCEPTION_TRAPV); /* HJB 990403 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31029 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31030
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31031
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31032 static void m68k_op_tst_8_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31033 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31034 uint32_t res = MASK_OUT_ABOVE_8(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31035
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31036 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31037 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31038 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31039 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31040 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31041
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31042
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31043 static void m68k_op_tst_8_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31044 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31045 uint32_t res = OPER_AY_AI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31046
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31047 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31048 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31049 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31050 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31051 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31052
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31053
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31054 static void m68k_op_tst_8_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31055 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31056 uint32_t res = OPER_AY_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31057
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31058 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31059 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31060 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31061 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31062 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31063
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31064
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31065 static void m68k_op_tst_8_pi7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31066 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31067 uint32_t res = OPER_A7_PI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31068
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31069 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31070 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31071 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31072 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31073 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31074
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31075
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31076 static void m68k_op_tst_8_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31077 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31078 uint32_t res = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31079
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31080 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31081 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31082 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31083 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31084 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31085
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31086
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31087 static void m68k_op_tst_8_pd7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31088 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31089 uint32_t res = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31090
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31091 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31092 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31093 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31094 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31095 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31096
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31097
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31098 static void m68k_op_tst_8_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31099 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31100 uint32_t res = OPER_AY_DI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31101
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31102 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31103 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31104 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31105 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31106 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31107
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31108
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31109 static void m68k_op_tst_8_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31110 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31111 uint32_t res = OPER_AY_IX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31112
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31113 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31114 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31115 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31116 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31117 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31118
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31119
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31120 static void m68k_op_tst_8_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31121 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31122 uint32_t res = OPER_AW_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31123
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31124 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31125 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31126 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31127 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31128 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31129
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31130
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31131 static void m68k_op_tst_8_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31132 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31133 uint32_t res = OPER_AL_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31134
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31135 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31136 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31137 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31138 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31139 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31140
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31141
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31142 static void m68k_op_tst_8_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31143 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31144 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31145 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31146 uint32_t res = OPER_PCDI_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31147
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31148 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31149 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31150 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31151 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31152 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31153 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31154 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31155 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31156
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31157
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31158 static void m68k_op_tst_8_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31159 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31160 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31161 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31162 uint32_t res = OPER_PCIX_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31163
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31164 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31165 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31166 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31167 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31168 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31169 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31170 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31171 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31172
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31173
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31174 static void m68k_op_tst_8_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31175 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31176 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31177 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31178 uint32_t res = OPER_I_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31179
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31180 (mc68kcpu)->n_flag = NFLAG_8(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31181 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31182 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31183 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31184 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31185 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31186 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31187 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31188
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31189
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31190 static void m68k_op_tst_16_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31191 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31192 uint32_t res = MASK_OUT_ABOVE_16(DY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31193
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31194 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31195 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31196 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31197 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31198 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31199
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31200
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31201 static void m68k_op_tst_16_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31202 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31203 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31204 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31205 uint32_t res = MAKE_INT_16(AY(mc68kcpu));
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31206
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31207 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31208 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31209 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31210 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31211 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31212 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31213 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31214 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31215
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31216
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31217 static void m68k_op_tst_16_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31218 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31219 uint32_t res = OPER_AY_AI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31220
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31221 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31222 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31223 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31224 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31225 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31226
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31227
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31228 static void m68k_op_tst_16_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31229 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31230 uint32_t res = OPER_AY_PI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31231
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31232 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31233 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31234 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31235 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31236 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31237
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31238
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31239 static void m68k_op_tst_16_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31240 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31241 uint32_t res = OPER_AY_PD_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31242
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31243 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31244 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31245 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31246 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31247 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31248
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31249
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31250 static void m68k_op_tst_16_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31251 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31252 uint32_t res = OPER_AY_DI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31253
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31254 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31255 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31256 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31257 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31258 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31259
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31260
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31261 static void m68k_op_tst_16_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31262 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31263 uint32_t res = OPER_AY_IX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31264
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31265 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31266 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31267 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31268 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31269 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31270
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31271
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31272 static void m68k_op_tst_16_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31273 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31274 uint32_t res = OPER_AW_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31275
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31276 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31277 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31278 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31279 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31280 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31281
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31282
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31283 static void m68k_op_tst_16_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31284 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31285 uint32_t res = OPER_AL_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31286
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31287 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31288 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31289 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31290 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31291 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31292
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31293
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31294 static void m68k_op_tst_16_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31295 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31296 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31297 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31298 uint32_t res = OPER_PCDI_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31299
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31300 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31301 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31302 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31303 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31304 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31305 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31306 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31307 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31308
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31309
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31310 static void m68k_op_tst_16_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31311 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31312 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31313 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31314 uint32_t res = OPER_PCIX_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31315
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31316 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31317 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31318 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31319 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31320 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31321 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31322 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31323 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31324
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31325
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31326 static void m68k_op_tst_16_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31327 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31328 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31329 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31330 uint32_t res = OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31331
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31332 (mc68kcpu)->n_flag = NFLAG_16(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31333 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31334 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31335 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31336 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31337 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31338 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31339 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31340
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31341
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31342 static void m68k_op_tst_32_d(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31343 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31344 uint32_t res = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31345
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31346 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31347 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31348 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31349 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31350 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31351
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31352
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31353 static void m68k_op_tst_32_a(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31354 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31355 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31356 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31357 uint32_t res = AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31358
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31359 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31360 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31361 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31362 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31363 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31364 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31365 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31366 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31367
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31368
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31369 static void m68k_op_tst_32_ai(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31370 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31371 uint32_t res = OPER_AY_AI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31372
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31373 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31374 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31375 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31376 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31377 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31378
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31379
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31380 static void m68k_op_tst_32_pi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31381 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31382 uint32_t res = OPER_AY_PI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31383
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31384 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31385 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31386 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31387 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31388 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31389
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31390
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31391 static void m68k_op_tst_32_pd(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31392 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31393 uint32_t res = OPER_AY_PD_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31394
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31395 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31396 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31397 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31398 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31399 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31400
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31401
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31402 static void m68k_op_tst_32_di(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31403 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31404 uint32_t res = OPER_AY_DI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31405
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31406 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31407 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31408 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31409 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31410 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31411
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31412
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31413 static void m68k_op_tst_32_ix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31414 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31415 uint32_t res = OPER_AY_IX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31416
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31417 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31418 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31419 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31420 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31421 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31422
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31423
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31424 static void m68k_op_tst_32_aw(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31425 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31426 uint32_t res = OPER_AW_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31427
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31428 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31429 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31430 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31431 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31432 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31433
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31434
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31435 static void m68k_op_tst_32_al(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31436 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31437 uint32_t res = OPER_AL_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31438
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31439 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31440 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31441 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31442 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31443 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31444
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31445
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31446 static void m68k_op_tst_32_pcdi(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31447 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31448 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31449 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31450 uint32_t res = OPER_PCDI_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31451
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31452 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31453 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31454 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31455 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31456 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31457 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31458 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31459 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31460
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31461
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31462 static void m68k_op_tst_32_pcix(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31463 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31464 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31465 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31466 uint32_t res = OPER_PCIX_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31467
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31468 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31469 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31470 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31471 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31472 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31473 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31474 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31475 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31476
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31477
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31478 static void m68k_op_tst_32_i(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31479 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31480 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31481 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31482 uint32_t res = OPER_I_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31483
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31484 (mc68kcpu)->n_flag = NFLAG_32(res);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31485 (mc68kcpu)->not_z_flag = res;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31486 (mc68kcpu)->v_flag = VFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31487 (mc68kcpu)->c_flag = CFLAG_CLEAR;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31488 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31489 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31490 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31491 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31492
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31493
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31494 static void m68k_op_unlk_32_a7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31495 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31496 REG_A(mc68kcpu)[7] = m68ki_read_32((mc68kcpu), REG_A(mc68kcpu)[7]);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31497 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31498
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31499
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31500 static void m68k_op_unlk_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31501 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31502 uint32_t* r_dst = &AY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31503
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31504 REG_A(mc68kcpu)[7] = *r_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31505 *r_dst = m68ki_pull_32(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31506 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31507
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31508
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31509 static void m68k_op_unpk_16_rr(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31510 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31511 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31512 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31513 /* Note: DX(mc68kcpu) and DY(mc68kcpu) are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31514 uint32_t src = DY(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31515 uint32_t* r_dst = &DX(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31516
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31517 *r_dst = MASK_OUT_BELOW_16(*r_dst) | (((((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu)) & 0xffff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31518 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31519 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31520 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31521 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31522
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31523
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31524 static void m68k_op_unpk_16_mm_ax7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31525 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31526 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31527 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31528 /* Note: AX and AY are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31529 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31530 uint32_t ea_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31531
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31532 src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31533 ea_dst = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31534 m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31535 ea_dst = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31536 m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31537 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31538 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31539 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31540 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31541
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31542
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31543 static void m68k_op_unpk_16_mm_ay7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31544 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31545 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31546 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31547 /* Note: AX and AY are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31548 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31549 uint32_t ea_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31550
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31551 src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31552 ea_dst = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31553 m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31554 ea_dst = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31555 m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31556 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31557 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31558 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31559 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31560
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31561
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31562 static void m68k_op_unpk_16_mm_axy7(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31563 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31564 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31565 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31566 uint32_t src = OPER_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31567 uint32_t ea_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31568
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31569 src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31570 ea_dst = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31571 m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31572 ea_dst = EA_A7_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31573 m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31574 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31575 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31576 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31577 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31578
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31579
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31580 static void m68k_op_unpk_16_mm(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31581 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31582 if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type))
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31583 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31584 /* Note: AX and AY are reversed in Motorola's docs */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31585 uint32_t src = OPER_AY_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31586 uint32_t ea_dst;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31587
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31588 src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31589 ea_dst = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31590 m68ki_write_8((mc68kcpu), ea_dst, src & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31591 ea_dst = EA_AX_PD_8(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31592 m68ki_write_8((mc68kcpu), ea_dst, (src >> 8) & 0xff);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31593 return;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31594 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31595 m68ki_exception_illegal(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31596 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31597
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31598
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31599 static void m68k_op_cinv_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31600 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31601 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31602 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31603
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31604
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31605 static void m68k_op_cpush_32(m68000_base_device* mc68kcpu)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31606 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31607
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31608 m68ki_exception_1111(mc68kcpu);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31609 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31610
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31611
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31612 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31613 /* ============================== END OF FILE ============================= */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31614 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31615
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31616
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31617 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31618 /* ========================= OPCODE TABLE BUILDER ========================= */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31619 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31620
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31621 #include "m68kops.h"
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31622
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31623 #define NUM_CPU_TYPES 7
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31624
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31625 void (*m68ki_instruction_jump_table[NUM_CPU_TYPES][0x10000])(m68000_base_device *m68k); /* opcode handler jump table */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31626 unsigned char m68ki_cycles[NUM_CPU_TYPES][0x10000]; /* Cycles used by CPU type */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31627
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31628 /* This is used to generate the opcode handler jump table */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31629 typedef struct
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31630 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31631 void (*opcode_handler)(m68000_base_device *m68k); /* handler function */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31632 unsigned int mask; /* mask on opcode */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31633 unsigned int match; /* what to match after masking */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31634 unsigned char cycles[NUM_CPU_TYPES]; /* cycles each cpu type takes */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31635 } opcode_handler_struct;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31636
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31638 /* Opcode handler table */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31639 static const opcode_handler_struct m68k_opcode_handler_table[] =
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31640 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31641 /* function mask match 000 010 020 040 */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31642
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31643
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31644 {m68k_op_1010, 0xf000, 0xa000, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31645 {m68k_op_1111, 0xf000, 0xf000, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31646 {m68k_op_moveq_32, 0xf100, 0x7000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31647 {m68k_op_cpbcc_32, 0xf180, 0xf080, {255, 255, 4, 4, 255, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31648 {m68k_op_cpgen_32, 0xf1c0, 0xf000, {255, 255, 4, 4, 255, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31649 {m68k_op_cpscc_32, 0xf1c0, 0xf040, {255, 255, 4, 4, 255, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31650 {m68k_op_pmmu_32, 0xfe00, 0xf000, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31651 {m68k_op_bra_8, 0xff00, 0x6000, { 10, 10, 10, 10, 10, 10, 10}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31652 {m68k_op_bsr_8, 0xff00, 0x6100, { 18, 18, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31653 {m68k_op_bhi_8, 0xff00, 0x6200, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31654 {m68k_op_bls_8, 0xff00, 0x6300, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31655 {m68k_op_bcc_8, 0xff00, 0x6400, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31656 {m68k_op_bcs_8, 0xff00, 0x6500, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31657 {m68k_op_bne_8, 0xff00, 0x6600, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31658 {m68k_op_beq_8, 0xff00, 0x6700, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31659 {m68k_op_bvc_8, 0xff00, 0x6800, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31660 {m68k_op_bvs_8, 0xff00, 0x6900, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31661 {m68k_op_bpl_8, 0xff00, 0x6a00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31662 {m68k_op_bmi_8, 0xff00, 0x6b00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31663 {m68k_op_bge_8, 0xff00, 0x6c00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31664 {m68k_op_blt_8, 0xff00, 0x6d00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31665 {m68k_op_bgt_8, 0xff00, 0x6e00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31666 {m68k_op_ble_8, 0xff00, 0x6f00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31667 {m68k_op_040fpu0_32, 0xff00, 0xf200, {255, 255, 0, 0, 0, 0, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31668 {m68k_op_040fpu1_32, 0xff00, 0xf300, {255, 255, 0, 0, 0, 0, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31669 {m68k_op_cinv_32, 0xff20, 0xf400, {255, 255, 255, 255, 16, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31670 {m68k_op_cpush_32, 0xff20, 0xf420, {255, 255, 255, 255, 16, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31671 {m68k_op_btst_32_r_d, 0xf1f8, 0x0100, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31672 {m68k_op_movep_16_er, 0xf1f8, 0x0108, { 16, 16, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31673 {m68k_op_btst_8_r_ai, 0xf1f8, 0x0110, { 8, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31674 {m68k_op_btst_8_r_pi, 0xf1f8, 0x0118, { 8, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31675 {m68k_op_btst_8_r_pd, 0xf1f8, 0x0120, { 10, 10, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31676 {m68k_op_btst_8_r_di, 0xf1f8, 0x0128, { 12, 12, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31677 {m68k_op_btst_8_r_ix, 0xf1f8, 0x0130, { 14, 14, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31678 {m68k_op_bchg_32_r_d, 0xf1f8, 0x0140, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31679 {m68k_op_movep_32_er, 0xf1f8, 0x0148, { 24, 24, 18, 18, 18, 18, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31680 {m68k_op_bchg_8_r_ai, 0xf1f8, 0x0150, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31681 {m68k_op_bchg_8_r_pi, 0xf1f8, 0x0158, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31682 {m68k_op_bchg_8_r_pd, 0xf1f8, 0x0160, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31683 {m68k_op_bchg_8_r_di, 0xf1f8, 0x0168, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31684 {m68k_op_bchg_8_r_ix, 0xf1f8, 0x0170, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31685 {m68k_op_bclr_32_r_d, 0xf1f8, 0x0180, { 10, 10, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31686 {m68k_op_movep_16_re, 0xf1f8, 0x0188, { 16, 16, 11, 11, 11, 11, 11}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31687 {m68k_op_bclr_8_r_ai, 0xf1f8, 0x0190, { 12, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31688 {m68k_op_bclr_8_r_pi, 0xf1f8, 0x0198, { 12, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31689 {m68k_op_bclr_8_r_pd, 0xf1f8, 0x01a0, { 14, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31690 {m68k_op_bclr_8_r_di, 0xf1f8, 0x01a8, { 16, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31691 {m68k_op_bclr_8_r_ix, 0xf1f8, 0x01b0, { 18, 20, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31692 {m68k_op_bset_32_r_d, 0xf1f8, 0x01c0, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31693 {m68k_op_movep_32_re, 0xf1f8, 0x01c8, { 24, 24, 17, 17, 17, 17, 17}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31694 {m68k_op_bset_8_r_ai, 0xf1f8, 0x01d0, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31695 {m68k_op_bset_8_r_pi, 0xf1f8, 0x01d8, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31696 {m68k_op_bset_8_r_pd, 0xf1f8, 0x01e0, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31697 {m68k_op_bset_8_r_di, 0xf1f8, 0x01e8, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31698 {m68k_op_bset_8_r_ix, 0xf1f8, 0x01f0, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31699 {m68k_op_move_8_d_d, 0xf1f8, 0x1000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31700 {m68k_op_move_8_d_ai, 0xf1f8, 0x1010, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31701 {m68k_op_move_8_d_pi, 0xf1f8, 0x1018, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31702 {m68k_op_move_8_d_pd, 0xf1f8, 0x1020, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31703 {m68k_op_move_8_d_di, 0xf1f8, 0x1028, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31704 {m68k_op_move_8_d_ix, 0xf1f8, 0x1030, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31705 {m68k_op_move_8_ai_d, 0xf1f8, 0x1080, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31706 {m68k_op_move_8_ai_ai, 0xf1f8, 0x1090, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31707 {m68k_op_move_8_ai_pi, 0xf1f8, 0x1098, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31708 {m68k_op_move_8_ai_pd, 0xf1f8, 0x10a0, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31709 {m68k_op_move_8_ai_di, 0xf1f8, 0x10a8, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31710 {m68k_op_move_8_ai_ix, 0xf1f8, 0x10b0, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31711 {m68k_op_move_8_pi_d, 0xf1f8, 0x10c0, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31712 {m68k_op_move_8_pi_ai, 0xf1f8, 0x10d0, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31713 {m68k_op_move_8_pi_pi, 0xf1f8, 0x10d8, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31714 {m68k_op_move_8_pi_pd, 0xf1f8, 0x10e0, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31715 {m68k_op_move_8_pi_di, 0xf1f8, 0x10e8, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31716 {m68k_op_move_8_pi_ix, 0xf1f8, 0x10f0, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31717 {m68k_op_move_8_pd_d, 0xf1f8, 0x1100, { 8, 8, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31718 {m68k_op_move_8_pd_ai, 0xf1f8, 0x1110, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31719 {m68k_op_move_8_pd_pi, 0xf1f8, 0x1118, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31720 {m68k_op_move_8_pd_pd, 0xf1f8, 0x1120, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31721 {m68k_op_move_8_pd_di, 0xf1f8, 0x1128, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31722 {m68k_op_move_8_pd_ix, 0xf1f8, 0x1130, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31723 {m68k_op_move_8_di_d, 0xf1f8, 0x1140, { 12, 12, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31724 {m68k_op_move_8_di_ai, 0xf1f8, 0x1150, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31725 {m68k_op_move_8_di_pi, 0xf1f8, 0x1158, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31726 {m68k_op_move_8_di_pd, 0xf1f8, 0x1160, { 18, 18, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31727 {m68k_op_move_8_di_di, 0xf1f8, 0x1168, { 20, 20, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31728 {m68k_op_move_8_di_ix, 0xf1f8, 0x1170, { 22, 22, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31729 {m68k_op_move_8_ix_d, 0xf1f8, 0x1180, { 14, 14, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31730 {m68k_op_move_8_ix_ai, 0xf1f8, 0x1190, { 18, 18, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31731 {m68k_op_move_8_ix_pi, 0xf1f8, 0x1198, { 18, 18, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31732 {m68k_op_move_8_ix_pd, 0xf1f8, 0x11a0, { 20, 20, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31733 {m68k_op_move_8_ix_di, 0xf1f8, 0x11a8, { 22, 22, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31734 {m68k_op_move_8_ix_ix, 0xf1f8, 0x11b0, { 24, 24, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31735 {m68k_op_move_32_d_d, 0xf1f8, 0x2000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31736 {m68k_op_move_32_d_a, 0xf1f8, 0x2008, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31737 {m68k_op_move_32_d_ai, 0xf1f8, 0x2010, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31738 {m68k_op_move_32_d_pi, 0xf1f8, 0x2018, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31739 {m68k_op_move_32_d_pd, 0xf1f8, 0x2020, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31740 {m68k_op_move_32_d_di, 0xf1f8, 0x2028, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31741 {m68k_op_move_32_d_ix, 0xf1f8, 0x2030, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31742 {m68k_op_movea_32_d, 0xf1f8, 0x2040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31743 {m68k_op_movea_32_a, 0xf1f8, 0x2048, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31744 {m68k_op_movea_32_ai, 0xf1f8, 0x2050, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31745 {m68k_op_movea_32_pi, 0xf1f8, 0x2058, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31746 {m68k_op_movea_32_pd, 0xf1f8, 0x2060, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31747 {m68k_op_movea_32_di, 0xf1f8, 0x2068, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31748 {m68k_op_movea_32_ix, 0xf1f8, 0x2070, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31749 {m68k_op_move_32_ai_d, 0xf1f8, 0x2080, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31750 {m68k_op_move_32_ai_a, 0xf1f8, 0x2088, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31751 {m68k_op_move_32_ai_ai, 0xf1f8, 0x2090, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31752 {m68k_op_move_32_ai_pi, 0xf1f8, 0x2098, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31753 {m68k_op_move_32_ai_pd, 0xf1f8, 0x20a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31754 {m68k_op_move_32_ai_di, 0xf1f8, 0x20a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31755 {m68k_op_move_32_ai_ix, 0xf1f8, 0x20b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31756 {m68k_op_move_32_pi_d, 0xf1f8, 0x20c0, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31757 {m68k_op_move_32_pi_a, 0xf1f8, 0x20c8, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31758 {m68k_op_move_32_pi_ai, 0xf1f8, 0x20d0, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31759 {m68k_op_move_32_pi_pi, 0xf1f8, 0x20d8, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31760 {m68k_op_move_32_pi_pd, 0xf1f8, 0x20e0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31761 {m68k_op_move_32_pi_di, 0xf1f8, 0x20e8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31762 {m68k_op_move_32_pi_ix, 0xf1f8, 0x20f0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31763 {m68k_op_move_32_pd_d, 0xf1f8, 0x2100, { 12, 14, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31764 {m68k_op_move_32_pd_a, 0xf1f8, 0x2108, { 12, 14, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31765 {m68k_op_move_32_pd_ai, 0xf1f8, 0x2110, { 20, 22, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31766 {m68k_op_move_32_pd_pi, 0xf1f8, 0x2118, { 20, 22, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31767 {m68k_op_move_32_pd_pd, 0xf1f8, 0x2120, { 22, 24, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31768 {m68k_op_move_32_pd_di, 0xf1f8, 0x2128, { 24, 26, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31769 {m68k_op_move_32_pd_ix, 0xf1f8, 0x2130, { 26, 28, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31770 {m68k_op_move_32_di_d, 0xf1f8, 0x2140, { 16, 16, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31771 {m68k_op_move_32_di_a, 0xf1f8, 0x2148, { 16, 16, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31772 {m68k_op_move_32_di_ai, 0xf1f8, 0x2150, { 24, 24, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31773 {m68k_op_move_32_di_pi, 0xf1f8, 0x2158, { 24, 24, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31774 {m68k_op_move_32_di_pd, 0xf1f8, 0x2160, { 26, 26, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31775 {m68k_op_move_32_di_di, 0xf1f8, 0x2168, { 28, 28, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31776 {m68k_op_move_32_di_ix, 0xf1f8, 0x2170, { 30, 30, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31777 {m68k_op_move_32_ix_d, 0xf1f8, 0x2180, { 18, 18, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31778 {m68k_op_move_32_ix_a, 0xf1f8, 0x2188, { 18, 18, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31779 {m68k_op_move_32_ix_ai, 0xf1f8, 0x2190, { 26, 26, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31780 {m68k_op_move_32_ix_pi, 0xf1f8, 0x2198, { 26, 26, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31781 {m68k_op_move_32_ix_pd, 0xf1f8, 0x21a0, { 28, 28, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31782 {m68k_op_move_32_ix_di, 0xf1f8, 0x21a8, { 30, 30, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31783 {m68k_op_move_32_ix_ix, 0xf1f8, 0x21b0, { 32, 32, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31784 {m68k_op_move_16_d_d, 0xf1f8, 0x3000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31785 {m68k_op_move_16_d_a, 0xf1f8, 0x3008, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31786 {m68k_op_move_16_d_ai, 0xf1f8, 0x3010, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31787 {m68k_op_move_16_d_pi, 0xf1f8, 0x3018, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31788 {m68k_op_move_16_d_pd, 0xf1f8, 0x3020, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31789 {m68k_op_move_16_d_di, 0xf1f8, 0x3028, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31790 {m68k_op_move_16_d_ix, 0xf1f8, 0x3030, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31791 {m68k_op_movea_16_d, 0xf1f8, 0x3040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31792 {m68k_op_movea_16_a, 0xf1f8, 0x3048, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31793 {m68k_op_movea_16_ai, 0xf1f8, 0x3050, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31794 {m68k_op_movea_16_pi, 0xf1f8, 0x3058, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31795 {m68k_op_movea_16_pd, 0xf1f8, 0x3060, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31796 {m68k_op_movea_16_di, 0xf1f8, 0x3068, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31797 {m68k_op_movea_16_ix, 0xf1f8, 0x3070, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31798 {m68k_op_move_16_ai_d, 0xf1f8, 0x3080, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31799 {m68k_op_move_16_ai_a, 0xf1f8, 0x3088, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31800 {m68k_op_move_16_ai_ai, 0xf1f8, 0x3090, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31801 {m68k_op_move_16_ai_pi, 0xf1f8, 0x3098, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31802 {m68k_op_move_16_ai_pd, 0xf1f8, 0x30a0, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31803 {m68k_op_move_16_ai_di, 0xf1f8, 0x30a8, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31804 {m68k_op_move_16_ai_ix, 0xf1f8, 0x30b0, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31805 {m68k_op_move_16_pi_d, 0xf1f8, 0x30c0, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31806 {m68k_op_move_16_pi_a, 0xf1f8, 0x30c8, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31807 {m68k_op_move_16_pi_ai, 0xf1f8, 0x30d0, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31808 {m68k_op_move_16_pi_pi, 0xf1f8, 0x30d8, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31809 {m68k_op_move_16_pi_pd, 0xf1f8, 0x30e0, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31810 {m68k_op_move_16_pi_di, 0xf1f8, 0x30e8, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31811 {m68k_op_move_16_pi_ix, 0xf1f8, 0x30f0, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31812 {m68k_op_move_16_pd_d, 0xf1f8, 0x3100, { 8, 8, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31813 {m68k_op_move_16_pd_a, 0xf1f8, 0x3108, { 8, 8, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31814 {m68k_op_move_16_pd_ai, 0xf1f8, 0x3110, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31815 {m68k_op_move_16_pd_pi, 0xf1f8, 0x3118, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31816 {m68k_op_move_16_pd_pd, 0xf1f8, 0x3120, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31817 {m68k_op_move_16_pd_di, 0xf1f8, 0x3128, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31818 {m68k_op_move_16_pd_ix, 0xf1f8, 0x3130, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31819 {m68k_op_move_16_di_d, 0xf1f8, 0x3140, { 12, 12, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31820 {m68k_op_move_16_di_a, 0xf1f8, 0x3148, { 12, 12, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31821 {m68k_op_move_16_di_ai, 0xf1f8, 0x3150, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31822 {m68k_op_move_16_di_pi, 0xf1f8, 0x3158, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31823 {m68k_op_move_16_di_pd, 0xf1f8, 0x3160, { 18, 18, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31824 {m68k_op_move_16_di_di, 0xf1f8, 0x3168, { 20, 20, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31825 {m68k_op_move_16_di_ix, 0xf1f8, 0x3170, { 22, 22, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31826 {m68k_op_move_16_ix_d, 0xf1f8, 0x3180, { 14, 14, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31827 {m68k_op_move_16_ix_a, 0xf1f8, 0x3188, { 14, 14, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31828 {m68k_op_move_16_ix_ai, 0xf1f8, 0x3190, { 18, 18, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31829 {m68k_op_move_16_ix_pi, 0xf1f8, 0x3198, { 18, 18, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31830 {m68k_op_move_16_ix_pd, 0xf1f8, 0x31a0, { 20, 20, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31831 {m68k_op_move_16_ix_di, 0xf1f8, 0x31a8, { 22, 22, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31832 {m68k_op_move_16_ix_ix, 0xf1f8, 0x31b0, { 24, 24, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31833 {m68k_op_chk_32_d, 0xf1f8, 0x4100, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31834 {m68k_op_chk_32_ai, 0xf1f8, 0x4110, {255, 255, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31835 {m68k_op_chk_32_pi, 0xf1f8, 0x4118, {255, 255, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31836 {m68k_op_chk_32_pd, 0xf1f8, 0x4120, {255, 255, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31837 {m68k_op_chk_32_di, 0xf1f8, 0x4128, {255, 255, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31838 {m68k_op_chk_32_ix, 0xf1f8, 0x4130, {255, 255, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31839 {m68k_op_chk_16_d, 0xf1f8, 0x4180, { 10, 8, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31840 {m68k_op_chk_16_ai, 0xf1f8, 0x4190, { 14, 12, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31841 {m68k_op_chk_16_pi, 0xf1f8, 0x4198, { 14, 12, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31842 {m68k_op_chk_16_pd, 0xf1f8, 0x41a0, { 16, 14, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31843 {m68k_op_chk_16_di, 0xf1f8, 0x41a8, { 18, 16, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31844 {m68k_op_chk_16_ix, 0xf1f8, 0x41b0, { 20, 18, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31845 {m68k_op_lea_32_ai, 0xf1f8, 0x41d0, { 4, 4, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31846 {m68k_op_lea_32_di, 0xf1f8, 0x41e8, { 8, 8, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31847 {m68k_op_lea_32_ix, 0xf1f8, 0x41f0, { 12, 12, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31848 {m68k_op_addq_8_d, 0xf1f8, 0x5000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31849 {m68k_op_addq_8_ai, 0xf1f8, 0x5010, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31850 {m68k_op_addq_8_pi, 0xf1f8, 0x5018, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31851 {m68k_op_addq_8_pd, 0xf1f8, 0x5020, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31852 {m68k_op_addq_8_di, 0xf1f8, 0x5028, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31853 {m68k_op_addq_8_ix, 0xf1f8, 0x5030, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31854 {m68k_op_addq_16_d, 0xf1f8, 0x5040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31855 {m68k_op_addq_16_a, 0xf1f8, 0x5048, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31856 {m68k_op_addq_16_ai, 0xf1f8, 0x5050, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31857 {m68k_op_addq_16_pi, 0xf1f8, 0x5058, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31858 {m68k_op_addq_16_pd, 0xf1f8, 0x5060, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31859 {m68k_op_addq_16_di, 0xf1f8, 0x5068, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31860 {m68k_op_addq_16_ix, 0xf1f8, 0x5070, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31861 {m68k_op_addq_32_d, 0xf1f8, 0x5080, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31862 {m68k_op_addq_32_a, 0xf1f8, 0x5088, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31863 {m68k_op_addq_32_ai, 0xf1f8, 0x5090, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31864 {m68k_op_addq_32_pi, 0xf1f8, 0x5098, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31865 {m68k_op_addq_32_pd, 0xf1f8, 0x50a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31866 {m68k_op_addq_32_di, 0xf1f8, 0x50a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31867 {m68k_op_addq_32_ix, 0xf1f8, 0x50b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31868 {m68k_op_subq_8_d, 0xf1f8, 0x5100, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31869 {m68k_op_subq_8_ai, 0xf1f8, 0x5110, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31870 {m68k_op_subq_8_pi, 0xf1f8, 0x5118, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31871 {m68k_op_subq_8_pd, 0xf1f8, 0x5120, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31872 {m68k_op_subq_8_di, 0xf1f8, 0x5128, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31873 {m68k_op_subq_8_ix, 0xf1f8, 0x5130, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31874 {m68k_op_subq_16_d, 0xf1f8, 0x5140, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31875 {m68k_op_subq_16_a, 0xf1f8, 0x5148, { 8, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31876 {m68k_op_subq_16_ai, 0xf1f8, 0x5150, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31877 {m68k_op_subq_16_pi, 0xf1f8, 0x5158, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31878 {m68k_op_subq_16_pd, 0xf1f8, 0x5160, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31879 {m68k_op_subq_16_di, 0xf1f8, 0x5168, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31880 {m68k_op_subq_16_ix, 0xf1f8, 0x5170, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31881 {m68k_op_subq_32_d, 0xf1f8, 0x5180, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31882 {m68k_op_subq_32_a, 0xf1f8, 0x5188, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31883 {m68k_op_subq_32_ai, 0xf1f8, 0x5190, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31884 {m68k_op_subq_32_pi, 0xf1f8, 0x5198, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31885 {m68k_op_subq_32_pd, 0xf1f8, 0x51a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31886 {m68k_op_subq_32_di, 0xf1f8, 0x51a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31887 {m68k_op_subq_32_ix, 0xf1f8, 0x51b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31888 {m68k_op_or_8_er_d, 0xf1f8, 0x8000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31889 {m68k_op_or_8_er_ai, 0xf1f8, 0x8010, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31890 {m68k_op_or_8_er_pi, 0xf1f8, 0x8018, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31891 {m68k_op_or_8_er_pd, 0xf1f8, 0x8020, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31892 {m68k_op_or_8_er_di, 0xf1f8, 0x8028, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31893 {m68k_op_or_8_er_ix, 0xf1f8, 0x8030, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31894 {m68k_op_or_16_er_d, 0xf1f8, 0x8040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31895 {m68k_op_or_16_er_ai, 0xf1f8, 0x8050, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31896 {m68k_op_or_16_er_pi, 0xf1f8, 0x8058, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31897 {m68k_op_or_16_er_pd, 0xf1f8, 0x8060, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31898 {m68k_op_or_16_er_di, 0xf1f8, 0x8068, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31899 {m68k_op_or_16_er_ix, 0xf1f8, 0x8070, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31900 {m68k_op_or_32_er_d, 0xf1f8, 0x8080, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31901 {m68k_op_or_32_er_ai, 0xf1f8, 0x8090, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31902 {m68k_op_or_32_er_pi, 0xf1f8, 0x8098, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31903 {m68k_op_or_32_er_pd, 0xf1f8, 0x80a0, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31904 {m68k_op_or_32_er_di, 0xf1f8, 0x80a8, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31905 {m68k_op_or_32_er_ix, 0xf1f8, 0x80b0, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31906 {m68k_op_divu_16_d, 0xf1f8, 0x80c0, {140, 108, 44, 44, 44, 44, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31907 {m68k_op_divu_16_ai, 0xf1f8, 0x80d0, {144, 112, 48, 48, 48, 48, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31908 {m68k_op_divu_16_pi, 0xf1f8, 0x80d8, {144, 112, 48, 48, 48, 48, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31909 {m68k_op_divu_16_pd, 0xf1f8, 0x80e0, {146, 114, 49, 49, 49, 49, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31910 {m68k_op_divu_16_di, 0xf1f8, 0x80e8, {148, 116, 49, 49, 49, 49, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31911 {m68k_op_divu_16_ix, 0xf1f8, 0x80f0, {150, 118, 51, 51, 51, 51, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31912 {m68k_op_sbcd_8_rr, 0xf1f8, 0x8100, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31913 {m68k_op_sbcd_8_mm, 0xf1f8, 0x8108, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31914 {m68k_op_or_8_re_ai, 0xf1f8, 0x8110, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31915 {m68k_op_or_8_re_pi, 0xf1f8, 0x8118, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31916 {m68k_op_or_8_re_pd, 0xf1f8, 0x8120, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31917 {m68k_op_or_8_re_di, 0xf1f8, 0x8128, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31918 {m68k_op_or_8_re_ix, 0xf1f8, 0x8130, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31919 {m68k_op_pack_16_rr, 0xf1f8, 0x8140, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31920 {m68k_op_pack_16_mm, 0xf1f8, 0x8148, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31921 {m68k_op_or_16_re_ai, 0xf1f8, 0x8150, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31922 {m68k_op_or_16_re_pi, 0xf1f8, 0x8158, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31923 {m68k_op_or_16_re_pd, 0xf1f8, 0x8160, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31924 {m68k_op_or_16_re_di, 0xf1f8, 0x8168, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31925 {m68k_op_or_16_re_ix, 0xf1f8, 0x8170, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31926 {m68k_op_unpk_16_rr, 0xf1f8, 0x8180, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31927 {m68k_op_unpk_16_mm, 0xf1f8, 0x8188, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31928 {m68k_op_or_32_re_ai, 0xf1f8, 0x8190, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31929 {m68k_op_or_32_re_pi, 0xf1f8, 0x8198, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31930 {m68k_op_or_32_re_pd, 0xf1f8, 0x81a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31931 {m68k_op_or_32_re_di, 0xf1f8, 0x81a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31932 {m68k_op_or_32_re_ix, 0xf1f8, 0x81b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31933 {m68k_op_divs_16_d, 0xf1f8, 0x81c0, {158, 122, 56, 56, 56, 56, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31934 {m68k_op_divs_16_ai, 0xf1f8, 0x81d0, {162, 126, 60, 60, 60, 60, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31935 {m68k_op_divs_16_pi, 0xf1f8, 0x81d8, {162, 126, 60, 60, 60, 60, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31936 {m68k_op_divs_16_pd, 0xf1f8, 0x81e0, {164, 128, 61, 61, 61, 61, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31937 {m68k_op_divs_16_di, 0xf1f8, 0x81e8, {166, 130, 61, 61, 61, 61, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31938 {m68k_op_divs_16_ix, 0xf1f8, 0x81f0, {168, 132, 63, 63, 63, 63, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31939 {m68k_op_sub_8_er_d, 0xf1f8, 0x9000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31940 {m68k_op_sub_8_er_ai, 0xf1f8, 0x9010, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31941 {m68k_op_sub_8_er_pi, 0xf1f8, 0x9018, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31942 {m68k_op_sub_8_er_pd, 0xf1f8, 0x9020, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31943 {m68k_op_sub_8_er_di, 0xf1f8, 0x9028, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31944 {m68k_op_sub_8_er_ix, 0xf1f8, 0x9030, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31945 {m68k_op_sub_16_er_d, 0xf1f8, 0x9040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31946 {m68k_op_sub_16_er_a, 0xf1f8, 0x9048, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31947 {m68k_op_sub_16_er_ai, 0xf1f8, 0x9050, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31948 {m68k_op_sub_16_er_pi, 0xf1f8, 0x9058, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31949 {m68k_op_sub_16_er_pd, 0xf1f8, 0x9060, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31950 {m68k_op_sub_16_er_di, 0xf1f8, 0x9068, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31951 {m68k_op_sub_16_er_ix, 0xf1f8, 0x9070, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31952 {m68k_op_sub_32_er_d, 0xf1f8, 0x9080, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31953 {m68k_op_sub_32_er_a, 0xf1f8, 0x9088, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31954 {m68k_op_sub_32_er_ai, 0xf1f8, 0x9090, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31955 {m68k_op_sub_32_er_pi, 0xf1f8, 0x9098, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31956 {m68k_op_sub_32_er_pd, 0xf1f8, 0x90a0, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31957 {m68k_op_sub_32_er_di, 0xf1f8, 0x90a8, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31958 {m68k_op_sub_32_er_ix, 0xf1f8, 0x90b0, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31959 {m68k_op_suba_16_d, 0xf1f8, 0x90c0, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31960 {m68k_op_suba_16_a, 0xf1f8, 0x90c8, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31961 {m68k_op_suba_16_ai, 0xf1f8, 0x90d0, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31962 {m68k_op_suba_16_pi, 0xf1f8, 0x90d8, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31963 {m68k_op_suba_16_pd, 0xf1f8, 0x90e0, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31964 {m68k_op_suba_16_di, 0xf1f8, 0x90e8, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31965 {m68k_op_suba_16_ix, 0xf1f8, 0x90f0, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31966 {m68k_op_subx_8_rr, 0xf1f8, 0x9100, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31967 {m68k_op_subx_8_mm, 0xf1f8, 0x9108, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31968 {m68k_op_sub_8_re_ai, 0xf1f8, 0x9110, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31969 {m68k_op_sub_8_re_pi, 0xf1f8, 0x9118, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31970 {m68k_op_sub_8_re_pd, 0xf1f8, 0x9120, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31971 {m68k_op_sub_8_re_di, 0xf1f8, 0x9128, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31972 {m68k_op_sub_8_re_ix, 0xf1f8, 0x9130, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31973 {m68k_op_subx_16_rr, 0xf1f8, 0x9140, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31974 {m68k_op_subx_16_mm, 0xf1f8, 0x9148, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31975 {m68k_op_sub_16_re_ai, 0xf1f8, 0x9150, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31976 {m68k_op_sub_16_re_pi, 0xf1f8, 0x9158, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31977 {m68k_op_sub_16_re_pd, 0xf1f8, 0x9160, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31978 {m68k_op_sub_16_re_di, 0xf1f8, 0x9168, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31979 {m68k_op_sub_16_re_ix, 0xf1f8, 0x9170, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31980 {m68k_op_subx_32_rr, 0xf1f8, 0x9180, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31981 {m68k_op_subx_32_mm, 0xf1f8, 0x9188, { 30, 30, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31982 {m68k_op_sub_32_re_ai, 0xf1f8, 0x9190, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31983 {m68k_op_sub_32_re_pi, 0xf1f8, 0x9198, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31984 {m68k_op_sub_32_re_pd, 0xf1f8, 0x91a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31985 {m68k_op_sub_32_re_di, 0xf1f8, 0x91a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31986 {m68k_op_sub_32_re_ix, 0xf1f8, 0x91b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31987 {m68k_op_suba_32_d, 0xf1f8, 0x91c0, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31988 {m68k_op_suba_32_a, 0xf1f8, 0x91c8, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31989 {m68k_op_suba_32_ai, 0xf1f8, 0x91d0, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31990 {m68k_op_suba_32_pi, 0xf1f8, 0x91d8, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31991 {m68k_op_suba_32_pd, 0xf1f8, 0x91e0, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31992 {m68k_op_suba_32_di, 0xf1f8, 0x91e8, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31993 {m68k_op_suba_32_ix, 0xf1f8, 0x91f0, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31994 {m68k_op_cmp_8_d, 0xf1f8, 0xb000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31995 {m68k_op_cmp_8_ai, 0xf1f8, 0xb010, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31996 {m68k_op_cmp_8_pi, 0xf1f8, 0xb018, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31997 {m68k_op_cmp_8_pd, 0xf1f8, 0xb020, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31998 {m68k_op_cmp_8_di, 0xf1f8, 0xb028, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31999 {m68k_op_cmp_8_ix, 0xf1f8, 0xb030, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32000 {m68k_op_cmp_16_d, 0xf1f8, 0xb040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32001 {m68k_op_cmp_16_a, 0xf1f8, 0xb048, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32002 {m68k_op_cmp_16_ai, 0xf1f8, 0xb050, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32003 {m68k_op_cmp_16_pi, 0xf1f8, 0xb058, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32004 {m68k_op_cmp_16_pd, 0xf1f8, 0xb060, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32005 {m68k_op_cmp_16_di, 0xf1f8, 0xb068, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32006 {m68k_op_cmp_16_ix, 0xf1f8, 0xb070, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32007 {m68k_op_cmp_32_d, 0xf1f8, 0xb080, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32008 {m68k_op_cmp_32_a, 0xf1f8, 0xb088, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32009 {m68k_op_cmp_32_ai, 0xf1f8, 0xb090, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32010 {m68k_op_cmp_32_pi, 0xf1f8, 0xb098, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32011 {m68k_op_cmp_32_pd, 0xf1f8, 0xb0a0, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32012 {m68k_op_cmp_32_di, 0xf1f8, 0xb0a8, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32013 {m68k_op_cmp_32_ix, 0xf1f8, 0xb0b0, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32014 {m68k_op_cmpa_16_d, 0xf1f8, 0xb0c0, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32015 {m68k_op_cmpa_16_a, 0xf1f8, 0xb0c8, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32016 {m68k_op_cmpa_16_ai, 0xf1f8, 0xb0d0, { 10, 10, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32017 {m68k_op_cmpa_16_pi, 0xf1f8, 0xb0d8, { 10, 10, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32018 {m68k_op_cmpa_16_pd, 0xf1f8, 0xb0e0, { 12, 12, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32019 {m68k_op_cmpa_16_di, 0xf1f8, 0xb0e8, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32020 {m68k_op_cmpa_16_ix, 0xf1f8, 0xb0f0, { 16, 16, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32021 {m68k_op_eor_8_d, 0xf1f8, 0xb100, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32022 {m68k_op_cmpm_8, 0xf1f8, 0xb108, { 12, 12, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32023 {m68k_op_eor_8_ai, 0xf1f8, 0xb110, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32024 {m68k_op_eor_8_pi, 0xf1f8, 0xb118, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32025 {m68k_op_eor_8_pd, 0xf1f8, 0xb120, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32026 {m68k_op_eor_8_di, 0xf1f8, 0xb128, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32027 {m68k_op_eor_8_ix, 0xf1f8, 0xb130, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32028 {m68k_op_eor_16_d, 0xf1f8, 0xb140, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32029 {m68k_op_cmpm_16, 0xf1f8, 0xb148, { 12, 12, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32030 {m68k_op_eor_16_ai, 0xf1f8, 0xb150, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32031 {m68k_op_eor_16_pi, 0xf1f8, 0xb158, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32032 {m68k_op_eor_16_pd, 0xf1f8, 0xb160, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32033 {m68k_op_eor_16_di, 0xf1f8, 0xb168, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32034 {m68k_op_eor_16_ix, 0xf1f8, 0xb170, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32035 {m68k_op_eor_32_d, 0xf1f8, 0xb180, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32036 {m68k_op_cmpm_32, 0xf1f8, 0xb188, { 20, 20, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32037 {m68k_op_eor_32_ai, 0xf1f8, 0xb190, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32038 {m68k_op_eor_32_pi, 0xf1f8, 0xb198, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32039 {m68k_op_eor_32_pd, 0xf1f8, 0xb1a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32040 {m68k_op_eor_32_di, 0xf1f8, 0xb1a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32041 {m68k_op_eor_32_ix, 0xf1f8, 0xb1b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32042 {m68k_op_cmpa_32_d, 0xf1f8, 0xb1c0, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32043 {m68k_op_cmpa_32_a, 0xf1f8, 0xb1c8, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32044 {m68k_op_cmpa_32_ai, 0xf1f8, 0xb1d0, { 14, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32045 {m68k_op_cmpa_32_pi, 0xf1f8, 0xb1d8, { 14, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32046 {m68k_op_cmpa_32_pd, 0xf1f8, 0xb1e0, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32047 {m68k_op_cmpa_32_di, 0xf1f8, 0xb1e8, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32048 {m68k_op_cmpa_32_ix, 0xf1f8, 0xb1f0, { 20, 20, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32049 {m68k_op_and_8_er_d, 0xf1f8, 0xc000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32050 {m68k_op_and_8_er_ai, 0xf1f8, 0xc010, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32051 {m68k_op_and_8_er_pi, 0xf1f8, 0xc018, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32052 {m68k_op_and_8_er_pd, 0xf1f8, 0xc020, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32053 {m68k_op_and_8_er_di, 0xf1f8, 0xc028, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32054 {m68k_op_and_8_er_ix, 0xf1f8, 0xc030, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32055 {m68k_op_and_16_er_d, 0xf1f8, 0xc040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32056 {m68k_op_and_16_er_ai, 0xf1f8, 0xc050, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32057 {m68k_op_and_16_er_pi, 0xf1f8, 0xc058, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32058 {m68k_op_and_16_er_pd, 0xf1f8, 0xc060, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32059 {m68k_op_and_16_er_di, 0xf1f8, 0xc068, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32060 {m68k_op_and_16_er_ix, 0xf1f8, 0xc070, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32061 {m68k_op_and_32_er_d, 0xf1f8, 0xc080, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32062 {m68k_op_and_32_er_ai, 0xf1f8, 0xc090, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32063 {m68k_op_and_32_er_pi, 0xf1f8, 0xc098, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32064 {m68k_op_and_32_er_pd, 0xf1f8, 0xc0a0, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32065 {m68k_op_and_32_er_di, 0xf1f8, 0xc0a8, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32066 {m68k_op_and_32_er_ix, 0xf1f8, 0xc0b0, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32067 {m68k_op_mulu_16_d, 0xf1f8, 0xc0c0, { 54, 30, 27, 27, 27, 27, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32068 {m68k_op_mulu_16_ai, 0xf1f8, 0xc0d0, { 58, 34, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32069 {m68k_op_mulu_16_pi, 0xf1f8, 0xc0d8, { 58, 34, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32070 {m68k_op_mulu_16_pd, 0xf1f8, 0xc0e0, { 60, 36, 32, 32, 32, 32, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32071 {m68k_op_mulu_16_di, 0xf1f8, 0xc0e8, { 62, 38, 32, 32, 32, 32, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32072 {m68k_op_mulu_16_ix, 0xf1f8, 0xc0f0, { 64, 40, 34, 34, 34, 34, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32073 {m68k_op_abcd_8_rr, 0xf1f8, 0xc100, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32074 {m68k_op_abcd_8_mm, 0xf1f8, 0xc108, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32075 {m68k_op_and_8_re_ai, 0xf1f8, 0xc110, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32076 {m68k_op_and_8_re_pi, 0xf1f8, 0xc118, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32077 {m68k_op_and_8_re_pd, 0xf1f8, 0xc120, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32078 {m68k_op_and_8_re_di, 0xf1f8, 0xc128, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32079 {m68k_op_and_8_re_ix, 0xf1f8, 0xc130, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32080 {m68k_op_exg_32_dd, 0xf1f8, 0xc140, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32081 {m68k_op_exg_32_aa, 0xf1f8, 0xc148, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32082 {m68k_op_and_16_re_ai, 0xf1f8, 0xc150, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32083 {m68k_op_and_16_re_pi, 0xf1f8, 0xc158, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32084 {m68k_op_and_16_re_pd, 0xf1f8, 0xc160, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32085 {m68k_op_and_16_re_di, 0xf1f8, 0xc168, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32086 {m68k_op_and_16_re_ix, 0xf1f8, 0xc170, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32087 {m68k_op_exg_32_da, 0xf1f8, 0xc188, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32088 {m68k_op_and_32_re_ai, 0xf1f8, 0xc190, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32089 {m68k_op_and_32_re_pi, 0xf1f8, 0xc198, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32090 {m68k_op_and_32_re_pd, 0xf1f8, 0xc1a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32091 {m68k_op_and_32_re_di, 0xf1f8, 0xc1a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32092 {m68k_op_and_32_re_ix, 0xf1f8, 0xc1b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32093 {m68k_op_muls_16_d, 0xf1f8, 0xc1c0, { 54, 32, 27, 27, 27, 27, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32094 {m68k_op_muls_16_ai, 0xf1f8, 0xc1d0, { 58, 36, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32095 {m68k_op_muls_16_pi, 0xf1f8, 0xc1d8, { 58, 36, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32096 {m68k_op_muls_16_pd, 0xf1f8, 0xc1e0, { 60, 38, 32, 32, 32, 32, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32097 {m68k_op_muls_16_di, 0xf1f8, 0xc1e8, { 62, 40, 32, 32, 32, 32, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32098 {m68k_op_muls_16_ix, 0xf1f8, 0xc1f0, { 64, 42, 34, 34, 34, 34, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32099 {m68k_op_add_8_er_d, 0xf1f8, 0xd000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32100 {m68k_op_add_8_er_ai, 0xf1f8, 0xd010, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32101 {m68k_op_add_8_er_pi, 0xf1f8, 0xd018, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32102 {m68k_op_add_8_er_pd, 0xf1f8, 0xd020, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32103 {m68k_op_add_8_er_di, 0xf1f8, 0xd028, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32104 {m68k_op_add_8_er_ix, 0xf1f8, 0xd030, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32105 {m68k_op_add_16_er_d, 0xf1f8, 0xd040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32106 {m68k_op_add_16_er_a, 0xf1f8, 0xd048, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32107 {m68k_op_add_16_er_ai, 0xf1f8, 0xd050, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32108 {m68k_op_add_16_er_pi, 0xf1f8, 0xd058, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32109 {m68k_op_add_16_er_pd, 0xf1f8, 0xd060, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32110 {m68k_op_add_16_er_di, 0xf1f8, 0xd068, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32111 {m68k_op_add_16_er_ix, 0xf1f8, 0xd070, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32112 {m68k_op_add_32_er_d, 0xf1f8, 0xd080, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32113 {m68k_op_add_32_er_a, 0xf1f8, 0xd088, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32114 {m68k_op_add_32_er_ai, 0xf1f8, 0xd090, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32115 {m68k_op_add_32_er_pi, 0xf1f8, 0xd098, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32116 {m68k_op_add_32_er_pd, 0xf1f8, 0xd0a0, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32117 {m68k_op_add_32_er_di, 0xf1f8, 0xd0a8, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32118 {m68k_op_add_32_er_ix, 0xf1f8, 0xd0b0, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32119 {m68k_op_adda_16_d, 0xf1f8, 0xd0c0, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32120 {m68k_op_adda_16_a, 0xf1f8, 0xd0c8, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32121 {m68k_op_adda_16_ai, 0xf1f8, 0xd0d0, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32122 {m68k_op_adda_16_pi, 0xf1f8, 0xd0d8, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32123 {m68k_op_adda_16_pd, 0xf1f8, 0xd0e0, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32124 {m68k_op_adda_16_di, 0xf1f8, 0xd0e8, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32125 {m68k_op_adda_16_ix, 0xf1f8, 0xd0f0, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32126 {m68k_op_addx_8_rr, 0xf1f8, 0xd100, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32127 {m68k_op_addx_8_mm, 0xf1f8, 0xd108, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32128 {m68k_op_add_8_re_ai, 0xf1f8, 0xd110, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32129 {m68k_op_add_8_re_pi, 0xf1f8, 0xd118, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32130 {m68k_op_add_8_re_pd, 0xf1f8, 0xd120, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32131 {m68k_op_add_8_re_di, 0xf1f8, 0xd128, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32132 {m68k_op_add_8_re_ix, 0xf1f8, 0xd130, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32133 {m68k_op_addx_16_rr, 0xf1f8, 0xd140, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32134 {m68k_op_addx_16_mm, 0xf1f8, 0xd148, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32135 {m68k_op_add_16_re_ai, 0xf1f8, 0xd150, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32136 {m68k_op_add_16_re_pi, 0xf1f8, 0xd158, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32137 {m68k_op_add_16_re_pd, 0xf1f8, 0xd160, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32138 {m68k_op_add_16_re_di, 0xf1f8, 0xd168, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32139 {m68k_op_add_16_re_ix, 0xf1f8, 0xd170, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32140 {m68k_op_addx_32_rr, 0xf1f8, 0xd180, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32141 {m68k_op_addx_32_mm, 0xf1f8, 0xd188, { 30, 30, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32142 {m68k_op_add_32_re_ai, 0xf1f8, 0xd190, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32143 {m68k_op_add_32_re_pi, 0xf1f8, 0xd198, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32144 {m68k_op_add_32_re_pd, 0xf1f8, 0xd1a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32145 {m68k_op_add_32_re_di, 0xf1f8, 0xd1a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32146 {m68k_op_add_32_re_ix, 0xf1f8, 0xd1b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32147 {m68k_op_adda_32_d, 0xf1f8, 0xd1c0, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32148 {m68k_op_adda_32_a, 0xf1f8, 0xd1c8, { 8, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32149 {m68k_op_adda_32_ai, 0xf1f8, 0xd1d0, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32150 {m68k_op_adda_32_pi, 0xf1f8, 0xd1d8, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32151 {m68k_op_adda_32_pd, 0xf1f8, 0xd1e0, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32152 {m68k_op_adda_32_di, 0xf1f8, 0xd1e8, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32153 {m68k_op_adda_32_ix, 0xf1f8, 0xd1f0, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32154 {m68k_op_asr_8_s, 0xf1f8, 0xe000, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32155 {m68k_op_lsr_8_s, 0xf1f8, 0xe008, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32156 {m68k_op_roxr_8_s, 0xf1f8, 0xe010, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32157 {m68k_op_ror_8_s, 0xf1f8, 0xe018, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32158 {m68k_op_asr_8_r, 0xf1f8, 0xe020, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32159 {m68k_op_lsr_8_r, 0xf1f8, 0xe028, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32160 {m68k_op_roxr_8_r, 0xf1f8, 0xe030, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32161 {m68k_op_ror_8_r, 0xf1f8, 0xe038, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32162 {m68k_op_asr_16_s, 0xf1f8, 0xe040, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32163 {m68k_op_lsr_16_s, 0xf1f8, 0xe048, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32164 {m68k_op_roxr_16_s, 0xf1f8, 0xe050, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32165 {m68k_op_ror_16_s, 0xf1f8, 0xe058, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32166 {m68k_op_asr_16_r, 0xf1f8, 0xe060, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32167 {m68k_op_lsr_16_r, 0xf1f8, 0xe068, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32168 {m68k_op_roxr_16_r, 0xf1f8, 0xe070, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32169 {m68k_op_ror_16_r, 0xf1f8, 0xe078, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32170 {m68k_op_asr_32_s, 0xf1f8, 0xe080, { 8, 8, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32171 {m68k_op_lsr_32_s, 0xf1f8, 0xe088, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32172 {m68k_op_roxr_32_s, 0xf1f8, 0xe090, { 8, 8, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32173 {m68k_op_ror_32_s, 0xf1f8, 0xe098, { 8, 8, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32174 {m68k_op_asr_32_r, 0xf1f8, 0xe0a0, { 8, 8, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32175 {m68k_op_lsr_32_r, 0xf1f8, 0xe0a8, { 8, 8, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32176 {m68k_op_roxr_32_r, 0xf1f8, 0xe0b0, { 8, 8, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32177 {m68k_op_ror_32_r, 0xf1f8, 0xe0b8, { 8, 8, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32178 {m68k_op_asl_8_s, 0xf1f8, 0xe100, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32179 {m68k_op_lsl_8_s, 0xf1f8, 0xe108, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32180 {m68k_op_roxl_8_s, 0xf1f8, 0xe110, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32181 {m68k_op_rol_8_s, 0xf1f8, 0xe118, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32182 {m68k_op_asl_8_r, 0xf1f8, 0xe120, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32183 {m68k_op_lsl_8_r, 0xf1f8, 0xe128, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32184 {m68k_op_roxl_8_r, 0xf1f8, 0xe130, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32185 {m68k_op_rol_8_r, 0xf1f8, 0xe138, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32186 {m68k_op_asl_16_s, 0xf1f8, 0xe140, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32187 {m68k_op_lsl_16_s, 0xf1f8, 0xe148, { 6, 6, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32188 {m68k_op_roxl_16_s, 0xf1f8, 0xe150, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32189 {m68k_op_rol_16_s, 0xf1f8, 0xe158, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32190 {m68k_op_asl_16_r, 0xf1f8, 0xe160, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32191 {m68k_op_lsl_16_r, 0xf1f8, 0xe168, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32192 {m68k_op_roxl_16_r, 0xf1f8, 0xe170, { 6, 6, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32193 {m68k_op_rol_16_r, 0xf1f8, 0xe178, { 6, 6, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32194 {m68k_op_asl_32_s, 0xf1f8, 0xe180, { 8, 8, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32195 {m68k_op_lsl_32_s, 0xf1f8, 0xe188, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32196 {m68k_op_roxl_32_s, 0xf1f8, 0xe190, { 8, 8, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32197 {m68k_op_rol_32_s, 0xf1f8, 0xe198, { 8, 8, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32198 {m68k_op_asl_32_r, 0xf1f8, 0xe1a0, { 8, 8, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32199 {m68k_op_lsl_32_r, 0xf1f8, 0xe1a8, { 8, 8, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32200 {m68k_op_roxl_32_r, 0xf1f8, 0xe1b0, { 8, 8, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32201 {m68k_op_rol_32_r, 0xf1f8, 0xe1b8, { 8, 8, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32202 {m68k_op_cpdbcc_32, 0xf1f8, 0xf048, {255, 255, 4, 4, 255, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32203 {m68k_op_cptrapcc_32, 0xf1f8, 0xf078, {255, 255, 4, 4, 255, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32204 {m68k_op_ptest_32, 0xffd8, 0xf548, {255, 255, 255, 255, 8, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32205 {m68k_op_rtm_32, 0xfff0, 0x06c0, {255, 255, 19, 19, 19, 19, 19}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32206 {m68k_op_trap, 0xfff0, 0x4e40, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32207 {m68k_op_btst_8_r_pi7, 0xf1ff, 0x011f, { 8, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32208 {m68k_op_btst_8_r_pd7, 0xf1ff, 0x0127, { 10, 10, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32209 {m68k_op_btst_8_r_aw, 0xf1ff, 0x0138, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32210 {m68k_op_btst_8_r_al, 0xf1ff, 0x0139, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32211 {m68k_op_btst_8_r_pcdi, 0xf1ff, 0x013a, { 12, 12, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32212 {m68k_op_btst_8_r_pcix, 0xf1ff, 0x013b, { 14, 14, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32213 {m68k_op_btst_8_r_i, 0xf1ff, 0x013c, { 8, 8, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32214 {m68k_op_bchg_8_r_pi7, 0xf1ff, 0x015f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32215 {m68k_op_bchg_8_r_pd7, 0xf1ff, 0x0167, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32216 {m68k_op_bchg_8_r_aw, 0xf1ff, 0x0178, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32217 {m68k_op_bchg_8_r_al, 0xf1ff, 0x0179, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32218 {m68k_op_bclr_8_r_pi7, 0xf1ff, 0x019f, { 12, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32219 {m68k_op_bclr_8_r_pd7, 0xf1ff, 0x01a7, { 14, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32220 {m68k_op_bclr_8_r_aw, 0xf1ff, 0x01b8, { 16, 18, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32221 {m68k_op_bclr_8_r_al, 0xf1ff, 0x01b9, { 20, 22, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32222 {m68k_op_bset_8_r_pi7, 0xf1ff, 0x01df, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32223 {m68k_op_bset_8_r_pd7, 0xf1ff, 0x01e7, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32224 {m68k_op_bset_8_r_aw, 0xf1ff, 0x01f8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32225 {m68k_op_bset_8_r_al, 0xf1ff, 0x01f9, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32226 {m68k_op_move_8_d_pi7, 0xf1ff, 0x101f, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32227 {m68k_op_move_8_d_pd7, 0xf1ff, 0x1027, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32228 {m68k_op_move_8_d_aw, 0xf1ff, 0x1038, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32229 {m68k_op_move_8_d_al, 0xf1ff, 0x1039, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32230 {m68k_op_move_8_d_pcdi, 0xf1ff, 0x103a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32231 {m68k_op_move_8_d_pcix, 0xf1ff, 0x103b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32232 {m68k_op_move_8_d_i, 0xf1ff, 0x103c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32233 {m68k_op_move_8_ai_pi7, 0xf1ff, 0x109f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32234 {m68k_op_move_8_ai_pd7, 0xf1ff, 0x10a7, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32235 {m68k_op_move_8_ai_aw, 0xf1ff, 0x10b8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32236 {m68k_op_move_8_ai_al, 0xf1ff, 0x10b9, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32237 {m68k_op_move_8_ai_pcdi, 0xf1ff, 0x10ba, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32238 {m68k_op_move_8_ai_pcix, 0xf1ff, 0x10bb, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32239 {m68k_op_move_8_ai_i, 0xf1ff, 0x10bc, { 12, 12, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32240 {m68k_op_move_8_pi_pi7, 0xf1ff, 0x10df, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32241 {m68k_op_move_8_pi_pd7, 0xf1ff, 0x10e7, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32242 {m68k_op_move_8_pi_aw, 0xf1ff, 0x10f8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32243 {m68k_op_move_8_pi_al, 0xf1ff, 0x10f9, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32244 {m68k_op_move_8_pi_pcdi, 0xf1ff, 0x10fa, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32245 {m68k_op_move_8_pi_pcix, 0xf1ff, 0x10fb, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32246 {m68k_op_move_8_pi_i, 0xf1ff, 0x10fc, { 12, 12, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32247 {m68k_op_move_8_pd_pi7, 0xf1ff, 0x111f, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32248 {m68k_op_move_8_pd_pd7, 0xf1ff, 0x1127, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32249 {m68k_op_move_8_pd_aw, 0xf1ff, 0x1138, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32250 {m68k_op_move_8_pd_al, 0xf1ff, 0x1139, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32251 {m68k_op_move_8_pd_pcdi, 0xf1ff, 0x113a, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32252 {m68k_op_move_8_pd_pcix, 0xf1ff, 0x113b, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32253 {m68k_op_move_8_pd_i, 0xf1ff, 0x113c, { 12, 12, 7, 7, 7, 7, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32254 {m68k_op_move_8_di_pi7, 0xf1ff, 0x115f, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32255 {m68k_op_move_8_di_pd7, 0xf1ff, 0x1167, { 18, 18, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32256 {m68k_op_move_8_di_aw, 0xf1ff, 0x1178, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32257 {m68k_op_move_8_di_al, 0xf1ff, 0x1179, { 24, 24, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32258 {m68k_op_move_8_di_pcdi, 0xf1ff, 0x117a, { 20, 20, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32259 {m68k_op_move_8_di_pcix, 0xf1ff, 0x117b, { 22, 22, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32260 {m68k_op_move_8_di_i, 0xf1ff, 0x117c, { 16, 16, 7, 7, 7, 7, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32261 {m68k_op_move_8_ix_pi7, 0xf1ff, 0x119f, { 18, 18, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32262 {m68k_op_move_8_ix_pd7, 0xf1ff, 0x11a7, { 20, 20, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32263 {m68k_op_move_8_ix_aw, 0xf1ff, 0x11b8, { 22, 22, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32264 {m68k_op_move_8_ix_al, 0xf1ff, 0x11b9, { 26, 26, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32265 {m68k_op_move_8_ix_pcdi, 0xf1ff, 0x11ba, { 22, 22, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32266 {m68k_op_move_8_ix_pcix, 0xf1ff, 0x11bb, { 24, 24, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32267 {m68k_op_move_8_ix_i, 0xf1ff, 0x11bc, { 18, 18, 9, 9, 9, 9, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32268 {m68k_op_move_32_d_aw, 0xf1ff, 0x2038, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32269 {m68k_op_move_32_d_al, 0xf1ff, 0x2039, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32270 {m68k_op_move_32_d_pcdi, 0xf1ff, 0x203a, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32271 {m68k_op_move_32_d_pcix, 0xf1ff, 0x203b, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32272 {m68k_op_move_32_d_i, 0xf1ff, 0x203c, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32273 {m68k_op_movea_32_aw, 0xf1ff, 0x2078, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32274 {m68k_op_movea_32_al, 0xf1ff, 0x2079, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32275 {m68k_op_movea_32_pcdi, 0xf1ff, 0x207a, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32276 {m68k_op_movea_32_pcix, 0xf1ff, 0x207b, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32277 {m68k_op_movea_32_i, 0xf1ff, 0x207c, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32278 {m68k_op_move_32_ai_aw, 0xf1ff, 0x20b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32279 {m68k_op_move_32_ai_al, 0xf1ff, 0x20b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32280 {m68k_op_move_32_ai_pcdi, 0xf1ff, 0x20ba, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32281 {m68k_op_move_32_ai_pcix, 0xf1ff, 0x20bb, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32282 {m68k_op_move_32_ai_i, 0xf1ff, 0x20bc, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32283 {m68k_op_move_32_pi_aw, 0xf1ff, 0x20f8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32284 {m68k_op_move_32_pi_al, 0xf1ff, 0x20f9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32285 {m68k_op_move_32_pi_pcdi, 0xf1ff, 0x20fa, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32286 {m68k_op_move_32_pi_pcix, 0xf1ff, 0x20fb, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32287 {m68k_op_move_32_pi_i, 0xf1ff, 0x20fc, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32288 {m68k_op_move_32_pd_aw, 0xf1ff, 0x2138, { 24, 26, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32289 {m68k_op_move_32_pd_al, 0xf1ff, 0x2139, { 28, 30, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32290 {m68k_op_move_32_pd_pcdi, 0xf1ff, 0x213a, { 24, 26, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32291 {m68k_op_move_32_pd_pcix, 0xf1ff, 0x213b, { 26, 28, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32292 {m68k_op_move_32_pd_i, 0xf1ff, 0x213c, { 20, 22, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32293 {m68k_op_move_32_di_aw, 0xf1ff, 0x2178, { 28, 28, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32294 {m68k_op_move_32_di_al, 0xf1ff, 0x2179, { 32, 32, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32295 {m68k_op_move_32_di_pcdi, 0xf1ff, 0x217a, { 28, 28, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32296 {m68k_op_move_32_di_pcix, 0xf1ff, 0x217b, { 30, 30, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32297 {m68k_op_move_32_di_i, 0xf1ff, 0x217c, { 24, 24, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32298 {m68k_op_move_32_ix_aw, 0xf1ff, 0x21b8, { 30, 30, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32299 {m68k_op_move_32_ix_al, 0xf1ff, 0x21b9, { 34, 34, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32300 {m68k_op_move_32_ix_pcdi, 0xf1ff, 0x21ba, { 30, 30, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32301 {m68k_op_move_32_ix_pcix, 0xf1ff, 0x21bb, { 32, 32, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32302 {m68k_op_move_32_ix_i, 0xf1ff, 0x21bc, { 26, 26, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32303 {m68k_op_move_16_d_aw, 0xf1ff, 0x3038, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32304 {m68k_op_move_16_d_al, 0xf1ff, 0x3039, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32305 {m68k_op_move_16_d_pcdi, 0xf1ff, 0x303a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32306 {m68k_op_move_16_d_pcix, 0xf1ff, 0x303b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32307 {m68k_op_move_16_d_i, 0xf1ff, 0x303c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32308 {m68k_op_movea_16_aw, 0xf1ff, 0x3078, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32309 {m68k_op_movea_16_al, 0xf1ff, 0x3079, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32310 {m68k_op_movea_16_pcdi, 0xf1ff, 0x307a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32311 {m68k_op_movea_16_pcix, 0xf1ff, 0x307b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32312 {m68k_op_movea_16_i, 0xf1ff, 0x307c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32313 {m68k_op_move_16_ai_aw, 0xf1ff, 0x30b8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32314 {m68k_op_move_16_ai_al, 0xf1ff, 0x30b9, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32315 {m68k_op_move_16_ai_pcdi, 0xf1ff, 0x30ba, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32316 {m68k_op_move_16_ai_pcix, 0xf1ff, 0x30bb, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32317 {m68k_op_move_16_ai_i, 0xf1ff, 0x30bc, { 12, 12, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32318 {m68k_op_move_16_pi_aw, 0xf1ff, 0x30f8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32319 {m68k_op_move_16_pi_al, 0xf1ff, 0x30f9, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32320 {m68k_op_move_16_pi_pcdi, 0xf1ff, 0x30fa, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32321 {m68k_op_move_16_pi_pcix, 0xf1ff, 0x30fb, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32322 {m68k_op_move_16_pi_i, 0xf1ff, 0x30fc, { 12, 12, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32323 {m68k_op_move_16_pd_aw, 0xf1ff, 0x3138, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32324 {m68k_op_move_16_pd_al, 0xf1ff, 0x3139, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32325 {m68k_op_move_16_pd_pcdi, 0xf1ff, 0x313a, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32326 {m68k_op_move_16_pd_pcix, 0xf1ff, 0x313b, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32327 {m68k_op_move_16_pd_i, 0xf1ff, 0x313c, { 12, 12, 7, 7, 7, 7, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32328 {m68k_op_move_16_di_aw, 0xf1ff, 0x3178, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32329 {m68k_op_move_16_di_al, 0xf1ff, 0x3179, { 24, 24, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32330 {m68k_op_move_16_di_pcdi, 0xf1ff, 0x317a, { 20, 20, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32331 {m68k_op_move_16_di_pcix, 0xf1ff, 0x317b, { 22, 22, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32332 {m68k_op_move_16_di_i, 0xf1ff, 0x317c, { 16, 16, 7, 7, 7, 7, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32333 {m68k_op_move_16_ix_aw, 0xf1ff, 0x31b8, { 22, 22, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32334 {m68k_op_move_16_ix_al, 0xf1ff, 0x31b9, { 26, 26, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32335 {m68k_op_move_16_ix_pcdi, 0xf1ff, 0x31ba, { 22, 22, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32336 {m68k_op_move_16_ix_pcix, 0xf1ff, 0x31bb, { 24, 24, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32337 {m68k_op_move_16_ix_i, 0xf1ff, 0x31bc, { 18, 18, 9, 9, 9, 9, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32338 {m68k_op_chk_32_aw, 0xf1ff, 0x4138, {255, 255, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32339 {m68k_op_chk_32_al, 0xf1ff, 0x4139, {255, 255, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32340 {m68k_op_chk_32_pcdi, 0xf1ff, 0x413a, {255, 255, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32341 {m68k_op_chk_32_pcix, 0xf1ff, 0x413b, {255, 255, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32342 {m68k_op_chk_32_i, 0xf1ff, 0x413c, {255, 255, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32343 {m68k_op_chk_16_aw, 0xf1ff, 0x41b8, { 18, 16, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32344 {m68k_op_chk_16_al, 0xf1ff, 0x41b9, { 22, 20, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32345 {m68k_op_chk_16_pcdi, 0xf1ff, 0x41ba, { 18, 16, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32346 {m68k_op_chk_16_pcix, 0xf1ff, 0x41bb, { 20, 18, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32347 {m68k_op_chk_16_i, 0xf1ff, 0x41bc, { 14, 12, 10, 10, 10, 10, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32348 {m68k_op_lea_32_aw, 0xf1ff, 0x41f8, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32349 {m68k_op_lea_32_al, 0xf1ff, 0x41f9, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32350 {m68k_op_lea_32_pcdi, 0xf1ff, 0x41fa, { 8, 8, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32351 {m68k_op_lea_32_pcix, 0xf1ff, 0x41fb, { 12, 12, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32352 {m68k_op_addq_8_pi7, 0xf1ff, 0x501f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32353 {m68k_op_addq_8_pd7, 0xf1ff, 0x5027, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32354 {m68k_op_addq_8_aw, 0xf1ff, 0x5038, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32355 {m68k_op_addq_8_al, 0xf1ff, 0x5039, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32356 {m68k_op_addq_16_aw, 0xf1ff, 0x5078, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32357 {m68k_op_addq_16_al, 0xf1ff, 0x5079, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32358 {m68k_op_addq_32_aw, 0xf1ff, 0x50b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32359 {m68k_op_addq_32_al, 0xf1ff, 0x50b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32360 {m68k_op_subq_8_pi7, 0xf1ff, 0x511f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32361 {m68k_op_subq_8_pd7, 0xf1ff, 0x5127, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32362 {m68k_op_subq_8_aw, 0xf1ff, 0x5138, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32363 {m68k_op_subq_8_al, 0xf1ff, 0x5139, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32364 {m68k_op_subq_16_aw, 0xf1ff, 0x5178, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32365 {m68k_op_subq_16_al, 0xf1ff, 0x5179, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32366 {m68k_op_subq_32_aw, 0xf1ff, 0x51b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32367 {m68k_op_subq_32_al, 0xf1ff, 0x51b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32368 {m68k_op_or_8_er_pi7, 0xf1ff, 0x801f, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32369 {m68k_op_or_8_er_pd7, 0xf1ff, 0x8027, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32370 {m68k_op_or_8_er_aw, 0xf1ff, 0x8038, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32371 {m68k_op_or_8_er_al, 0xf1ff, 0x8039, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32372 {m68k_op_or_8_er_pcdi, 0xf1ff, 0x803a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32373 {m68k_op_or_8_er_pcix, 0xf1ff, 0x803b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32374 {m68k_op_or_8_er_i, 0xf1ff, 0x803c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32375 {m68k_op_or_16_er_aw, 0xf1ff, 0x8078, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32376 {m68k_op_or_16_er_al, 0xf1ff, 0x8079, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32377 {m68k_op_or_16_er_pcdi, 0xf1ff, 0x807a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32378 {m68k_op_or_16_er_pcix, 0xf1ff, 0x807b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32379 {m68k_op_or_16_er_i, 0xf1ff, 0x807c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32380 {m68k_op_or_32_er_aw, 0xf1ff, 0x80b8, { 18, 18, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32381 {m68k_op_or_32_er_al, 0xf1ff, 0x80b9, { 22, 22, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32382 {m68k_op_or_32_er_pcdi, 0xf1ff, 0x80ba, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32383 {m68k_op_or_32_er_pcix, 0xf1ff, 0x80bb, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32384 {m68k_op_or_32_er_i, 0xf1ff, 0x80bc, { 16, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32385 {m68k_op_divu_16_aw, 0xf1ff, 0x80f8, {148, 116, 48, 48, 48, 48, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32386 {m68k_op_divu_16_al, 0xf1ff, 0x80f9, {152, 120, 48, 48, 48, 48, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32387 {m68k_op_divu_16_pcdi, 0xf1ff, 0x80fa, {148, 116, 49, 49, 49, 49, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32388 {m68k_op_divu_16_pcix, 0xf1ff, 0x80fb, {150, 118, 51, 51, 51, 51, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32389 {m68k_op_divu_16_i, 0xf1ff, 0x80fc, {144, 112, 46, 46, 46, 46, 44}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32390 {m68k_op_sbcd_8_mm_ay7, 0xf1ff, 0x810f, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32391 {m68k_op_or_8_re_pi7, 0xf1ff, 0x811f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32392 {m68k_op_or_8_re_pd7, 0xf1ff, 0x8127, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32393 {m68k_op_or_8_re_aw, 0xf1ff, 0x8138, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32394 {m68k_op_or_8_re_al, 0xf1ff, 0x8139, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32395 {m68k_op_pack_16_mm_ay7, 0xf1ff, 0x814f, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32396 {m68k_op_or_16_re_aw, 0xf1ff, 0x8178, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32397 {m68k_op_or_16_re_al, 0xf1ff, 0x8179, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32398 {m68k_op_unpk_16_mm_ay7, 0xf1ff, 0x818f, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32399 {m68k_op_or_32_re_aw, 0xf1ff, 0x81b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32400 {m68k_op_or_32_re_al, 0xf1ff, 0x81b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32401 {m68k_op_divs_16_aw, 0xf1ff, 0x81f8, {166, 130, 60, 60, 60, 60, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32402 {m68k_op_divs_16_al, 0xf1ff, 0x81f9, {170, 134, 60, 60, 60, 60, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32403 {m68k_op_divs_16_pcdi, 0xf1ff, 0x81fa, {166, 130, 61, 61, 61, 61, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32404 {m68k_op_divs_16_pcix, 0xf1ff, 0x81fb, {168, 132, 63, 63, 63, 63, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32405 {m68k_op_divs_16_i, 0xf1ff, 0x81fc, {162, 126, 58, 58, 58, 58, 56}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32406 {m68k_op_sub_8_er_pi7, 0xf1ff, 0x901f, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32407 {m68k_op_sub_8_er_pd7, 0xf1ff, 0x9027, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32408 {m68k_op_sub_8_er_aw, 0xf1ff, 0x9038, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32409 {m68k_op_sub_8_er_al, 0xf1ff, 0x9039, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32410 {m68k_op_sub_8_er_pcdi, 0xf1ff, 0x903a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32411 {m68k_op_sub_8_er_pcix, 0xf1ff, 0x903b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32412 {m68k_op_sub_8_er_i, 0xf1ff, 0x903c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32413 {m68k_op_sub_16_er_aw, 0xf1ff, 0x9078, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32414 {m68k_op_sub_16_er_al, 0xf1ff, 0x9079, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32415 {m68k_op_sub_16_er_pcdi, 0xf1ff, 0x907a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32416 {m68k_op_sub_16_er_pcix, 0xf1ff, 0x907b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32417 {m68k_op_sub_16_er_i, 0xf1ff, 0x907c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32418 {m68k_op_sub_32_er_aw, 0xf1ff, 0x90b8, { 18, 18, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32419 {m68k_op_sub_32_er_al, 0xf1ff, 0x90b9, { 22, 22, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32420 {m68k_op_sub_32_er_pcdi, 0xf1ff, 0x90ba, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32421 {m68k_op_sub_32_er_pcix, 0xf1ff, 0x90bb, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32422 {m68k_op_sub_32_er_i, 0xf1ff, 0x90bc, { 16, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32423 {m68k_op_suba_16_aw, 0xf1ff, 0x90f8, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32424 {m68k_op_suba_16_al, 0xf1ff, 0x90f9, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32425 {m68k_op_suba_16_pcdi, 0xf1ff, 0x90fa, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32426 {m68k_op_suba_16_pcix, 0xf1ff, 0x90fb, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32427 {m68k_op_suba_16_i, 0xf1ff, 0x90fc, { 12, 12, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32428 {m68k_op_subx_8_mm_ay7, 0xf1ff, 0x910f, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32429 {m68k_op_sub_8_re_pi7, 0xf1ff, 0x911f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32430 {m68k_op_sub_8_re_pd7, 0xf1ff, 0x9127, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32431 {m68k_op_sub_8_re_aw, 0xf1ff, 0x9138, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32432 {m68k_op_sub_8_re_al, 0xf1ff, 0x9139, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32433 {m68k_op_sub_16_re_aw, 0xf1ff, 0x9178, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32434 {m68k_op_sub_16_re_al, 0xf1ff, 0x9179, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32435 {m68k_op_sub_32_re_aw, 0xf1ff, 0x91b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32436 {m68k_op_sub_32_re_al, 0xf1ff, 0x91b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32437 {m68k_op_suba_32_aw, 0xf1ff, 0x91f8, { 18, 18, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32438 {m68k_op_suba_32_al, 0xf1ff, 0x91f9, { 22, 22, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32439 {m68k_op_suba_32_pcdi, 0xf1ff, 0x91fa, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32440 {m68k_op_suba_32_pcix, 0xf1ff, 0x91fb, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32441 {m68k_op_suba_32_i, 0xf1ff, 0x91fc, { 16, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32442 {m68k_op_cmp_8_pi7, 0xf1ff, 0xb01f, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32443 {m68k_op_cmp_8_pd7, 0xf1ff, 0xb027, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32444 {m68k_op_cmp_8_aw, 0xf1ff, 0xb038, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32445 {m68k_op_cmp_8_al, 0xf1ff, 0xb039, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32446 {m68k_op_cmp_8_pcdi, 0xf1ff, 0xb03a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32447 {m68k_op_cmp_8_pcix, 0xf1ff, 0xb03b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32448 {m68k_op_cmp_8_i, 0xf1ff, 0xb03c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32449 {m68k_op_cmp_16_aw, 0xf1ff, 0xb078, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32450 {m68k_op_cmp_16_al, 0xf1ff, 0xb079, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32451 {m68k_op_cmp_16_pcdi, 0xf1ff, 0xb07a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32452 {m68k_op_cmp_16_pcix, 0xf1ff, 0xb07b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32453 {m68k_op_cmp_16_i, 0xf1ff, 0xb07c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32454 {m68k_op_cmp_32_aw, 0xf1ff, 0xb0b8, { 18, 18, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32455 {m68k_op_cmp_32_al, 0xf1ff, 0xb0b9, { 22, 22, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32456 {m68k_op_cmp_32_pcdi, 0xf1ff, 0xb0ba, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32457 {m68k_op_cmp_32_pcix, 0xf1ff, 0xb0bb, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32458 {m68k_op_cmp_32_i, 0xf1ff, 0xb0bc, { 14, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32459 {m68k_op_cmpa_16_aw, 0xf1ff, 0xb0f8, { 14, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32460 {m68k_op_cmpa_16_al, 0xf1ff, 0xb0f9, { 18, 18, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32461 {m68k_op_cmpa_16_pcdi, 0xf1ff, 0xb0fa, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32462 {m68k_op_cmpa_16_pcix, 0xf1ff, 0xb0fb, { 16, 16, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32463 {m68k_op_cmpa_16_i, 0xf1ff, 0xb0fc, { 10, 10, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32464 {m68k_op_cmpm_8_ay7, 0xf1ff, 0xb10f, { 12, 12, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32465 {m68k_op_eor_8_pi7, 0xf1ff, 0xb11f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32466 {m68k_op_eor_8_pd7, 0xf1ff, 0xb127, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32467 {m68k_op_eor_8_aw, 0xf1ff, 0xb138, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32468 {m68k_op_eor_8_al, 0xf1ff, 0xb139, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32469 {m68k_op_eor_16_aw, 0xf1ff, 0xb178, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32470 {m68k_op_eor_16_al, 0xf1ff, 0xb179, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32471 {m68k_op_eor_32_aw, 0xf1ff, 0xb1b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32472 {m68k_op_eor_32_al, 0xf1ff, 0xb1b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32473 {m68k_op_cmpa_32_aw, 0xf1ff, 0xb1f8, { 18, 18, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32474 {m68k_op_cmpa_32_al, 0xf1ff, 0xb1f9, { 22, 22, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32475 {m68k_op_cmpa_32_pcdi, 0xf1ff, 0xb1fa, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32476 {m68k_op_cmpa_32_pcix, 0xf1ff, 0xb1fb, { 20, 20, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32477 {m68k_op_cmpa_32_i, 0xf1ff, 0xb1fc, { 14, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32478 {m68k_op_and_8_er_pi7, 0xf1ff, 0xc01f, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32479 {m68k_op_and_8_er_pd7, 0xf1ff, 0xc027, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32480 {m68k_op_and_8_er_aw, 0xf1ff, 0xc038, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32481 {m68k_op_and_8_er_al, 0xf1ff, 0xc039, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32482 {m68k_op_and_8_er_pcdi, 0xf1ff, 0xc03a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32483 {m68k_op_and_8_er_pcix, 0xf1ff, 0xc03b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32484 {m68k_op_and_8_er_i, 0xf1ff, 0xc03c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32485 {m68k_op_and_16_er_aw, 0xf1ff, 0xc078, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32486 {m68k_op_and_16_er_al, 0xf1ff, 0xc079, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32487 {m68k_op_and_16_er_pcdi, 0xf1ff, 0xc07a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32488 {m68k_op_and_16_er_pcix, 0xf1ff, 0xc07b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32489 {m68k_op_and_16_er_i, 0xf1ff, 0xc07c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32490 {m68k_op_and_32_er_aw, 0xf1ff, 0xc0b8, { 18, 18, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32491 {m68k_op_and_32_er_al, 0xf1ff, 0xc0b9, { 22, 22, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32492 {m68k_op_and_32_er_pcdi, 0xf1ff, 0xc0ba, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32493 {m68k_op_and_32_er_pcix, 0xf1ff, 0xc0bb, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32494 {m68k_op_and_32_er_i, 0xf1ff, 0xc0bc, { 16, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32495 {m68k_op_mulu_16_aw, 0xf1ff, 0xc0f8, { 62, 38, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32496 {m68k_op_mulu_16_al, 0xf1ff, 0xc0f9, { 66, 42, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32497 {m68k_op_mulu_16_pcdi, 0xf1ff, 0xc0fa, { 62, 38, 32, 32, 32, 32, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32498 {m68k_op_mulu_16_pcix, 0xf1ff, 0xc0fb, { 64, 40, 34, 34, 34, 34, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32499 {m68k_op_mulu_16_i, 0xf1ff, 0xc0fc, { 58, 34, 29, 29, 29, 29, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32500 {m68k_op_abcd_8_mm_ay7, 0xf1ff, 0xc10f, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32501 {m68k_op_and_8_re_pi7, 0xf1ff, 0xc11f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32502 {m68k_op_and_8_re_pd7, 0xf1ff, 0xc127, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32503 {m68k_op_and_8_re_aw, 0xf1ff, 0xc138, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32504 {m68k_op_and_8_re_al, 0xf1ff, 0xc139, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32505 {m68k_op_and_16_re_aw, 0xf1ff, 0xc178, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32506 {m68k_op_and_16_re_al, 0xf1ff, 0xc179, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32507 {m68k_op_and_32_re_aw, 0xf1ff, 0xc1b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32508 {m68k_op_and_32_re_al, 0xf1ff, 0xc1b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32509 {m68k_op_muls_16_aw, 0xf1ff, 0xc1f8, { 62, 40, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32510 {m68k_op_muls_16_al, 0xf1ff, 0xc1f9, { 66, 44, 31, 31, 31, 31, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32511 {m68k_op_muls_16_pcdi, 0xf1ff, 0xc1fa, { 62, 40, 32, 32, 32, 32, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32512 {m68k_op_muls_16_pcix, 0xf1ff, 0xc1fb, { 64, 42, 34, 34, 34, 34, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32513 {m68k_op_muls_16_i, 0xf1ff, 0xc1fc, { 58, 36, 29, 29, 29, 29, 27}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32514 {m68k_op_add_8_er_pi7, 0xf1ff, 0xd01f, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32515 {m68k_op_add_8_er_pd7, 0xf1ff, 0xd027, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32516 {m68k_op_add_8_er_aw, 0xf1ff, 0xd038, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32517 {m68k_op_add_8_er_al, 0xf1ff, 0xd039, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32518 {m68k_op_add_8_er_pcdi, 0xf1ff, 0xd03a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32519 {m68k_op_add_8_er_pcix, 0xf1ff, 0xd03b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32520 {m68k_op_add_8_er_i, 0xf1ff, 0xd03c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32521 {m68k_op_add_16_er_aw, 0xf1ff, 0xd078, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32522 {m68k_op_add_16_er_al, 0xf1ff, 0xd079, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32523 {m68k_op_add_16_er_pcdi, 0xf1ff, 0xd07a, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32524 {m68k_op_add_16_er_pcix, 0xf1ff, 0xd07b, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32525 {m68k_op_add_16_er_i, 0xf1ff, 0xd07c, { 8, 8, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32526 {m68k_op_add_32_er_aw, 0xf1ff, 0xd0b8, { 18, 18, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32527 {m68k_op_add_32_er_al, 0xf1ff, 0xd0b9, { 22, 22, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32528 {m68k_op_add_32_er_pcdi, 0xf1ff, 0xd0ba, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32529 {m68k_op_add_32_er_pcix, 0xf1ff, 0xd0bb, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32530 {m68k_op_add_32_er_i, 0xf1ff, 0xd0bc, { 16, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32531 {m68k_op_adda_16_aw, 0xf1ff, 0xd0f8, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32532 {m68k_op_adda_16_al, 0xf1ff, 0xd0f9, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32533 {m68k_op_adda_16_pcdi, 0xf1ff, 0xd0fa, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32534 {m68k_op_adda_16_pcix, 0xf1ff, 0xd0fb, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32535 {m68k_op_adda_16_i, 0xf1ff, 0xd0fc, { 12, 12, 4, 4, 4, 4, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32536 {m68k_op_addx_8_mm_ay7, 0xf1ff, 0xd10f, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32537 {m68k_op_add_8_re_pi7, 0xf1ff, 0xd11f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32538 {m68k_op_add_8_re_pd7, 0xf1ff, 0xd127, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32539 {m68k_op_add_8_re_aw, 0xf1ff, 0xd138, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32540 {m68k_op_add_8_re_al, 0xf1ff, 0xd139, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32541 {m68k_op_add_16_re_aw, 0xf1ff, 0xd178, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32542 {m68k_op_add_16_re_al, 0xf1ff, 0xd179, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32543 {m68k_op_add_32_re_aw, 0xf1ff, 0xd1b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32544 {m68k_op_add_32_re_al, 0xf1ff, 0xd1b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32545 {m68k_op_adda_32_aw, 0xf1ff, 0xd1f8, { 18, 18, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32546 {m68k_op_adda_32_al, 0xf1ff, 0xd1f9, { 22, 22, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32547 {m68k_op_adda_32_pcdi, 0xf1ff, 0xd1fa, { 18, 18, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32548 {m68k_op_adda_32_pcix, 0xf1ff, 0xd1fb, { 20, 20, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32549 {m68k_op_adda_32_i, 0xf1ff, 0xd1fc, { 16, 14, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32550 {m68k_op_ori_8_d, 0xfff8, 0x0000, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32551 {m68k_op_ori_8_ai, 0xfff8, 0x0010, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32552 {m68k_op_ori_8_pi, 0xfff8, 0x0018, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32553 {m68k_op_ori_8_pd, 0xfff8, 0x0020, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32554 {m68k_op_ori_8_di, 0xfff8, 0x0028, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32555 {m68k_op_ori_8_ix, 0xfff8, 0x0030, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32556 {m68k_op_ori_16_d, 0xfff8, 0x0040, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32557 {m68k_op_ori_16_ai, 0xfff8, 0x0050, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32558 {m68k_op_ori_16_pi, 0xfff8, 0x0058, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32559 {m68k_op_ori_16_pd, 0xfff8, 0x0060, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32560 {m68k_op_ori_16_di, 0xfff8, 0x0068, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32561 {m68k_op_ori_16_ix, 0xfff8, 0x0070, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32562 {m68k_op_ori_32_d, 0xfff8, 0x0080, { 16, 14, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32563 {m68k_op_ori_32_ai, 0xfff8, 0x0090, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32564 {m68k_op_ori_32_pi, 0xfff8, 0x0098, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32565 {m68k_op_ori_32_pd, 0xfff8, 0x00a0, { 30, 30, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32566 {m68k_op_ori_32_di, 0xfff8, 0x00a8, { 32, 32, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32567 {m68k_op_ori_32_ix, 0xfff8, 0x00b0, { 34, 34, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32568 {m68k_op_chk2cmp2_8_ai, 0xfff8, 0x00d0, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32569 {m68k_op_chk2cmp2_8_di, 0xfff8, 0x00e8, {255, 255, 23, 23, 23, 23, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32570 {m68k_op_chk2cmp2_8_ix, 0xfff8, 0x00f0, {255, 255, 25, 25, 25, 25, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32571 {m68k_op_andi_8_d, 0xfff8, 0x0200, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32572 {m68k_op_andi_8_ai, 0xfff8, 0x0210, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32573 {m68k_op_andi_8_pi, 0xfff8, 0x0218, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32574 {m68k_op_andi_8_pd, 0xfff8, 0x0220, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32575 {m68k_op_andi_8_di, 0xfff8, 0x0228, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32576 {m68k_op_andi_8_ix, 0xfff8, 0x0230, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32577 {m68k_op_andi_16_d, 0xfff8, 0x0240, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32578 {m68k_op_andi_16_ai, 0xfff8, 0x0250, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32579 {m68k_op_andi_16_pi, 0xfff8, 0x0258, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32580 {m68k_op_andi_16_pd, 0xfff8, 0x0260, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32581 {m68k_op_andi_16_di, 0xfff8, 0x0268, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32582 {m68k_op_andi_16_ix, 0xfff8, 0x0270, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32583 {m68k_op_andi_32_d, 0xfff8, 0x0280, { 14, 14, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32584 {m68k_op_andi_32_ai, 0xfff8, 0x0290, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32585 {m68k_op_andi_32_pi, 0xfff8, 0x0298, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32586 {m68k_op_andi_32_pd, 0xfff8, 0x02a0, { 30, 30, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32587 {m68k_op_andi_32_di, 0xfff8, 0x02a8, { 32, 32, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32588 {m68k_op_andi_32_ix, 0xfff8, 0x02b0, { 34, 34, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32589 {m68k_op_chk2cmp2_16_ai, 0xfff8, 0x02d0, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32590 {m68k_op_chk2cmp2_16_di, 0xfff8, 0x02e8, {255, 255, 23, 23, 23, 23, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32591 {m68k_op_chk2cmp2_16_ix, 0xfff8, 0x02f0, {255, 255, 25, 25, 25, 25, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32592 {m68k_op_subi_8_d, 0xfff8, 0x0400, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32593 {m68k_op_subi_8_ai, 0xfff8, 0x0410, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32594 {m68k_op_subi_8_pi, 0xfff8, 0x0418, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32595 {m68k_op_subi_8_pd, 0xfff8, 0x0420, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32596 {m68k_op_subi_8_di, 0xfff8, 0x0428, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32597 {m68k_op_subi_8_ix, 0xfff8, 0x0430, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32598 {m68k_op_subi_16_d, 0xfff8, 0x0440, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32599 {m68k_op_subi_16_ai, 0xfff8, 0x0450, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32600 {m68k_op_subi_16_pi, 0xfff8, 0x0458, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32601 {m68k_op_subi_16_pd, 0xfff8, 0x0460, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32602 {m68k_op_subi_16_di, 0xfff8, 0x0468, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32603 {m68k_op_subi_16_ix, 0xfff8, 0x0470, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32604 {m68k_op_subi_32_d, 0xfff8, 0x0480, { 16, 14, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32605 {m68k_op_subi_32_ai, 0xfff8, 0x0490, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32606 {m68k_op_subi_32_pi, 0xfff8, 0x0498, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32607 {m68k_op_subi_32_pd, 0xfff8, 0x04a0, { 30, 30, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32608 {m68k_op_subi_32_di, 0xfff8, 0x04a8, { 32, 32, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32609 {m68k_op_subi_32_ix, 0xfff8, 0x04b0, { 34, 34, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32610 {m68k_op_chk2cmp2_32_ai, 0xfff8, 0x04d0, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32611 {m68k_op_chk2cmp2_32_di, 0xfff8, 0x04e8, {255, 255, 23, 23, 23, 23, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32612 {m68k_op_chk2cmp2_32_ix, 0xfff8, 0x04f0, {255, 255, 25, 25, 25, 25, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32613 {m68k_op_addi_8_d, 0xfff8, 0x0600, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32614 {m68k_op_addi_8_ai, 0xfff8, 0x0610, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32615 {m68k_op_addi_8_pi, 0xfff8, 0x0618, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32616 {m68k_op_addi_8_pd, 0xfff8, 0x0620, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32617 {m68k_op_addi_8_di, 0xfff8, 0x0628, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32618 {m68k_op_addi_8_ix, 0xfff8, 0x0630, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32619 {m68k_op_addi_16_d, 0xfff8, 0x0640, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32620 {m68k_op_addi_16_ai, 0xfff8, 0x0650, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32621 {m68k_op_addi_16_pi, 0xfff8, 0x0658, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32622 {m68k_op_addi_16_pd, 0xfff8, 0x0660, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32623 {m68k_op_addi_16_di, 0xfff8, 0x0668, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32624 {m68k_op_addi_16_ix, 0xfff8, 0x0670, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32625 {m68k_op_addi_32_d, 0xfff8, 0x0680, { 16, 14, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32626 {m68k_op_addi_32_ai, 0xfff8, 0x0690, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32627 {m68k_op_addi_32_pi, 0xfff8, 0x0698, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32628 {m68k_op_addi_32_pd, 0xfff8, 0x06a0, { 30, 30, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32629 {m68k_op_addi_32_di, 0xfff8, 0x06a8, { 32, 32, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32630 {m68k_op_addi_32_ix, 0xfff8, 0x06b0, { 34, 34, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32631 {m68k_op_callm_32_ai, 0xfff8, 0x06d0, {255, 255, 64, 64, 64, 64, 60}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32632 {m68k_op_callm_32_di, 0xfff8, 0x06e8, {255, 255, 65, 65, 65, 65, 60}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32633 {m68k_op_callm_32_ix, 0xfff8, 0x06f0, {255, 255, 67, 67, 67, 67, 60}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32634 {m68k_op_btst_32_s_d, 0xfff8, 0x0800, { 10, 10, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32635 {m68k_op_btst_8_s_ai, 0xfff8, 0x0810, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32636 {m68k_op_btst_8_s_pi, 0xfff8, 0x0818, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32637 {m68k_op_btst_8_s_pd, 0xfff8, 0x0820, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32638 {m68k_op_btst_8_s_di, 0xfff8, 0x0828, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32639 {m68k_op_btst_8_s_ix, 0xfff8, 0x0830, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32640 {m68k_op_bchg_32_s_d, 0xfff8, 0x0840, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32641 {m68k_op_bchg_8_s_ai, 0xfff8, 0x0850, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32642 {m68k_op_bchg_8_s_pi, 0xfff8, 0x0858, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32643 {m68k_op_bchg_8_s_pd, 0xfff8, 0x0860, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32644 {m68k_op_bchg_8_s_di, 0xfff8, 0x0868, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32645 {m68k_op_bchg_8_s_ix, 0xfff8, 0x0870, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32646 {m68k_op_bclr_32_s_d, 0xfff8, 0x0880, { 14, 14, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32647 {m68k_op_bclr_8_s_ai, 0xfff8, 0x0890, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32648 {m68k_op_bclr_8_s_pi, 0xfff8, 0x0898, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32649 {m68k_op_bclr_8_s_pd, 0xfff8, 0x08a0, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32650 {m68k_op_bclr_8_s_di, 0xfff8, 0x08a8, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32651 {m68k_op_bclr_8_s_ix, 0xfff8, 0x08b0, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32652 {m68k_op_bset_32_s_d, 0xfff8, 0x08c0, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32653 {m68k_op_bset_8_s_ai, 0xfff8, 0x08d0, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32654 {m68k_op_bset_8_s_pi, 0xfff8, 0x08d8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32655 {m68k_op_bset_8_s_pd, 0xfff8, 0x08e0, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32656 {m68k_op_bset_8_s_di, 0xfff8, 0x08e8, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32657 {m68k_op_bset_8_s_ix, 0xfff8, 0x08f0, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32658 {m68k_op_eori_8_d, 0xfff8, 0x0a00, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32659 {m68k_op_eori_8_ai, 0xfff8, 0x0a10, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32660 {m68k_op_eori_8_pi, 0xfff8, 0x0a18, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32661 {m68k_op_eori_8_pd, 0xfff8, 0x0a20, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32662 {m68k_op_eori_8_di, 0xfff8, 0x0a28, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32663 {m68k_op_eori_8_ix, 0xfff8, 0x0a30, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32664 {m68k_op_eori_16_d, 0xfff8, 0x0a40, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32665 {m68k_op_eori_16_ai, 0xfff8, 0x0a50, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32666 {m68k_op_eori_16_pi, 0xfff8, 0x0a58, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32667 {m68k_op_eori_16_pd, 0xfff8, 0x0a60, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32668 {m68k_op_eori_16_di, 0xfff8, 0x0a68, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32669 {m68k_op_eori_16_ix, 0xfff8, 0x0a70, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32670 {m68k_op_eori_32_d, 0xfff8, 0x0a80, { 16, 14, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32671 {m68k_op_eori_32_ai, 0xfff8, 0x0a90, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32672 {m68k_op_eori_32_pi, 0xfff8, 0x0a98, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32673 {m68k_op_eori_32_pd, 0xfff8, 0x0aa0, { 30, 30, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32674 {m68k_op_eori_32_di, 0xfff8, 0x0aa8, { 32, 32, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32675 {m68k_op_eori_32_ix, 0xfff8, 0x0ab0, { 34, 34, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32676 {m68k_op_cas_8_ai, 0xfff8, 0x0ad0, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32677 {m68k_op_cas_8_pi, 0xfff8, 0x0ad8, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32678 {m68k_op_cas_8_pd, 0xfff8, 0x0ae0, {255, 255, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32679 {m68k_op_cas_8_di, 0xfff8, 0x0ae8, {255, 255, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32680 {m68k_op_cas_8_ix, 0xfff8, 0x0af0, {255, 255, 19, 19, 19, 19, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32681 {m68k_op_cmpi_8_d, 0xfff8, 0x0c00, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32682 {m68k_op_cmpi_8_ai, 0xfff8, 0x0c10, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32683 {m68k_op_cmpi_8_pi, 0xfff8, 0x0c18, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32684 {m68k_op_cmpi_8_pd, 0xfff8, 0x0c20, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32685 {m68k_op_cmpi_8_di, 0xfff8, 0x0c28, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32686 {m68k_op_cmpi_8_ix, 0xfff8, 0x0c30, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32687 {m68k_op_cmpi_16_d, 0xfff8, 0x0c40, { 8, 8, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32688 {m68k_op_cmpi_16_ai, 0xfff8, 0x0c50, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32689 {m68k_op_cmpi_16_pi, 0xfff8, 0x0c58, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32690 {m68k_op_cmpi_16_pd, 0xfff8, 0x0c60, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32691 {m68k_op_cmpi_16_di, 0xfff8, 0x0c68, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32692 {m68k_op_cmpi_16_ix, 0xfff8, 0x0c70, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32693 {m68k_op_cmpi_32_d, 0xfff8, 0x0c80, { 14, 12, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32694 {m68k_op_cmpi_32_ai, 0xfff8, 0x0c90, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32695 {m68k_op_cmpi_32_pi, 0xfff8, 0x0c98, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32696 {m68k_op_cmpi_32_pd, 0xfff8, 0x0ca0, { 22, 22, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32697 {m68k_op_cmpi_32_di, 0xfff8, 0x0ca8, { 24, 24, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32698 {m68k_op_cmpi_32_ix, 0xfff8, 0x0cb0, { 26, 26, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32699 {m68k_op_cas_16_ai, 0xfff8, 0x0cd0, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32700 {m68k_op_cas_16_pi, 0xfff8, 0x0cd8, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32701 {m68k_op_cas_16_pd, 0xfff8, 0x0ce0, {255, 255, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32702 {m68k_op_cas_16_di, 0xfff8, 0x0ce8, {255, 255, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32703 {m68k_op_cas_16_ix, 0xfff8, 0x0cf0, {255, 255, 19, 19, 19, 19, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32704 {m68k_op_moves_8_ai, 0xfff8, 0x0e10, {255, 18, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32705 {m68k_op_moves_8_pi, 0xfff8, 0x0e18, {255, 18, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32706 {m68k_op_moves_8_pd, 0xfff8, 0x0e20, {255, 20, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32707 {m68k_op_moves_8_di, 0xfff8, 0x0e28, {255, 26, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32708 {m68k_op_moves_8_ix, 0xfff8, 0x0e30, {255, 30, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32709 {m68k_op_moves_16_ai, 0xfff8, 0x0e50, {255, 18, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32710 {m68k_op_moves_16_pi, 0xfff8, 0x0e58, {255, 18, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32711 {m68k_op_moves_16_pd, 0xfff8, 0x0e60, {255, 20, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32712 {m68k_op_moves_16_di, 0xfff8, 0x0e68, {255, 26, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32713 {m68k_op_moves_16_ix, 0xfff8, 0x0e70, {255, 30, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32714 {m68k_op_moves_32_ai, 0xfff8, 0x0e90, {255, 22, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32715 {m68k_op_moves_32_pi, 0xfff8, 0x0e98, {255, 22, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32716 {m68k_op_moves_32_pd, 0xfff8, 0x0ea0, {255, 28, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32717 {m68k_op_moves_32_di, 0xfff8, 0x0ea8, {255, 32, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32718 {m68k_op_moves_32_ix, 0xfff8, 0x0eb0, {255, 36, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32719 {m68k_op_cas_32_ai, 0xfff8, 0x0ed0, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32720 {m68k_op_cas_32_pi, 0xfff8, 0x0ed8, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32721 {m68k_op_cas_32_pd, 0xfff8, 0x0ee0, {255, 255, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32722 {m68k_op_cas_32_di, 0xfff8, 0x0ee8, {255, 255, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32723 {m68k_op_cas_32_ix, 0xfff8, 0x0ef0, {255, 255, 19, 19, 19, 19, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32724 {m68k_op_move_8_aw_d, 0xfff8, 0x11c0, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32725 {m68k_op_move_8_aw_ai, 0xfff8, 0x11d0, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32726 {m68k_op_move_8_aw_pi, 0xfff8, 0x11d8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32727 {m68k_op_move_8_aw_pd, 0xfff8, 0x11e0, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32728 {m68k_op_move_8_aw_di, 0xfff8, 0x11e8, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32729 {m68k_op_move_8_aw_ix, 0xfff8, 0x11f0, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32730 {m68k_op_move_8_al_d, 0xfff8, 0x13c0, { 16, 16, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32731 {m68k_op_move_8_al_ai, 0xfff8, 0x13d0, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32732 {m68k_op_move_8_al_pi, 0xfff8, 0x13d8, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32733 {m68k_op_move_8_al_pd, 0xfff8, 0x13e0, { 22, 22, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32734 {m68k_op_move_8_al_di, 0xfff8, 0x13e8, { 24, 24, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32735 {m68k_op_move_8_al_ix, 0xfff8, 0x13f0, { 26, 26, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32736 {m68k_op_move_8_pi7_d, 0xfff8, 0x1ec0, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32737 {m68k_op_move_8_pi7_ai, 0xfff8, 0x1ed0, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32738 {m68k_op_move_8_pi7_pi, 0xfff8, 0x1ed8, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32739 {m68k_op_move_8_pi7_pd, 0xfff8, 0x1ee0, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32740 {m68k_op_move_8_pi7_di, 0xfff8, 0x1ee8, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32741 {m68k_op_move_8_pi7_ix, 0xfff8, 0x1ef0, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32742 {m68k_op_move_8_pd7_d, 0xfff8, 0x1f00, { 8, 8, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32743 {m68k_op_move_8_pd7_ai, 0xfff8, 0x1f10, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32744 {m68k_op_move_8_pd7_pi, 0xfff8, 0x1f18, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32745 {m68k_op_move_8_pd7_pd, 0xfff8, 0x1f20, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32746 {m68k_op_move_8_pd7_di, 0xfff8, 0x1f28, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32747 {m68k_op_move_8_pd7_ix, 0xfff8, 0x1f30, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32748 {m68k_op_move_32_aw_d, 0xfff8, 0x21c0, { 16, 16, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32749 {m68k_op_move_32_aw_a, 0xfff8, 0x21c8, { 16, 16, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32750 {m68k_op_move_32_aw_ai, 0xfff8, 0x21d0, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32751 {m68k_op_move_32_aw_pi, 0xfff8, 0x21d8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32752 {m68k_op_move_32_aw_pd, 0xfff8, 0x21e0, { 26, 26, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32753 {m68k_op_move_32_aw_di, 0xfff8, 0x21e8, { 28, 28, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32754 {m68k_op_move_32_aw_ix, 0xfff8, 0x21f0, { 30, 30, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32755 {m68k_op_move_32_al_d, 0xfff8, 0x23c0, { 20, 20, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32756 {m68k_op_move_32_al_a, 0xfff8, 0x23c8, { 20, 20, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32757 {m68k_op_move_32_al_ai, 0xfff8, 0x23d0, { 28, 28, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32758 {m68k_op_move_32_al_pi, 0xfff8, 0x23d8, { 28, 28, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32759 {m68k_op_move_32_al_pd, 0xfff8, 0x23e0, { 30, 30, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32760 {m68k_op_move_32_al_di, 0xfff8, 0x23e8, { 32, 32, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32761 {m68k_op_move_32_al_ix, 0xfff8, 0x23f0, { 34, 34, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32762 {m68k_op_move_16_aw_d, 0xfff8, 0x31c0, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32763 {m68k_op_move_16_aw_a, 0xfff8, 0x31c8, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32764 {m68k_op_move_16_aw_ai, 0xfff8, 0x31d0, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32765 {m68k_op_move_16_aw_pi, 0xfff8, 0x31d8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32766 {m68k_op_move_16_aw_pd, 0xfff8, 0x31e0, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32767 {m68k_op_move_16_aw_di, 0xfff8, 0x31e8, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32768 {m68k_op_move_16_aw_ix, 0xfff8, 0x31f0, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32769 {m68k_op_move_16_al_d, 0xfff8, 0x33c0, { 16, 16, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32770 {m68k_op_move_16_al_a, 0xfff8, 0x33c8, { 16, 16, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32771 {m68k_op_move_16_al_ai, 0xfff8, 0x33d0, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32772 {m68k_op_move_16_al_pi, 0xfff8, 0x33d8, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32773 {m68k_op_move_16_al_pd, 0xfff8, 0x33e0, { 22, 22, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32774 {m68k_op_move_16_al_di, 0xfff8, 0x33e8, { 24, 24, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32775 {m68k_op_move_16_al_ix, 0xfff8, 0x33f0, { 26, 26, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32776 {m68k_op_negx_8_d, 0xfff8, 0x4000, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32777 {m68k_op_negx_8_ai, 0xfff8, 0x4010, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32778 {m68k_op_negx_8_pi, 0xfff8, 0x4018, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32779 {m68k_op_negx_8_pd, 0xfff8, 0x4020, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32780 {m68k_op_negx_8_di, 0xfff8, 0x4028, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32781 {m68k_op_negx_8_ix, 0xfff8, 0x4030, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32782 {m68k_op_negx_16_d, 0xfff8, 0x4040, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32783 {m68k_op_negx_16_ai, 0xfff8, 0x4050, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32784 {m68k_op_negx_16_pi, 0xfff8, 0x4058, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32785 {m68k_op_negx_16_pd, 0xfff8, 0x4060, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32786 {m68k_op_negx_16_di, 0xfff8, 0x4068, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32787 {m68k_op_negx_16_ix, 0xfff8, 0x4070, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32788 {m68k_op_negx_32_d, 0xfff8, 0x4080, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32789 {m68k_op_negx_32_ai, 0xfff8, 0x4090, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32790 {m68k_op_negx_32_pi, 0xfff8, 0x4098, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32791 {m68k_op_negx_32_pd, 0xfff8, 0x40a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32792 {m68k_op_negx_32_di, 0xfff8, 0x40a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32793 {m68k_op_negx_32_ix, 0xfff8, 0x40b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32794 {m68k_op_move_16_frs_d, 0xfff8, 0x40c0, { 6, 4, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32795 {m68k_op_move_16_frs_ai, 0xfff8, 0x40d0, { 12, 12, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32796 {m68k_op_move_16_frs_pi, 0xfff8, 0x40d8, { 12, 12, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32797 {m68k_op_move_16_frs_pd, 0xfff8, 0x40e0, { 14, 14, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32798 {m68k_op_move_16_frs_di, 0xfff8, 0x40e8, { 16, 16, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32799 {m68k_op_move_16_frs_ix, 0xfff8, 0x40f0, { 18, 18, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32800 {m68k_op_clr_8_d, 0xfff8, 0x4200, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32801 {m68k_op_clr_8_ai, 0xfff8, 0x4210, { 12, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32802 {m68k_op_clr_8_pi, 0xfff8, 0x4218, { 12, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32803 {m68k_op_clr_8_pd, 0xfff8, 0x4220, { 14, 10, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32804 {m68k_op_clr_8_di, 0xfff8, 0x4228, { 16, 12, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32805 {m68k_op_clr_8_ix, 0xfff8, 0x4230, { 18, 14, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32806 {m68k_op_clr_16_d, 0xfff8, 0x4240, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32807 {m68k_op_clr_16_ai, 0xfff8, 0x4250, { 12, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32808 {m68k_op_clr_16_pi, 0xfff8, 0x4258, { 12, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32809 {m68k_op_clr_16_pd, 0xfff8, 0x4260, { 14, 10, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32810 {m68k_op_clr_16_di, 0xfff8, 0x4268, { 16, 12, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32811 {m68k_op_clr_16_ix, 0xfff8, 0x4270, { 18, 14, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32812 {m68k_op_clr_32_d, 0xfff8, 0x4280, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32813 {m68k_op_clr_32_ai, 0xfff8, 0x4290, { 20, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32814 {m68k_op_clr_32_pi, 0xfff8, 0x4298, { 20, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32815 {m68k_op_clr_32_pd, 0xfff8, 0x42a0, { 22, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32816 {m68k_op_clr_32_di, 0xfff8, 0x42a8, { 24, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32817 {m68k_op_clr_32_ix, 0xfff8, 0x42b0, { 26, 20, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32818 {m68k_op_move_16_frc_d, 0xfff8, 0x42c0, {255, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32819 {m68k_op_move_16_frc_ai, 0xfff8, 0x42d0, {255, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32820 {m68k_op_move_16_frc_pi, 0xfff8, 0x42d8, {255, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32821 {m68k_op_move_16_frc_pd, 0xfff8, 0x42e0, {255, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32822 {m68k_op_move_16_frc_di, 0xfff8, 0x42e8, {255, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32823 {m68k_op_move_16_frc_ix, 0xfff8, 0x42f0, {255, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32824 {m68k_op_neg_8_d, 0xfff8, 0x4400, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32825 {m68k_op_neg_8_ai, 0xfff8, 0x4410, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32826 {m68k_op_neg_8_pi, 0xfff8, 0x4418, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32827 {m68k_op_neg_8_pd, 0xfff8, 0x4420, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32828 {m68k_op_neg_8_di, 0xfff8, 0x4428, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32829 {m68k_op_neg_8_ix, 0xfff8, 0x4430, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32830 {m68k_op_neg_16_d, 0xfff8, 0x4440, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32831 {m68k_op_neg_16_ai, 0xfff8, 0x4450, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32832 {m68k_op_neg_16_pi, 0xfff8, 0x4458, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32833 {m68k_op_neg_16_pd, 0xfff8, 0x4460, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32834 {m68k_op_neg_16_di, 0xfff8, 0x4468, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32835 {m68k_op_neg_16_ix, 0xfff8, 0x4470, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32836 {m68k_op_neg_32_d, 0xfff8, 0x4480, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32837 {m68k_op_neg_32_ai, 0xfff8, 0x4490, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32838 {m68k_op_neg_32_pi, 0xfff8, 0x4498, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32839 {m68k_op_neg_32_pd, 0xfff8, 0x44a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32840 {m68k_op_neg_32_di, 0xfff8, 0x44a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32841 {m68k_op_neg_32_ix, 0xfff8, 0x44b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32842 {m68k_op_move_16_toc_d, 0xfff8, 0x44c0, { 12, 12, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32843 {m68k_op_move_16_toc_ai, 0xfff8, 0x44d0, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32844 {m68k_op_move_16_toc_pi, 0xfff8, 0x44d8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32845 {m68k_op_move_16_toc_pd, 0xfff8, 0x44e0, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32846 {m68k_op_move_16_toc_di, 0xfff8, 0x44e8, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32847 {m68k_op_move_16_toc_ix, 0xfff8, 0x44f0, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32848 {m68k_op_not_8_d, 0xfff8, 0x4600, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32849 {m68k_op_not_8_ai, 0xfff8, 0x4610, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32850 {m68k_op_not_8_pi, 0xfff8, 0x4618, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32851 {m68k_op_not_8_pd, 0xfff8, 0x4620, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32852 {m68k_op_not_8_di, 0xfff8, 0x4628, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32853 {m68k_op_not_8_ix, 0xfff8, 0x4630, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32854 {m68k_op_not_16_d, 0xfff8, 0x4640, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32855 {m68k_op_not_16_ai, 0xfff8, 0x4650, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32856 {m68k_op_not_16_pi, 0xfff8, 0x4658, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32857 {m68k_op_not_16_pd, 0xfff8, 0x4660, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32858 {m68k_op_not_16_di, 0xfff8, 0x4668, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32859 {m68k_op_not_16_ix, 0xfff8, 0x4670, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32860 {m68k_op_not_32_d, 0xfff8, 0x4680, { 6, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32861 {m68k_op_not_32_ai, 0xfff8, 0x4690, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32862 {m68k_op_not_32_pi, 0xfff8, 0x4698, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32863 {m68k_op_not_32_pd, 0xfff8, 0x46a0, { 22, 22, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32864 {m68k_op_not_32_di, 0xfff8, 0x46a8, { 24, 24, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32865 {m68k_op_not_32_ix, 0xfff8, 0x46b0, { 26, 26, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32866 {m68k_op_move_16_tos_d, 0xfff8, 0x46c0, { 12, 12, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32867 {m68k_op_move_16_tos_ai, 0xfff8, 0x46d0, { 16, 16, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32868 {m68k_op_move_16_tos_pi, 0xfff8, 0x46d8, { 16, 16, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32869 {m68k_op_move_16_tos_pd, 0xfff8, 0x46e0, { 18, 18, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32870 {m68k_op_move_16_tos_di, 0xfff8, 0x46e8, { 20, 20, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32871 {m68k_op_move_16_tos_ix, 0xfff8, 0x46f0, { 22, 22, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32872 {m68k_op_nbcd_8_d, 0xfff8, 0x4800, { 6, 6, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32873 {m68k_op_link_32, 0xfff8, 0x4808, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32874 {m68k_op_nbcd_8_ai, 0xfff8, 0x4810, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32875 {m68k_op_nbcd_8_pi, 0xfff8, 0x4818, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32876 {m68k_op_nbcd_8_pd, 0xfff8, 0x4820, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32877 {m68k_op_nbcd_8_di, 0xfff8, 0x4828, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32878 {m68k_op_nbcd_8_ix, 0xfff8, 0x4830, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32879 {m68k_op_swap_32, 0xfff8, 0x4840, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32880 {m68k_op_bkpt, 0xfff8, 0x4848, {255, 10, 10, 10, 10, 10, 10}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32881 {m68k_op_pea_32_ai, 0xfff8, 0x4850, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32882 {m68k_op_pea_32_di, 0xfff8, 0x4868, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32883 {m68k_op_pea_32_ix, 0xfff8, 0x4870, { 20, 20, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32884 {m68k_op_ext_16, 0xfff8, 0x4880, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32885 {m68k_op_movem_16_re_ai, 0xfff8, 0x4890, { 8, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32886 {m68k_op_movem_16_re_pd, 0xfff8, 0x48a0, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32887 {m68k_op_movem_16_re_di, 0xfff8, 0x48a8, { 12, 12, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32888 {m68k_op_movem_16_re_ix, 0xfff8, 0x48b0, { 14, 14, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32889 {m68k_op_ext_32, 0xfff8, 0x48c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32890 {m68k_op_movem_32_re_ai, 0xfff8, 0x48d0, { 8, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32891 {m68k_op_movem_32_re_pd, 0xfff8, 0x48e0, { 8, 8, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32892 {m68k_op_movem_32_re_di, 0xfff8, 0x48e8, { 12, 12, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32893 {m68k_op_movem_32_re_ix, 0xfff8, 0x48f0, { 14, 14, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32894 {m68k_op_extb_32, 0xfff8, 0x49c0, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32895 {m68k_op_tst_8_d, 0xfff8, 0x4a00, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32896 {m68k_op_tst_8_ai, 0xfff8, 0x4a10, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32897 {m68k_op_tst_8_pi, 0xfff8, 0x4a18, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32898 {m68k_op_tst_8_pd, 0xfff8, 0x4a20, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32899 {m68k_op_tst_8_di, 0xfff8, 0x4a28, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32900 {m68k_op_tst_8_ix, 0xfff8, 0x4a30, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32901 {m68k_op_tst_16_d, 0xfff8, 0x4a40, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32902 {m68k_op_tst_16_a, 0xfff8, 0x4a48, {255, 255, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32903 {m68k_op_tst_16_ai, 0xfff8, 0x4a50, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32904 {m68k_op_tst_16_pi, 0xfff8, 0x4a58, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32905 {m68k_op_tst_16_pd, 0xfff8, 0x4a60, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32906 {m68k_op_tst_16_di, 0xfff8, 0x4a68, { 12, 12, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32907 {m68k_op_tst_16_ix, 0xfff8, 0x4a70, { 14, 14, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32908 {m68k_op_tst_32_d, 0xfff8, 0x4a80, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32909 {m68k_op_tst_32_a, 0xfff8, 0x4a88, {255, 255, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32910 {m68k_op_tst_32_ai, 0xfff8, 0x4a90, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32911 {m68k_op_tst_32_pi, 0xfff8, 0x4a98, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32912 {m68k_op_tst_32_pd, 0xfff8, 0x4aa0, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32913 {m68k_op_tst_32_di, 0xfff8, 0x4aa8, { 16, 16, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32914 {m68k_op_tst_32_ix, 0xfff8, 0x4ab0, { 18, 18, 9, 9, 9, 9, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32915 {m68k_op_tas_8_d, 0xfff8, 0x4ac0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32916 {m68k_op_tas_8_ai, 0xfff8, 0x4ad0, { 18, 18, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32917 {m68k_op_tas_8_pi, 0xfff8, 0x4ad8, { 18, 18, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32918 {m68k_op_tas_8_pd, 0xfff8, 0x4ae0, { 20, 20, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32919 {m68k_op_tas_8_di, 0xfff8, 0x4ae8, { 22, 22, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32920 {m68k_op_tas_8_ix, 0xfff8, 0x4af0, { 24, 24, 19, 19, 19, 19, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32921 {m68k_op_mull_32_d, 0xfff8, 0x4c00, {255, 255, 43, 43, 43, 43, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32922 {m68k_op_mull_32_ai, 0xfff8, 0x4c10, {255, 255, 47, 47, 47, 47, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32923 {m68k_op_mull_32_pi, 0xfff8, 0x4c18, {255, 255, 47, 47, 47, 47, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32924 {m68k_op_mull_32_pd, 0xfff8, 0x4c20, {255, 255, 48, 48, 48, 48, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32925 {m68k_op_mull_32_di, 0xfff8, 0x4c28, {255, 255, 48, 48, 48, 48, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32926 {m68k_op_mull_32_ix, 0xfff8, 0x4c30, {255, 255, 50, 50, 50, 50, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32927 {m68k_op_divl_32_d, 0xfff8, 0x4c40, {255, 255, 84, 84, 84, 84, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32928 {m68k_op_divl_32_ai, 0xfff8, 0x4c50, {255, 255, 88, 88, 88, 88, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32929 {m68k_op_divl_32_pi, 0xfff8, 0x4c58, {255, 255, 88, 88, 88, 88, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32930 {m68k_op_divl_32_pd, 0xfff8, 0x4c60, {255, 255, 89, 89, 89, 89, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32931 {m68k_op_divl_32_di, 0xfff8, 0x4c68, {255, 255, 89, 89, 89, 89, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32932 {m68k_op_divl_32_ix, 0xfff8, 0x4c70, {255, 255, 91, 91, 91, 91, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32933 {m68k_op_movem_16_er_ai, 0xfff8, 0x4c90, { 12, 12, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32934 {m68k_op_movem_16_er_pi, 0xfff8, 0x4c98, { 12, 12, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32935 {m68k_op_movem_16_er_di, 0xfff8, 0x4ca8, { 16, 16, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32936 {m68k_op_movem_16_er_ix, 0xfff8, 0x4cb0, { 18, 18, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32937 {m68k_op_movem_32_er_ai, 0xfff8, 0x4cd0, { 12, 12, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32938 {m68k_op_movem_32_er_pi, 0xfff8, 0x4cd8, { 12, 12, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32939 {m68k_op_movem_32_er_di, 0xfff8, 0x4ce8, { 16, 16, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32940 {m68k_op_movem_32_er_ix, 0xfff8, 0x4cf0, { 18, 18, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32941 {m68k_op_link_16, 0xfff8, 0x4e50, { 16, 16, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32942 {m68k_op_unlk_32, 0xfff8, 0x4e58, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32943 {m68k_op_move_32_tou, 0xfff8, 0x4e60, { 4, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32944 {m68k_op_move_32_fru, 0xfff8, 0x4e68, { 4, 6, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32945 {m68k_op_jsr_32_ai, 0xfff8, 0x4e90, { 16, 16, 4, 4, 4, 4, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32946 {m68k_op_jsr_32_di, 0xfff8, 0x4ea8, { 18, 18, 5, 5, 5, 5, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32947 {m68k_op_jsr_32_ix, 0xfff8, 0x4eb0, { 22, 22, 7, 7, 7, 7, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32948 {m68k_op_jmp_32_ai, 0xfff8, 0x4ed0, { 8, 8, 4, 4, 4, 4, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32949 {m68k_op_jmp_32_di, 0xfff8, 0x4ee8, { 10, 10, 5, 5, 5, 5, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32950 {m68k_op_jmp_32_ix, 0xfff8, 0x4ef0, { 14, 14, 7, 7, 7, 7, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32951 {m68k_op_st_8_d, 0xfff8, 0x50c0, { 6, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32952 {m68k_op_dbt_16, 0xfff8, 0x50c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32953 {m68k_op_st_8_ai, 0xfff8, 0x50d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32954 {m68k_op_st_8_pi, 0xfff8, 0x50d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32955 {m68k_op_st_8_pd, 0xfff8, 0x50e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32956 {m68k_op_st_8_di, 0xfff8, 0x50e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32957 {m68k_op_st_8_ix, 0xfff8, 0x50f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32958 {m68k_op_sf_8_d, 0xfff8, 0x51c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32959 {m68k_op_dbf_16, 0xfff8, 0x51c8, { 12, 12, 6, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32960 {m68k_op_sf_8_ai, 0xfff8, 0x51d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32961 {m68k_op_sf_8_pi, 0xfff8, 0x51d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32962 {m68k_op_sf_8_pd, 0xfff8, 0x51e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32963 {m68k_op_sf_8_di, 0xfff8, 0x51e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32964 {m68k_op_sf_8_ix, 0xfff8, 0x51f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32965 {m68k_op_shi_8_d, 0xfff8, 0x52c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32966 {m68k_op_dbhi_16, 0xfff8, 0x52c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32967 {m68k_op_shi_8_ai, 0xfff8, 0x52d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32968 {m68k_op_shi_8_pi, 0xfff8, 0x52d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32969 {m68k_op_shi_8_pd, 0xfff8, 0x52e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32970 {m68k_op_shi_8_di, 0xfff8, 0x52e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32971 {m68k_op_shi_8_ix, 0xfff8, 0x52f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32972 {m68k_op_sls_8_d, 0xfff8, 0x53c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32973 {m68k_op_dbls_16, 0xfff8, 0x53c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32974 {m68k_op_sls_8_ai, 0xfff8, 0x53d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32975 {m68k_op_sls_8_pi, 0xfff8, 0x53d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32976 {m68k_op_sls_8_pd, 0xfff8, 0x53e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32977 {m68k_op_sls_8_di, 0xfff8, 0x53e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32978 {m68k_op_sls_8_ix, 0xfff8, 0x53f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32979 {m68k_op_scc_8_d, 0xfff8, 0x54c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32980 {m68k_op_dbcc_16, 0xfff8, 0x54c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32981 {m68k_op_scc_8_ai, 0xfff8, 0x54d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32982 {m68k_op_scc_8_pi, 0xfff8, 0x54d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32983 {m68k_op_scc_8_pd, 0xfff8, 0x54e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32984 {m68k_op_scc_8_di, 0xfff8, 0x54e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32985 {m68k_op_scc_8_ix, 0xfff8, 0x54f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32986 {m68k_op_scs_8_d, 0xfff8, 0x55c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32987 {m68k_op_dbcs_16, 0xfff8, 0x55c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32988 {m68k_op_scs_8_ai, 0xfff8, 0x55d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32989 {m68k_op_scs_8_pi, 0xfff8, 0x55d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32990 {m68k_op_scs_8_pd, 0xfff8, 0x55e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32991 {m68k_op_scs_8_di, 0xfff8, 0x55e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32992 {m68k_op_scs_8_ix, 0xfff8, 0x55f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32993 {m68k_op_sne_8_d, 0xfff8, 0x56c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32994 {m68k_op_dbne_16, 0xfff8, 0x56c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32995 {m68k_op_sne_8_ai, 0xfff8, 0x56d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32996 {m68k_op_sne_8_pi, 0xfff8, 0x56d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32997 {m68k_op_sne_8_pd, 0xfff8, 0x56e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32998 {m68k_op_sne_8_di, 0xfff8, 0x56e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32999 {m68k_op_sne_8_ix, 0xfff8, 0x56f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33000 {m68k_op_seq_8_d, 0xfff8, 0x57c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33001 {m68k_op_dbeq_16, 0xfff8, 0x57c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33002 {m68k_op_seq_8_ai, 0xfff8, 0x57d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33003 {m68k_op_seq_8_pi, 0xfff8, 0x57d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33004 {m68k_op_seq_8_pd, 0xfff8, 0x57e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33005 {m68k_op_seq_8_di, 0xfff8, 0x57e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33006 {m68k_op_seq_8_ix, 0xfff8, 0x57f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33007 {m68k_op_svc_8_d, 0xfff8, 0x58c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33008 {m68k_op_dbvc_16, 0xfff8, 0x58c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33009 {m68k_op_svc_8_ai, 0xfff8, 0x58d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33010 {m68k_op_svc_8_pi, 0xfff8, 0x58d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33011 {m68k_op_svc_8_pd, 0xfff8, 0x58e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33012 {m68k_op_svc_8_di, 0xfff8, 0x58e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33013 {m68k_op_svc_8_ix, 0xfff8, 0x58f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33014 {m68k_op_svs_8_d, 0xfff8, 0x59c0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33015 {m68k_op_dbvs_16, 0xfff8, 0x59c8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33016 {m68k_op_svs_8_ai, 0xfff8, 0x59d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33017 {m68k_op_svs_8_pi, 0xfff8, 0x59d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33018 {m68k_op_svs_8_pd, 0xfff8, 0x59e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33019 {m68k_op_svs_8_di, 0xfff8, 0x59e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33020 {m68k_op_svs_8_ix, 0xfff8, 0x59f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33021 {m68k_op_spl_8_d, 0xfff8, 0x5ac0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33022 {m68k_op_dbpl_16, 0xfff8, 0x5ac8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33023 {m68k_op_spl_8_ai, 0xfff8, 0x5ad0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33024 {m68k_op_spl_8_pi, 0xfff8, 0x5ad8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33025 {m68k_op_spl_8_pd, 0xfff8, 0x5ae0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33026 {m68k_op_spl_8_di, 0xfff8, 0x5ae8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33027 {m68k_op_spl_8_ix, 0xfff8, 0x5af0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33028 {m68k_op_smi_8_d, 0xfff8, 0x5bc0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33029 {m68k_op_dbmi_16, 0xfff8, 0x5bc8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33030 {m68k_op_smi_8_ai, 0xfff8, 0x5bd0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33031 {m68k_op_smi_8_pi, 0xfff8, 0x5bd8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33032 {m68k_op_smi_8_pd, 0xfff8, 0x5be0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33033 {m68k_op_smi_8_di, 0xfff8, 0x5be8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33034 {m68k_op_smi_8_ix, 0xfff8, 0x5bf0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33035 {m68k_op_sge_8_d, 0xfff8, 0x5cc0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33036 {m68k_op_dbge_16, 0xfff8, 0x5cc8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33037 {m68k_op_sge_8_ai, 0xfff8, 0x5cd0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33038 {m68k_op_sge_8_pi, 0xfff8, 0x5cd8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33039 {m68k_op_sge_8_pd, 0xfff8, 0x5ce0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33040 {m68k_op_sge_8_di, 0xfff8, 0x5ce8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33041 {m68k_op_sge_8_ix, 0xfff8, 0x5cf0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33042 {m68k_op_slt_8_d, 0xfff8, 0x5dc0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33043 {m68k_op_dblt_16, 0xfff8, 0x5dc8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33044 {m68k_op_slt_8_ai, 0xfff8, 0x5dd0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33045 {m68k_op_slt_8_pi, 0xfff8, 0x5dd8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33046 {m68k_op_slt_8_pd, 0xfff8, 0x5de0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33047 {m68k_op_slt_8_di, 0xfff8, 0x5de8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33048 {m68k_op_slt_8_ix, 0xfff8, 0x5df0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33049 {m68k_op_sgt_8_d, 0xfff8, 0x5ec0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33050 {m68k_op_dbgt_16, 0xfff8, 0x5ec8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33051 {m68k_op_sgt_8_ai, 0xfff8, 0x5ed0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33052 {m68k_op_sgt_8_pi, 0xfff8, 0x5ed8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33053 {m68k_op_sgt_8_pd, 0xfff8, 0x5ee0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33054 {m68k_op_sgt_8_di, 0xfff8, 0x5ee8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33055 {m68k_op_sgt_8_ix, 0xfff8, 0x5ef0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33056 {m68k_op_sle_8_d, 0xfff8, 0x5fc0, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33057 {m68k_op_dble_16, 0xfff8, 0x5fc8, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33058 {m68k_op_sle_8_ai, 0xfff8, 0x5fd0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33059 {m68k_op_sle_8_pi, 0xfff8, 0x5fd8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33060 {m68k_op_sle_8_pd, 0xfff8, 0x5fe0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33061 {m68k_op_sle_8_di, 0xfff8, 0x5fe8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33062 {m68k_op_sle_8_ix, 0xfff8, 0x5ff0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33063 {m68k_op_sbcd_8_mm_ax7, 0xfff8, 0x8f08, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33064 {m68k_op_pack_16_mm_ax7, 0xfff8, 0x8f48, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33065 {m68k_op_unpk_16_mm_ax7, 0xfff8, 0x8f88, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33066 {m68k_op_subx_8_mm_ax7, 0xfff8, 0x9f08, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33067 {m68k_op_cmpm_8_ax7, 0xfff8, 0xbf08, { 12, 12, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33068 {m68k_op_abcd_8_mm_ax7, 0xfff8, 0xcf08, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33069 {m68k_op_addx_8_mm_ax7, 0xfff8, 0xdf08, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33070 {m68k_op_asr_16_ai, 0xfff8, 0xe0d0, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33071 {m68k_op_asr_16_pi, 0xfff8, 0xe0d8, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33072 {m68k_op_asr_16_pd, 0xfff8, 0xe0e0, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33073 {m68k_op_asr_16_di, 0xfff8, 0xe0e8, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33074 {m68k_op_asr_16_ix, 0xfff8, 0xe0f0, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33075 {m68k_op_asl_16_ai, 0xfff8, 0xe1d0, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33076 {m68k_op_asl_16_pi, 0xfff8, 0xe1d8, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33077 {m68k_op_asl_16_pd, 0xfff8, 0xe1e0, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33078 {m68k_op_asl_16_di, 0xfff8, 0xe1e8, { 16, 16, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33079 {m68k_op_asl_16_ix, 0xfff8, 0xe1f0, { 18, 18, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33080 {m68k_op_lsr_16_ai, 0xfff8, 0xe2d0, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33081 {m68k_op_lsr_16_pi, 0xfff8, 0xe2d8, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33082 {m68k_op_lsr_16_pd, 0xfff8, 0xe2e0, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33083 {m68k_op_lsr_16_di, 0xfff8, 0xe2e8, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33084 {m68k_op_lsr_16_ix, 0xfff8, 0xe2f0, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33085 {m68k_op_lsl_16_ai, 0xfff8, 0xe3d0, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33086 {m68k_op_lsl_16_pi, 0xfff8, 0xe3d8, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33087 {m68k_op_lsl_16_pd, 0xfff8, 0xe3e0, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33088 {m68k_op_lsl_16_di, 0xfff8, 0xe3e8, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33089 {m68k_op_lsl_16_ix, 0xfff8, 0xe3f0, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33090 {m68k_op_roxr_16_ai, 0xfff8, 0xe4d0, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33091 {m68k_op_roxr_16_pi, 0xfff8, 0xe4d8, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33092 {m68k_op_roxr_16_pd, 0xfff8, 0xe4e0, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33093 {m68k_op_roxr_16_di, 0xfff8, 0xe4e8, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33094 {m68k_op_roxr_16_ix, 0xfff8, 0xe4f0, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33095 {m68k_op_roxl_16_ai, 0xfff8, 0xe5d0, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33096 {m68k_op_roxl_16_pi, 0xfff8, 0xe5d8, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33097 {m68k_op_roxl_16_pd, 0xfff8, 0xe5e0, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33098 {m68k_op_roxl_16_di, 0xfff8, 0xe5e8, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33099 {m68k_op_roxl_16_ix, 0xfff8, 0xe5f0, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33100 {m68k_op_ror_16_ai, 0xfff8, 0xe6d0, { 12, 12, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33101 {m68k_op_ror_16_pi, 0xfff8, 0xe6d8, { 12, 12, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33102 {m68k_op_ror_16_pd, 0xfff8, 0xe6e0, { 14, 14, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33103 {m68k_op_ror_16_di, 0xfff8, 0xe6e8, { 16, 16, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33104 {m68k_op_ror_16_ix, 0xfff8, 0xe6f0, { 18, 18, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33105 {m68k_op_rol_16_ai, 0xfff8, 0xe7d0, { 12, 12, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33106 {m68k_op_rol_16_pi, 0xfff8, 0xe7d8, { 12, 12, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33107 {m68k_op_rol_16_pd, 0xfff8, 0xe7e0, { 14, 14, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33108 {m68k_op_rol_16_di, 0xfff8, 0xe7e8, { 16, 16, 12, 12, 12, 12, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33109 {m68k_op_rol_16_ix, 0xfff8, 0xe7f0, { 18, 18, 14, 14, 14, 14, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33110 {m68k_op_bftst_32_d, 0xfff8, 0xe8c0, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33111 {m68k_op_bftst_32_ai, 0xfff8, 0xe8d0, {255, 255, 17, 17, 17, 17, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33112 {m68k_op_bftst_32_di, 0xfff8, 0xe8e8, {255, 255, 18, 18, 18, 18, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33113 {m68k_op_bftst_32_ix, 0xfff8, 0xe8f0, {255, 255, 20, 20, 20, 20, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33114 {m68k_op_bfextu_32_d, 0xfff8, 0xe9c0, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33115 {m68k_op_bfextu_32_ai, 0xfff8, 0xe9d0, {255, 255, 19, 19, 19, 19, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33116 {m68k_op_bfextu_32_di, 0xfff8, 0xe9e8, {255, 255, 20, 20, 20, 20, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33117 {m68k_op_bfextu_32_ix, 0xfff8, 0xe9f0, {255, 255, 22, 22, 22, 22, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33118 {m68k_op_bfchg_32_d, 0xfff8, 0xeac0, {255, 255, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33119 {m68k_op_bfchg_32_ai, 0xfff8, 0xead0, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33120 {m68k_op_bfchg_32_di, 0xfff8, 0xeae8, {255, 255, 25, 25, 25, 25, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33121 {m68k_op_bfchg_32_ix, 0xfff8, 0xeaf0, {255, 255, 27, 27, 27, 27, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33122 {m68k_op_bfexts_32_d, 0xfff8, 0xebc0, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33123 {m68k_op_bfexts_32_ai, 0xfff8, 0xebd0, {255, 255, 19, 19, 19, 19, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33124 {m68k_op_bfexts_32_di, 0xfff8, 0xebe8, {255, 255, 20, 20, 20, 20, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33125 {m68k_op_bfexts_32_ix, 0xfff8, 0xebf0, {255, 255, 22, 22, 22, 22, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33126 {m68k_op_bfclr_32_d, 0xfff8, 0xecc0, {255, 255, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33127 {m68k_op_bfclr_32_ai, 0xfff8, 0xecd0, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33128 {m68k_op_bfclr_32_di, 0xfff8, 0xece8, {255, 255, 25, 25, 25, 25, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33129 {m68k_op_bfclr_32_ix, 0xfff8, 0xecf0, {255, 255, 27, 27, 27, 27, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33130 {m68k_op_bfffo_32_d, 0xfff8, 0xedc0, {255, 255, 18, 18, 18, 18, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33131 {m68k_op_bfffo_32_ai, 0xfff8, 0xedd0, {255, 255, 32, 32, 32, 32, 28}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33132 {m68k_op_bfffo_32_di, 0xfff8, 0xede8, {255, 255, 33, 33, 33, 33, 28}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33133 {m68k_op_bfffo_32_ix, 0xfff8, 0xedf0, {255, 255, 35, 35, 35, 35, 28}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33134 {m68k_op_bfset_32_d, 0xfff8, 0xeec0, {255, 255, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33135 {m68k_op_bfset_32_ai, 0xfff8, 0xeed0, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33136 {m68k_op_bfset_32_di, 0xfff8, 0xeee8, {255, 255, 25, 25, 25, 25, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33137 {m68k_op_bfset_32_ix, 0xfff8, 0xeef0, {255, 255, 27, 27, 27, 27, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33138 {m68k_op_bfins_32_d, 0xfff8, 0xefc0, {255, 255, 10, 10, 10, 10, 10}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33139 {m68k_op_bfins_32_ai, 0xfff8, 0xefd0, {255, 255, 21, 21, 21, 21, 17}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33140 {m68k_op_bfins_32_di, 0xfff8, 0xefe8, {255, 255, 22, 22, 22, 22, 17}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33141 {m68k_op_bfins_32_ix, 0xfff8, 0xeff0, {255, 255, 24, 24, 24, 24, 17}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33142 {m68k_op_ftrapcc_32, 0xfff8, 0xf278, {255, 255, 4, 4, 255, 255, 255}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33143 {m68k_op_pflushan_32, 0xfff8, 0xf510, {255, 255, 255, 255, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33144 {m68k_op_pflusha_32, 0xfff8, 0xf518, {255, 255, 255, 255, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33145 {m68k_op_move16_32, 0xfff8, 0xf620, {255, 255, 255, 255, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33146 {m68k_op_ori_8_pi7, 0xffff, 0x001f, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33147 {m68k_op_ori_8_pd7, 0xffff, 0x0027, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33148 {m68k_op_ori_8_aw, 0xffff, 0x0038, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33149 {m68k_op_ori_8_al, 0xffff, 0x0039, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33150 {m68k_op_ori_16_toc, 0xffff, 0x003c, { 20, 16, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33151 {m68k_op_ori_16_aw, 0xffff, 0x0078, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33152 {m68k_op_ori_16_al, 0xffff, 0x0079, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33153 {m68k_op_ori_16_tos, 0xffff, 0x007c, { 20, 16, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33154 {m68k_op_ori_32_aw, 0xffff, 0x00b8, { 32, 32, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33155 {m68k_op_ori_32_al, 0xffff, 0x00b9, { 36, 36, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33156 {m68k_op_chk2cmp2_8_aw, 0xffff, 0x00f8, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33157 {m68k_op_chk2cmp2_8_al, 0xffff, 0x00f9, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33158 {m68k_op_chk2cmp2_8_pcdi, 0xffff, 0x00fa, {255, 255, 23, 23, 23, 23, 23}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33159 {m68k_op_chk2cmp2_8_pcix, 0xffff, 0x00fb, {255, 255, 23, 23, 23, 23, 23}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33160 {m68k_op_andi_8_pi7, 0xffff, 0x021f, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33161 {m68k_op_andi_8_pd7, 0xffff, 0x0227, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33162 {m68k_op_andi_8_aw, 0xffff, 0x0238, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33163 {m68k_op_andi_8_al, 0xffff, 0x0239, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33164 {m68k_op_andi_16_toc, 0xffff, 0x023c, { 20, 16, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33165 {m68k_op_andi_16_aw, 0xffff, 0x0278, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33166 {m68k_op_andi_16_al, 0xffff, 0x0279, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33167 {m68k_op_andi_16_tos, 0xffff, 0x027c, { 20, 16, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33168 {m68k_op_andi_32_aw, 0xffff, 0x02b8, { 32, 32, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33169 {m68k_op_andi_32_al, 0xffff, 0x02b9, { 36, 36, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33170 {m68k_op_chk2cmp2_16_aw, 0xffff, 0x02f8, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33171 {m68k_op_chk2cmp2_16_al, 0xffff, 0x02f9, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33172 {m68k_op_chk2cmp2_16_pcdi, 0xffff, 0x02fa, {255, 255, 23, 23, 23, 23, 23}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33173 {m68k_op_chk2cmp2_16_pcix, 0xffff, 0x02fb, {255, 255, 23, 23, 23, 23, 23}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33174 {m68k_op_subi_8_pi7, 0xffff, 0x041f, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33175 {m68k_op_subi_8_pd7, 0xffff, 0x0427, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33176 {m68k_op_subi_8_aw, 0xffff, 0x0438, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33177 {m68k_op_subi_8_al, 0xffff, 0x0439, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33178 {m68k_op_subi_16_aw, 0xffff, 0x0478, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33179 {m68k_op_subi_16_al, 0xffff, 0x0479, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33180 {m68k_op_subi_32_aw, 0xffff, 0x04b8, { 32, 32, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33181 {m68k_op_subi_32_al, 0xffff, 0x04b9, { 36, 36, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33182 {m68k_op_chk2cmp2_32_aw, 0xffff, 0x04f8, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33183 {m68k_op_chk2cmp2_32_al, 0xffff, 0x04f9, {255, 255, 22, 22, 22, 22, 18}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33184 {m68k_op_chk2cmp2_32_pcdi, 0xffff, 0x04fa, {255, 255, 23, 23, 23, 23, 23}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33185 {m68k_op_chk2cmp2_32_pcix, 0xffff, 0x04fb, {255, 255, 23, 23, 23, 23, 23}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33186 {m68k_op_addi_8_pi7, 0xffff, 0x061f, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33187 {m68k_op_addi_8_pd7, 0xffff, 0x0627, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33188 {m68k_op_addi_8_aw, 0xffff, 0x0638, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33189 {m68k_op_addi_8_al, 0xffff, 0x0639, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33190 {m68k_op_addi_16_aw, 0xffff, 0x0678, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33191 {m68k_op_addi_16_al, 0xffff, 0x0679, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33192 {m68k_op_addi_32_aw, 0xffff, 0x06b8, { 32, 32, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33193 {m68k_op_addi_32_al, 0xffff, 0x06b9, { 36, 36, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33194 {m68k_op_callm_32_aw, 0xffff, 0x06f8, {255, 255, 64, 64, 64, 64, 60}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33195 {m68k_op_callm_32_al, 0xffff, 0x06f9, {255, 255, 64, 64, 64, 64, 60}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33196 {m68k_op_callm_32_pcdi, 0xffff, 0x06fa, {255, 255, 65, 65, 65, 65, 60}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33197 {m68k_op_callm_32_pcix, 0xffff, 0x06fb, {255, 255, 67, 67, 67, 67, 60}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33198 {m68k_op_btst_8_s_pi7, 0xffff, 0x081f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33199 {m68k_op_btst_8_s_pd7, 0xffff, 0x0827, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33200 {m68k_op_btst_8_s_aw, 0xffff, 0x0838, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33201 {m68k_op_btst_8_s_al, 0xffff, 0x0839, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33202 {m68k_op_btst_8_s_pcdi, 0xffff, 0x083a, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33203 {m68k_op_btst_8_s_pcix, 0xffff, 0x083b, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33204 {m68k_op_bchg_8_s_pi7, 0xffff, 0x085f, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33205 {m68k_op_bchg_8_s_pd7, 0xffff, 0x0867, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33206 {m68k_op_bchg_8_s_aw, 0xffff, 0x0878, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33207 {m68k_op_bchg_8_s_al, 0xffff, 0x0879, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33208 {m68k_op_bclr_8_s_pi7, 0xffff, 0x089f, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33209 {m68k_op_bclr_8_s_pd7, 0xffff, 0x08a7, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33210 {m68k_op_bclr_8_s_aw, 0xffff, 0x08b8, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33211 {m68k_op_bclr_8_s_al, 0xffff, 0x08b9, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33212 {m68k_op_bset_8_s_pi7, 0xffff, 0x08df, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33213 {m68k_op_bset_8_s_pd7, 0xffff, 0x08e7, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33214 {m68k_op_bset_8_s_aw, 0xffff, 0x08f8, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33215 {m68k_op_bset_8_s_al, 0xffff, 0x08f9, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33216 {m68k_op_eori_8_pi7, 0xffff, 0x0a1f, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33217 {m68k_op_eori_8_pd7, 0xffff, 0x0a27, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33218 {m68k_op_eori_8_aw, 0xffff, 0x0a38, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33219 {m68k_op_eori_8_al, 0xffff, 0x0a39, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33220 {m68k_op_eori_16_toc, 0xffff, 0x0a3c, { 20, 16, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33221 {m68k_op_eori_16_aw, 0xffff, 0x0a78, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33222 {m68k_op_eori_16_al, 0xffff, 0x0a79, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33223 {m68k_op_eori_16_tos, 0xffff, 0x0a7c, { 20, 16, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33224 {m68k_op_eori_32_aw, 0xffff, 0x0ab8, { 32, 32, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33225 {m68k_op_eori_32_al, 0xffff, 0x0ab9, { 36, 36, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33226 {m68k_op_cas_8_pi7, 0xffff, 0x0adf, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33227 {m68k_op_cas_8_pd7, 0xffff, 0x0ae7, {255, 255, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33228 {m68k_op_cas_8_aw, 0xffff, 0x0af8, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33229 {m68k_op_cas_8_al, 0xffff, 0x0af9, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33230 {m68k_op_cmpi_8_pi7, 0xffff, 0x0c1f, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33231 {m68k_op_cmpi_8_pd7, 0xffff, 0x0c27, { 14, 14, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33232 {m68k_op_cmpi_8_aw, 0xffff, 0x0c38, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33233 {m68k_op_cmpi_8_al, 0xffff, 0x0c39, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33234 {m68k_op_cmpi_8_pcdi, 0xffff, 0x0c3a, {255, 255, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33235 {m68k_op_cmpi_8_pcix, 0xffff, 0x0c3b, {255, 255, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33236 {m68k_op_cmpi_16_aw, 0xffff, 0x0c78, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33237 {m68k_op_cmpi_16_al, 0xffff, 0x0c79, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33238 {m68k_op_cmpi_16_pcdi, 0xffff, 0x0c7a, {255, 255, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33239 {m68k_op_cmpi_16_pcix, 0xffff, 0x0c7b, {255, 255, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33240 {m68k_op_cmpi_32_aw, 0xffff, 0x0cb8, { 24, 24, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33241 {m68k_op_cmpi_32_al, 0xffff, 0x0cb9, { 28, 28, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33242 {m68k_op_cmpi_32_pcdi, 0xffff, 0x0cba, {255, 255, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33243 {m68k_op_cmpi_32_pcix, 0xffff, 0x0cbb, {255, 255, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33244 {m68k_op_cas_16_aw, 0xffff, 0x0cf8, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33245 {m68k_op_cas_16_al, 0xffff, 0x0cf9, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33246 {m68k_op_cas2_16, 0xffff, 0x0cfc, {255, 255, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33247 {m68k_op_moves_8_pi7, 0xffff, 0x0e1f, {255, 18, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33248 {m68k_op_moves_8_pd7, 0xffff, 0x0e27, {255, 20, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33249 {m68k_op_moves_8_aw, 0xffff, 0x0e38, {255, 26, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33250 {m68k_op_moves_8_al, 0xffff, 0x0e39, {255, 30, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33251 {m68k_op_moves_16_aw, 0xffff, 0x0e78, {255, 26, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33252 {m68k_op_moves_16_al, 0xffff, 0x0e79, {255, 30, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33253 {m68k_op_moves_32_aw, 0xffff, 0x0eb8, {255, 32, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33254 {m68k_op_moves_32_al, 0xffff, 0x0eb9, {255, 36, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33255 {m68k_op_cas_32_aw, 0xffff, 0x0ef8, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33256 {m68k_op_cas_32_al, 0xffff, 0x0ef9, {255, 255, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33257 {m68k_op_cas2_32, 0xffff, 0x0efc, {255, 255, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33258 {m68k_op_move_8_aw_pi7, 0xffff, 0x11df, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33259 {m68k_op_move_8_aw_pd7, 0xffff, 0x11e7, { 18, 18, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33260 {m68k_op_move_8_aw_aw, 0xffff, 0x11f8, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33261 {m68k_op_move_8_aw_al, 0xffff, 0x11f9, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33262 {m68k_op_move_8_aw_pcdi, 0xffff, 0x11fa, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33263 {m68k_op_move_8_aw_pcix, 0xffff, 0x11fb, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33264 {m68k_op_move_8_aw_i, 0xffff, 0x11fc, { 16, 16, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33265 {m68k_op_move_8_al_pi7, 0xffff, 0x13df, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33266 {m68k_op_move_8_al_pd7, 0xffff, 0x13e7, { 22, 22, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33267 {m68k_op_move_8_al_aw, 0xffff, 0x13f8, { 24, 24, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33268 {m68k_op_move_8_al_al, 0xffff, 0x13f9, { 28, 28, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33269 {m68k_op_move_8_al_pcdi, 0xffff, 0x13fa, { 24, 24, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33270 {m68k_op_move_8_al_pcix, 0xffff, 0x13fb, { 26, 26, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33271 {m68k_op_move_8_al_i, 0xffff, 0x13fc, { 20, 20, 8, 8, 8, 8, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33272 {m68k_op_move_8_pi7_pi7, 0xffff, 0x1edf, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33273 {m68k_op_move_8_pi7_pd7, 0xffff, 0x1ee7, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33274 {m68k_op_move_8_pi7_aw, 0xffff, 0x1ef8, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33275 {m68k_op_move_8_pi7_al, 0xffff, 0x1ef9, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33276 {m68k_op_move_8_pi7_pcdi, 0xffff, 0x1efa, { 16, 16, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33277 {m68k_op_move_8_pi7_pcix, 0xffff, 0x1efb, { 18, 18, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33278 {m68k_op_move_8_pi7_i, 0xffff, 0x1efc, { 12, 12, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33279 {m68k_op_move_8_pd7_pi7, 0xffff, 0x1f1f, { 12, 12, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33280 {m68k_op_move_8_pd7_pd7, 0xffff, 0x1f27, { 14, 14, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33281 {m68k_op_move_8_pd7_aw, 0xffff, 0x1f38, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33282 {m68k_op_move_8_pd7_al, 0xffff, 0x1f39, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33283 {m68k_op_move_8_pd7_pcdi, 0xffff, 0x1f3a, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33284 {m68k_op_move_8_pd7_pcix, 0xffff, 0x1f3b, { 18, 18, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33285 {m68k_op_move_8_pd7_i, 0xffff, 0x1f3c, { 12, 12, 7, 7, 7, 7, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33286 {m68k_op_move_32_aw_aw, 0xffff, 0x21f8, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33287 {m68k_op_move_32_aw_al, 0xffff, 0x21f9, { 32, 32, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33288 {m68k_op_move_32_aw_pcdi, 0xffff, 0x21fa, { 28, 28, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33289 {m68k_op_move_32_aw_pcix, 0xffff, 0x21fb, { 30, 30, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33290 {m68k_op_move_32_aw_i, 0xffff, 0x21fc, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33291 {m68k_op_move_32_al_aw, 0xffff, 0x23f8, { 32, 32, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33292 {m68k_op_move_32_al_al, 0xffff, 0x23f9, { 36, 36, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33293 {m68k_op_move_32_al_pcdi, 0xffff, 0x23fa, { 32, 32, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33294 {m68k_op_move_32_al_pcix, 0xffff, 0x23fb, { 34, 34, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33295 {m68k_op_move_32_al_i, 0xffff, 0x23fc, { 28, 28, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33296 {m68k_op_move_16_aw_aw, 0xffff, 0x31f8, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33297 {m68k_op_move_16_aw_al, 0xffff, 0x31f9, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33298 {m68k_op_move_16_aw_pcdi, 0xffff, 0x31fa, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33299 {m68k_op_move_16_aw_pcix, 0xffff, 0x31fb, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33300 {m68k_op_move_16_aw_i, 0xffff, 0x31fc, { 16, 16, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33301 {m68k_op_move_16_al_aw, 0xffff, 0x33f8, { 24, 24, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33302 {m68k_op_move_16_al_al, 0xffff, 0x33f9, { 28, 28, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33303 {m68k_op_move_16_al_pcdi, 0xffff, 0x33fa, { 24, 24, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33304 {m68k_op_move_16_al_pcix, 0xffff, 0x33fb, { 26, 26, 13, 13, 13, 13, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33305 {m68k_op_move_16_al_i, 0xffff, 0x33fc, { 20, 20, 8, 8, 8, 8, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33306 {m68k_op_negx_8_pi7, 0xffff, 0x401f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33307 {m68k_op_negx_8_pd7, 0xffff, 0x4027, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33308 {m68k_op_negx_8_aw, 0xffff, 0x4038, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33309 {m68k_op_negx_8_al, 0xffff, 0x4039, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33310 {m68k_op_negx_16_aw, 0xffff, 0x4078, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33311 {m68k_op_negx_16_al, 0xffff, 0x4079, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33312 {m68k_op_negx_32_aw, 0xffff, 0x40b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33313 {m68k_op_negx_32_al, 0xffff, 0x40b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33314 {m68k_op_move_16_frs_aw, 0xffff, 0x40f8, { 16, 16, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33315 {m68k_op_move_16_frs_al, 0xffff, 0x40f9, { 20, 20, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33316 {m68k_op_clr_8_pi7, 0xffff, 0x421f, { 12, 8, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33317 {m68k_op_clr_8_pd7, 0xffff, 0x4227, { 14, 10, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33318 {m68k_op_clr_8_aw, 0xffff, 0x4238, { 16, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33319 {m68k_op_clr_8_al, 0xffff, 0x4239, { 20, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33320 {m68k_op_clr_16_aw, 0xffff, 0x4278, { 16, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33321 {m68k_op_clr_16_al, 0xffff, 0x4279, { 20, 14, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33322 {m68k_op_clr_32_aw, 0xffff, 0x42b8, { 24, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33323 {m68k_op_clr_32_al, 0xffff, 0x42b9, { 28, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33324 {m68k_op_move_16_frc_aw, 0xffff, 0x42f8, {255, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33325 {m68k_op_move_16_frc_al, 0xffff, 0x42f9, {255, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33326 {m68k_op_neg_8_pi7, 0xffff, 0x441f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33327 {m68k_op_neg_8_pd7, 0xffff, 0x4427, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33328 {m68k_op_neg_8_aw, 0xffff, 0x4438, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33329 {m68k_op_neg_8_al, 0xffff, 0x4439, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33330 {m68k_op_neg_16_aw, 0xffff, 0x4478, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33331 {m68k_op_neg_16_al, 0xffff, 0x4479, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33332 {m68k_op_neg_32_aw, 0xffff, 0x44b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33333 {m68k_op_neg_32_al, 0xffff, 0x44b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33334 {m68k_op_move_16_toc_aw, 0xffff, 0x44f8, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33335 {m68k_op_move_16_toc_al, 0xffff, 0x44f9, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33336 {m68k_op_move_16_toc_pcdi, 0xffff, 0x44fa, { 20, 20, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33337 {m68k_op_move_16_toc_pcix, 0xffff, 0x44fb, { 22, 22, 11, 11, 11, 11, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33338 {m68k_op_move_16_toc_i, 0xffff, 0x44fc, { 16, 16, 6, 6, 6, 6, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33339 {m68k_op_not_8_pi7, 0xffff, 0x461f, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33340 {m68k_op_not_8_pd7, 0xffff, 0x4627, { 14, 14, 9, 9, 9, 9, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33341 {m68k_op_not_8_aw, 0xffff, 0x4638, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33342 {m68k_op_not_8_al, 0xffff, 0x4639, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33343 {m68k_op_not_16_aw, 0xffff, 0x4678, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33344 {m68k_op_not_16_al, 0xffff, 0x4679, { 20, 20, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33345 {m68k_op_not_32_aw, 0xffff, 0x46b8, { 24, 24, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33346 {m68k_op_not_32_al, 0xffff, 0x46b9, { 28, 28, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33347 {m68k_op_move_16_tos_aw, 0xffff, 0x46f8, { 20, 20, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33348 {m68k_op_move_16_tos_al, 0xffff, 0x46f9, { 24, 24, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33349 {m68k_op_move_16_tos_pcdi, 0xffff, 0x46fa, { 20, 20, 13, 13, 13, 13, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33350 {m68k_op_move_16_tos_pcix, 0xffff, 0x46fb, { 22, 22, 15, 15, 15, 15, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33351 {m68k_op_move_16_tos_i, 0xffff, 0x46fc, { 16, 16, 10, 10, 10, 10, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33352 {m68k_op_link_32_a7, 0xffff, 0x480f, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33353 {m68k_op_nbcd_8_pi7, 0xffff, 0x481f, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33354 {m68k_op_nbcd_8_pd7, 0xffff, 0x4827, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33355 {m68k_op_nbcd_8_aw, 0xffff, 0x4838, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33356 {m68k_op_nbcd_8_al, 0xffff, 0x4839, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33357 {m68k_op_pea_32_aw, 0xffff, 0x4878, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33358 {m68k_op_pea_32_al, 0xffff, 0x4879, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33359 {m68k_op_pea_32_pcdi, 0xffff, 0x487a, { 16, 16, 10, 10, 10, 10, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33360 {m68k_op_pea_32_pcix, 0xffff, 0x487b, { 20, 20, 12, 12, 12, 12, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33361 {m68k_op_movem_16_re_aw, 0xffff, 0x48b8, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33362 {m68k_op_movem_16_re_al, 0xffff, 0x48b9, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33363 {m68k_op_movem_32_re_aw, 0xffff, 0x48f8, { 12, 12, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33364 {m68k_op_movem_32_re_al, 0xffff, 0x48f9, { 16, 16, 8, 8, 8, 8, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33365 {m68k_op_tst_8_pi7, 0xffff, 0x4a1f, { 8, 8, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33366 {m68k_op_tst_8_pd7, 0xffff, 0x4a27, { 10, 10, 7, 7, 7, 7, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33367 {m68k_op_tst_8_aw, 0xffff, 0x4a38, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33368 {m68k_op_tst_8_al, 0xffff, 0x4a39, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33369 {m68k_op_tst_8_pcdi, 0xffff, 0x4a3a, {255, 255, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33370 {m68k_op_tst_8_pcix, 0xffff, 0x4a3b, {255, 255, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33371 {m68k_op_tst_8_i, 0xffff, 0x4a3c, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33372 {m68k_op_tst_16_aw, 0xffff, 0x4a78, { 12, 12, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33373 {m68k_op_tst_16_al, 0xffff, 0x4a79, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33374 {m68k_op_tst_16_pcdi, 0xffff, 0x4a7a, {255, 255, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33375 {m68k_op_tst_16_pcix, 0xffff, 0x4a7b, {255, 255, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33376 {m68k_op_tst_16_i, 0xffff, 0x4a7c, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33377 {m68k_op_tst_32_aw, 0xffff, 0x4ab8, { 16, 16, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33378 {m68k_op_tst_32_al, 0xffff, 0x4ab9, { 20, 20, 6, 6, 6, 6, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33379 {m68k_op_tst_32_pcdi, 0xffff, 0x4aba, {255, 255, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33380 {m68k_op_tst_32_pcix, 0xffff, 0x4abb, {255, 255, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33381 {m68k_op_tst_32_i, 0xffff, 0x4abc, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33382 {m68k_op_tas_8_pi7, 0xffff, 0x4adf, { 18, 18, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33383 {m68k_op_tas_8_pd7, 0xffff, 0x4ae7, { 20, 20, 17, 17, 17, 17, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33384 {m68k_op_tas_8_aw, 0xffff, 0x4af8, { 22, 22, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33385 {m68k_op_tas_8_al, 0xffff, 0x4af9, { 26, 26, 16, 16, 16, 16, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33386 {m68k_op_illegal, 0xffff, 0x4afc, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33387 {m68k_op_mull_32_aw, 0xffff, 0x4c38, {255, 255, 47, 47, 47, 47, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33388 {m68k_op_mull_32_al, 0xffff, 0x4c39, {255, 255, 47, 47, 47, 47, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33389 {m68k_op_mull_32_pcdi, 0xffff, 0x4c3a, {255, 255, 48, 48, 48, 48, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33390 {m68k_op_mull_32_pcix, 0xffff, 0x4c3b, {255, 255, 50, 50, 50, 50, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33391 {m68k_op_mull_32_i, 0xffff, 0x4c3c, {255, 255, 47, 47, 47, 47, 43}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33392 {m68k_op_divl_32_aw, 0xffff, 0x4c78, {255, 255, 88, 88, 88, 88, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33393 {m68k_op_divl_32_al, 0xffff, 0x4c79, {255, 255, 88, 88, 88, 88, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33394 {m68k_op_divl_32_pcdi, 0xffff, 0x4c7a, {255, 255, 89, 89, 89, 89, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33395 {m68k_op_divl_32_pcix, 0xffff, 0x4c7b, {255, 255, 91, 91, 91, 91, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33396 {m68k_op_divl_32_i, 0xffff, 0x4c7c, {255, 255, 88, 88, 88, 88, 84}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33397 {m68k_op_movem_16_er_aw, 0xffff, 0x4cb8, { 16, 16, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33398 {m68k_op_movem_16_er_al, 0xffff, 0x4cb9, { 20, 20, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33399 {m68k_op_movem_16_er_pcdi, 0xffff, 0x4cba, { 16, 16, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33400 {m68k_op_movem_16_er_pcix, 0xffff, 0x4cbb, { 18, 18, 11, 11, 11, 11, 11}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33401 {m68k_op_movem_32_er_aw, 0xffff, 0x4cf8, { 16, 16, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33402 {m68k_op_movem_32_er_al, 0xffff, 0x4cf9, { 20, 20, 12, 12, 12, 12, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33403 {m68k_op_movem_32_er_pcdi, 0xffff, 0x4cfa, { 16, 16, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33404 {m68k_op_movem_32_er_pcix, 0xffff, 0x4cfb, { 18, 18, 11, 11, 11, 11, 11}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33405 {m68k_op_link_16_a7, 0xffff, 0x4e57, { 16, 16, 5, 5, 5, 5, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33406 {m68k_op_unlk_32_a7, 0xffff, 0x4e5f, { 12, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33407 {m68k_op_reset, 0xffff, 0x4e70, { 0, 0, 0, 0, 0, 0, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33408 {m68k_op_nop, 0xffff, 0x4e71, { 4, 4, 2, 2, 2, 2, 2}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33409 {m68k_op_stop, 0xffff, 0x4e72, { 4, 4, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33410 {m68k_op_rte_32, 0xffff, 0x4e73, { 20, 24, 20, 20, 20, 20, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33411 {m68k_op_rtd_32, 0xffff, 0x4e74, {255, 16, 10, 10, 10, 10, 10}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33412 {m68k_op_rts_32, 0xffff, 0x4e75, { 16, 16, 10, 10, 10, 10, 10}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33413 {m68k_op_trapv, 0xffff, 0x4e76, { 4, 4, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33414 {m68k_op_rtr_32, 0xffff, 0x4e77, { 20, 20, 14, 14, 14, 14, 14}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33415 {m68k_op_movec_32_cr, 0xffff, 0x4e7a, {255, 12, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33416 {m68k_op_movec_32_rc, 0xffff, 0x4e7b, {255, 10, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33417 {m68k_op_jsr_32_aw, 0xffff, 0x4eb8, { 18, 18, 4, 4, 4, 4, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33418 {m68k_op_jsr_32_al, 0xffff, 0x4eb9, { 20, 20, 4, 4, 4, 4, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33419 {m68k_op_jsr_32_pcdi, 0xffff, 0x4eba, { 18, 18, 5, 5, 5, 5, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33420 {m68k_op_jsr_32_pcix, 0xffff, 0x4ebb, { 22, 22, 7, 7, 7, 7, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33421 {m68k_op_jmp_32_aw, 0xffff, 0x4ef8, { 10, 10, 4, 4, 4, 4, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33422 {m68k_op_jmp_32_al, 0xffff, 0x4ef9, { 12, 12, 4, 4, 4, 4, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33423 {m68k_op_jmp_32_pcdi, 0xffff, 0x4efa, { 10, 10, 5, 5, 5, 5, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33424 {m68k_op_jmp_32_pcix, 0xffff, 0x4efb, { 14, 14, 7, 7, 7, 7, 0}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33425 {m68k_op_st_8_pi7, 0xffff, 0x50df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33426 {m68k_op_st_8_pd7, 0xffff, 0x50e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33427 {m68k_op_st_8_aw, 0xffff, 0x50f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33428 {m68k_op_st_8_al, 0xffff, 0x50f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33429 {m68k_op_trapt_16, 0xffff, 0x50fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33430 {m68k_op_trapt_32, 0xffff, 0x50fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33431 {m68k_op_trapt, 0xffff, 0x50fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33432 {m68k_op_sf_8_pi7, 0xffff, 0x51df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33433 {m68k_op_sf_8_pd7, 0xffff, 0x51e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33434 {m68k_op_sf_8_aw, 0xffff, 0x51f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33435 {m68k_op_sf_8_al, 0xffff, 0x51f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33436 {m68k_op_trapf_16, 0xffff, 0x51fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33437 {m68k_op_trapf_32, 0xffff, 0x51fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33438 {m68k_op_trapf, 0xffff, 0x51fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33439 {m68k_op_shi_8_pi7, 0xffff, 0x52df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33440 {m68k_op_shi_8_pd7, 0xffff, 0x52e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33441 {m68k_op_shi_8_aw, 0xffff, 0x52f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33442 {m68k_op_shi_8_al, 0xffff, 0x52f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33443 {m68k_op_traphi_16, 0xffff, 0x52fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33444 {m68k_op_traphi_32, 0xffff, 0x52fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33445 {m68k_op_traphi, 0xffff, 0x52fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33446 {m68k_op_sls_8_pi7, 0xffff, 0x53df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33447 {m68k_op_sls_8_pd7, 0xffff, 0x53e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33448 {m68k_op_sls_8_aw, 0xffff, 0x53f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33449 {m68k_op_sls_8_al, 0xffff, 0x53f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33450 {m68k_op_trapls_16, 0xffff, 0x53fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33451 {m68k_op_trapls_32, 0xffff, 0x53fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33452 {m68k_op_trapls, 0xffff, 0x53fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33453 {m68k_op_scc_8_pi7, 0xffff, 0x54df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33454 {m68k_op_scc_8_pd7, 0xffff, 0x54e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33455 {m68k_op_scc_8_aw, 0xffff, 0x54f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33456 {m68k_op_scc_8_al, 0xffff, 0x54f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33457 {m68k_op_trapcc_16, 0xffff, 0x54fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33458 {m68k_op_trapcc_32, 0xffff, 0x54fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33459 {m68k_op_trapcc, 0xffff, 0x54fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33460 {m68k_op_scs_8_pi7, 0xffff, 0x55df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33461 {m68k_op_scs_8_pd7, 0xffff, 0x55e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33462 {m68k_op_scs_8_aw, 0xffff, 0x55f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33463 {m68k_op_scs_8_al, 0xffff, 0x55f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33464 {m68k_op_trapcs_16, 0xffff, 0x55fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33465 {m68k_op_trapcs_32, 0xffff, 0x55fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33466 {m68k_op_trapcs, 0xffff, 0x55fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33467 {m68k_op_sne_8_pi7, 0xffff, 0x56df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33468 {m68k_op_sne_8_pd7, 0xffff, 0x56e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33469 {m68k_op_sne_8_aw, 0xffff, 0x56f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33470 {m68k_op_sne_8_al, 0xffff, 0x56f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33471 {m68k_op_trapne_16, 0xffff, 0x56fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33472 {m68k_op_trapne_32, 0xffff, 0x56fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33473 {m68k_op_trapne, 0xffff, 0x56fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33474 {m68k_op_seq_8_pi7, 0xffff, 0x57df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33475 {m68k_op_seq_8_pd7, 0xffff, 0x57e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33476 {m68k_op_seq_8_aw, 0xffff, 0x57f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33477 {m68k_op_seq_8_al, 0xffff, 0x57f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33478 {m68k_op_trapeq_16, 0xffff, 0x57fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33479 {m68k_op_trapeq_32, 0xffff, 0x57fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33480 {m68k_op_trapeq, 0xffff, 0x57fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33481 {m68k_op_svc_8_pi7, 0xffff, 0x58df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33482 {m68k_op_svc_8_pd7, 0xffff, 0x58e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33483 {m68k_op_svc_8_aw, 0xffff, 0x58f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33484 {m68k_op_svc_8_al, 0xffff, 0x58f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33485 {m68k_op_trapvc_16, 0xffff, 0x58fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33486 {m68k_op_trapvc_32, 0xffff, 0x58fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33487 {m68k_op_trapvc, 0xffff, 0x58fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33488 {m68k_op_svs_8_pi7, 0xffff, 0x59df, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33489 {m68k_op_svs_8_pd7, 0xffff, 0x59e7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33490 {m68k_op_svs_8_aw, 0xffff, 0x59f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33491 {m68k_op_svs_8_al, 0xffff, 0x59f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33492 {m68k_op_trapvs_16, 0xffff, 0x59fa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33493 {m68k_op_trapvs_32, 0xffff, 0x59fb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33494 {m68k_op_trapvs, 0xffff, 0x59fc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33495 {m68k_op_spl_8_pi7, 0xffff, 0x5adf, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33496 {m68k_op_spl_8_pd7, 0xffff, 0x5ae7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33497 {m68k_op_spl_8_aw, 0xffff, 0x5af8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33498 {m68k_op_spl_8_al, 0xffff, 0x5af9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33499 {m68k_op_trappl_16, 0xffff, 0x5afa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33500 {m68k_op_trappl_32, 0xffff, 0x5afb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33501 {m68k_op_trappl, 0xffff, 0x5afc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33502 {m68k_op_smi_8_pi7, 0xffff, 0x5bdf, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33503 {m68k_op_smi_8_pd7, 0xffff, 0x5be7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33504 {m68k_op_smi_8_aw, 0xffff, 0x5bf8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33505 {m68k_op_smi_8_al, 0xffff, 0x5bf9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33506 {m68k_op_trapmi_16, 0xffff, 0x5bfa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33507 {m68k_op_trapmi_32, 0xffff, 0x5bfb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33508 {m68k_op_trapmi, 0xffff, 0x5bfc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33509 {m68k_op_sge_8_pi7, 0xffff, 0x5cdf, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33510 {m68k_op_sge_8_pd7, 0xffff, 0x5ce7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33511 {m68k_op_sge_8_aw, 0xffff, 0x5cf8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33512 {m68k_op_sge_8_al, 0xffff, 0x5cf9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33513 {m68k_op_trapge_16, 0xffff, 0x5cfa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33514 {m68k_op_trapge_32, 0xffff, 0x5cfb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33515 {m68k_op_trapge, 0xffff, 0x5cfc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33516 {m68k_op_slt_8_pi7, 0xffff, 0x5ddf, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33517 {m68k_op_slt_8_pd7, 0xffff, 0x5de7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33518 {m68k_op_slt_8_aw, 0xffff, 0x5df8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33519 {m68k_op_slt_8_al, 0xffff, 0x5df9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33520 {m68k_op_traplt_16, 0xffff, 0x5dfa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33521 {m68k_op_traplt_32, 0xffff, 0x5dfb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33522 {m68k_op_traplt, 0xffff, 0x5dfc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33523 {m68k_op_sgt_8_pi7, 0xffff, 0x5edf, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33524 {m68k_op_sgt_8_pd7, 0xffff, 0x5ee7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33525 {m68k_op_sgt_8_aw, 0xffff, 0x5ef8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33526 {m68k_op_sgt_8_al, 0xffff, 0x5ef9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33527 {m68k_op_trapgt_16, 0xffff, 0x5efa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33528 {m68k_op_trapgt_32, 0xffff, 0x5efb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33529 {m68k_op_trapgt, 0xffff, 0x5efc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33530 {m68k_op_sle_8_pi7, 0xffff, 0x5fdf, { 12, 12, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33531 {m68k_op_sle_8_pd7, 0xffff, 0x5fe7, { 14, 14, 11, 11, 11, 11, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33532 {m68k_op_sle_8_aw, 0xffff, 0x5ff8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33533 {m68k_op_sle_8_al, 0xffff, 0x5ff9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33534 {m68k_op_traple_16, 0xffff, 0x5ffa, {255, 255, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33535 {m68k_op_traple_32, 0xffff, 0x5ffb, {255, 255, 8, 8, 8, 8, 8}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33536 {m68k_op_traple, 0xffff, 0x5ffc, {255, 255, 4, 4, 4, 4, 4}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33537 {m68k_op_bra_16, 0xffff, 0x6000, { 10, 10, 10, 10, 10, 10, 10}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33538 {m68k_op_bra_32, 0xffff, 0x60ff, { 10, 10, 10, 10, 10, 10, 10}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33539 {m68k_op_bsr_16, 0xffff, 0x6100, { 18, 18, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33540 {m68k_op_bsr_32, 0xffff, 0x61ff, { 18, 18, 7, 7, 7, 7, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33541 {m68k_op_bhi_16, 0xffff, 0x6200, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33542 {m68k_op_bhi_32, 0xffff, 0x62ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33543 {m68k_op_bls_16, 0xffff, 0x6300, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33544 {m68k_op_bls_32, 0xffff, 0x63ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33545 {m68k_op_bcc_16, 0xffff, 0x6400, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33546 {m68k_op_bcc_32, 0xffff, 0x64ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33547 {m68k_op_bcs_16, 0xffff, 0x6500, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33548 {m68k_op_bcs_32, 0xffff, 0x65ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33549 {m68k_op_bne_16, 0xffff, 0x6600, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33550 {m68k_op_bne_32, 0xffff, 0x66ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33551 {m68k_op_beq_16, 0xffff, 0x6700, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33552 {m68k_op_beq_32, 0xffff, 0x67ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33553 {m68k_op_bvc_16, 0xffff, 0x6800, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33554 {m68k_op_bvc_32, 0xffff, 0x68ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33555 {m68k_op_bvs_16, 0xffff, 0x6900, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33556 {m68k_op_bvs_32, 0xffff, 0x69ff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33557 {m68k_op_bpl_16, 0xffff, 0x6a00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33558 {m68k_op_bpl_32, 0xffff, 0x6aff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33559 {m68k_op_bmi_16, 0xffff, 0x6b00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33560 {m68k_op_bmi_32, 0xffff, 0x6bff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33561 {m68k_op_bge_16, 0xffff, 0x6c00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33562 {m68k_op_bge_32, 0xffff, 0x6cff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33563 {m68k_op_blt_16, 0xffff, 0x6d00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33564 {m68k_op_blt_32, 0xffff, 0x6dff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33565 {m68k_op_bgt_16, 0xffff, 0x6e00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33566 {m68k_op_bgt_32, 0xffff, 0x6eff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33567 {m68k_op_ble_16, 0xffff, 0x6f00, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33568 {m68k_op_ble_32, 0xffff, 0x6fff, { 10, 10, 6, 6, 6, 6, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33569 {m68k_op_sbcd_8_mm_axy7, 0xffff, 0x8f0f, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33570 {m68k_op_pack_16_mm_axy7, 0xffff, 0x8f4f, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33571 {m68k_op_unpk_16_mm_axy7, 0xffff, 0x8f8f, {255, 255, 13, 13, 13, 13, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33572 {m68k_op_subx_8_mm_axy7, 0xffff, 0x9f0f, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33573 {m68k_op_cmpm_8_axy7, 0xffff, 0xbf0f, { 12, 12, 9, 9, 9, 9, 9}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33574 {m68k_op_abcd_8_mm_axy7, 0xffff, 0xcf0f, { 18, 18, 16, 16, 16, 16, 16}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33575 {m68k_op_addx_8_mm_axy7, 0xffff, 0xdf0f, { 18, 18, 12, 12, 12, 12, 12}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33576 {m68k_op_asr_16_aw, 0xffff, 0xe0f8, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33577 {m68k_op_asr_16_al, 0xffff, 0xe0f9, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33578 {m68k_op_asl_16_aw, 0xffff, 0xe1f8, { 16, 16, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33579 {m68k_op_asl_16_al, 0xffff, 0xe1f9, { 20, 20, 10, 10, 10, 10, 6}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33580 {m68k_op_lsr_16_aw, 0xffff, 0xe2f8, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33581 {m68k_op_lsr_16_al, 0xffff, 0xe2f9, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33582 {m68k_op_lsl_16_aw, 0xffff, 0xe3f8, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33583 {m68k_op_lsl_16_al, 0xffff, 0xe3f9, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33584 {m68k_op_roxr_16_aw, 0xffff, 0xe4f8, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33585 {m68k_op_roxr_16_al, 0xffff, 0xe4f9, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33586 {m68k_op_roxl_16_aw, 0xffff, 0xe5f8, { 16, 16, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33587 {m68k_op_roxl_16_al, 0xffff, 0xe5f9, { 20, 20, 9, 9, 9, 9, 5}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33588 {m68k_op_ror_16_aw, 0xffff, 0xe6f8, { 16, 16, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33589 {m68k_op_ror_16_al, 0xffff, 0xe6f9, { 20, 20, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33590 {m68k_op_rol_16_aw, 0xffff, 0xe7f8, { 16, 16, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33591 {m68k_op_rol_16_al, 0xffff, 0xe7f9, { 20, 20, 11, 11, 11, 11, 7}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33592 {m68k_op_bftst_32_aw, 0xffff, 0xe8f8, {255, 255, 17, 17, 17, 17, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33593 {m68k_op_bftst_32_al, 0xffff, 0xe8f9, {255, 255, 17, 17, 17, 17, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33594 {m68k_op_bftst_32_pcdi, 0xffff, 0xe8fa, {255, 255, 18, 18, 18, 18, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33595 {m68k_op_bftst_32_pcix, 0xffff, 0xe8fb, {255, 255, 20, 20, 20, 20, 13}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33596 {m68k_op_bfextu_32_aw, 0xffff, 0xe9f8, {255, 255, 19, 19, 19, 19, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33597 {m68k_op_bfextu_32_al, 0xffff, 0xe9f9, {255, 255, 19, 19, 19, 19, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33598 {m68k_op_bfextu_32_pcdi, 0xffff, 0xe9fa, {255, 255, 20, 20, 20, 20, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33599 {m68k_op_bfextu_32_pcix, 0xffff, 0xe9fb, {255, 255, 22, 22, 22, 22, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33600 {m68k_op_bfchg_32_aw, 0xffff, 0xeaf8, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33601 {m68k_op_bfchg_32_al, 0xffff, 0xeaf9, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33602 {m68k_op_bfexts_32_aw, 0xffff, 0xebf8, {255, 255, 19, 19, 19, 19, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33603 {m68k_op_bfexts_32_al, 0xffff, 0xebf9, {255, 255, 19, 19, 19, 19, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33604 {m68k_op_bfexts_32_pcdi, 0xffff, 0xebfa, {255, 255, 20, 20, 20, 20, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33605 {m68k_op_bfexts_32_pcix, 0xffff, 0xebfb, {255, 255, 22, 22, 22, 22, 15}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33606 {m68k_op_bfclr_32_aw, 0xffff, 0xecf8, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33607 {m68k_op_bfclr_32_al, 0xffff, 0xecf9, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33608 {m68k_op_bfffo_32_aw, 0xffff, 0xedf8, {255, 255, 32, 32, 32, 32, 28}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33609 {m68k_op_bfffo_32_al, 0xffff, 0xedf9, {255, 255, 32, 32, 32, 32, 28}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33610 {m68k_op_bfffo_32_pcdi, 0xffff, 0xedfa, {255, 255, 33, 33, 33, 33, 28}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33611 {m68k_op_bfffo_32_pcix, 0xffff, 0xedfb, {255, 255, 35, 35, 35, 35, 28}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33612 {m68k_op_bfset_32_aw, 0xffff, 0xeef8, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33613 {m68k_op_bfset_32_al, 0xffff, 0xeef9, {255, 255, 24, 24, 24, 24, 20}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33614 {m68k_op_bfins_32_aw, 0xffff, 0xeff8, {255, 255, 21, 21, 21, 21, 17}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33615 {m68k_op_bfins_32_al, 0xffff, 0xeff9, {255, 255, 21, 21, 21, 21, 17}},
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33616 {NULL, 0, 0, {0, 0, 0, 0, 0}}
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33617 };
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33618
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33619
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33620 /* Build the opcode handler jump table */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33621
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33622 static void m68ki_set_one(unsigned short opcode, const opcode_handler_struct *s)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33623 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33624 for(int i=0; i<NUM_CPU_TYPES; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33625 if(s->cycles[i] != 0xff) {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33626 m68ki_cycles[i][opcode] = s->cycles[i];
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33627 m68ki_instruction_jump_table[i][opcode] = s->opcode_handler;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33628 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33629 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33630
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33631 void m68ki_build_opcode_table(void)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33632 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33633 const opcode_handler_struct *ostruct;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33634 int i;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33635 int j;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33636 int k;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33637
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33638 for(i = 0; i < 0x10000; i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33639 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33640 /* default to illegal */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33641 for(k=0;k<NUM_CPU_TYPES;k++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33642 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33643 m68ki_instruction_jump_table[k][i] = m68k_op_illegal;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33644 m68ki_cycles[k][i] = 0;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33645 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33646 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33647
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33648 ostruct = m68k_opcode_handler_table;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33649 while(ostruct->mask != 0xff00)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33650 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33651 for(i = 0;i < 0x10000;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33652 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33653 if((i & ostruct->mask) == ostruct->match)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33654 m68ki_set_one(i, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33655 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33656 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33657 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33658 while(ostruct->mask == 0xff00)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33659 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33660 for(i = 0;i <= 0xff;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33661 m68ki_set_one(ostruct->match | i, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33662 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33663 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33664 while(ostruct->mask == 0xff20)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33665 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33666 for(i = 0;i < 4;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33667 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33668 for(j = 0;j < 32;j++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33669 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33670 m68ki_set_one(ostruct->match | (i << 6) | j, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33671 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33672 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33673 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33674 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33675 while(ostruct->mask == 0xf1f8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33676 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33677 for(i = 0;i < 8;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33678 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33679 for(j = 0;j < 8;j++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33680 m68ki_set_one(ostruct->match | (i << 9) | j, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33681 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33682 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33683 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33684 while(ostruct->mask == 0xffd8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33685 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33686 for(i = 0;i < 2;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33687 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33688 for(j = 0;j < 8;j++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33689 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33690 m68ki_set_one(ostruct->match | (i << 5) | j, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33691 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33692 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33693 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33694 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33695 while(ostruct->mask == 0xfff0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33696 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33697 for(i = 0;i <= 0x0f;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33698 m68ki_set_one(ostruct->match | i, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33699 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33700 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33701 while(ostruct->mask == 0xf1ff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33702 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33703 for(i = 0;i <= 0x07;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33704 m68ki_set_one(ostruct->match | (i << 9), ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33705 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33706 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33707 while(ostruct->mask == 0xfff8)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33708 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33709 for(i = 0;i <= 0x07;i++)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33710 m68ki_set_one(ostruct->match | i, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33711 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33712 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33713 while(ostruct->mask == 0xffff)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33714 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33715 m68ki_set_one(ostruct->match, ostruct);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33716 ostruct++;
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33717 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33718
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33719 // if we fell all the way through with a non-zero mask, the opcode table wasn't built properly
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33720 if (ostruct->mask != 0)
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33721 {
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33722 fatal_error("m68ki_build_opcode_table: unhandled opcode mask %x (match %x), m68k core will not function!\n", ostruct->mask, ostruct->match);
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33723 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33724 }
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33725
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33726
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33727 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33728 /* ============================== END OF FILE ============================= */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33729 /* ======================================================================== */
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33730
ded16f3d7eb4 Super hacky integration of the version of Musashi from MAME
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33731