trunk/src/emu/cpu/arcompact/arcompactdasm.c
| r242413 | r242414 | |
| 7 | 7 | #include "emu.h" |
| 8 | 8 | #include <stdarg.h> |
| 9 | 9 | |
| 10 | | static char *output; |
| 10 | #include "arcompactdasm_dispatch.h" |
| 11 | #include "arcompactdasm_ops.h" |
| 11 | 12 | |
| 12 | | static void ATTR_PRINTF(1,2) print(const char *fmt, ...) |
| 13 | | { |
| 14 | | va_list vl; |
| 15 | 13 | |
| 16 | | va_start(vl, fmt); |
| 17 | | vsprintf(output, fmt, vl); |
| 18 | | va_end(vl); |
| 19 | | } |
| 20 | | |
| 21 | 14 | /*****************************************************************************/ |
| 22 | 15 | |
| 23 | 16 | |
| 24 | 17 | |
| 25 | 18 | /*****************************************************************************/ |
| 26 | 19 | |
| 27 | | #define DASM_OPS_16 char *output, offs_t pc, UINT16 op, const UINT8* oprom |
| 28 | | #define DASM_OPS_32 char *output, offs_t pc, UINT32 op, const UINT8* oprom |
| 29 | | #define DASM_PARAMS output, pc, op, oprom |
| 30 | 20 | |
| 31 | | #define LIMM_REG 62 |
| 32 | | |
| 33 | | #define GET_LIMM_32 \ |
| 34 | | limm = oprom[6] | (oprom[7] << 8); \ |
| 35 | | limm |= (oprom[4] << 16) | (oprom[5] << 24); \ |
| 36 | | |
| 37 | | int arcompact_handle04_00_dasm(DASM_OPS_32); |
| 38 | | int arcompact_handle04_01_dasm(DASM_OPS_32); |
| 39 | | int arcompact_handle04_02_dasm(DASM_OPS_32); |
| 40 | | int arcompact_handle04_03_dasm(DASM_OPS_32); |
| 41 | | int arcompact_handle04_04_dasm(DASM_OPS_32); |
| 42 | | int arcompact_handle04_05_dasm(DASM_OPS_32); |
| 43 | | int arcompact_handle04_06_dasm(DASM_OPS_32); |
| 44 | | int arcompact_handle04_07_dasm(DASM_OPS_32); |
| 45 | | int arcompact_handle04_08_dasm(DASM_OPS_32); |
| 46 | | int arcompact_handle04_09_dasm(DASM_OPS_32); |
| 47 | | int arcompact_handle04_0a_dasm(DASM_OPS_32); |
| 48 | | int arcompact_handle04_0b_dasm(DASM_OPS_32); |
| 49 | | int arcompact_handle04_0c_dasm(DASM_OPS_32); |
| 50 | | int arcompact_handle04_0d_dasm(DASM_OPS_32); |
| 51 | | int arcompact_handle04_0e_dasm(DASM_OPS_32); |
| 52 | | int arcompact_handle04_0f_dasm(DASM_OPS_32); |
| 53 | | int arcompact_handle04_10_dasm(DASM_OPS_32); |
| 54 | | int arcompact_handle04_11_dasm(DASM_OPS_32); |
| 55 | | int arcompact_handle04_12_dasm(DASM_OPS_32); |
| 56 | | int arcompact_handle04_13_dasm(DASM_OPS_32); |
| 57 | | int arcompact_handle04_14_dasm(DASM_OPS_32); |
| 58 | | int arcompact_handle04_15_dasm(DASM_OPS_32); |
| 59 | | int arcompact_handle04_16_dasm(DASM_OPS_32); |
| 60 | | int arcompact_handle04_17_dasm(DASM_OPS_32); |
| 61 | | int arcompact_handle04_18_dasm(DASM_OPS_32); |
| 62 | | int arcompact_handle04_19_dasm(DASM_OPS_32); |
| 63 | | int arcompact_handle04_1a_dasm(DASM_OPS_32); |
| 64 | | int arcompact_handle04_1b_dasm(DASM_OPS_32); |
| 65 | | int arcompact_handle04_1c_dasm(DASM_OPS_32); |
| 66 | | int arcompact_handle04_1d_dasm(DASM_OPS_32); |
| 67 | | int arcompact_handle04_1e_dasm(DASM_OPS_32); |
| 68 | | int arcompact_handle04_1f_dasm(DASM_OPS_32); |
| 69 | | int arcompact_handle04_20_dasm(DASM_OPS_32); |
| 70 | | int arcompact_handle04_21_dasm(DASM_OPS_32); |
| 71 | | int arcompact_handle04_22_dasm(DASM_OPS_32); |
| 72 | | int arcompact_handle04_23_dasm(DASM_OPS_32); |
| 73 | | int arcompact_handle04_24_dasm(DASM_OPS_32); |
| 74 | | int arcompact_handle04_25_dasm(DASM_OPS_32); |
| 75 | | int arcompact_handle04_26_dasm(DASM_OPS_32); |
| 76 | | int arcompact_handle04_27_dasm(DASM_OPS_32); |
| 77 | | int arcompact_handle04_28_dasm(DASM_OPS_32); |
| 78 | | int arcompact_handle04_29_dasm(DASM_OPS_32); |
| 79 | | int arcompact_handle04_2a_dasm(DASM_OPS_32); |
| 80 | | int arcompact_handle04_2b_dasm(DASM_OPS_32); |
| 81 | | int arcompact_handle04_2c_dasm(DASM_OPS_32); |
| 82 | | int arcompact_handle04_2d_dasm(DASM_OPS_32); |
| 83 | | int arcompact_handle04_2e_dasm(DASM_OPS_32); |
| 84 | | int arcompact_handle04_2f_dasm(DASM_OPS_32); |
| 85 | | int arcompact_handle04_30_dasm(DASM_OPS_32); |
| 86 | | int arcompact_handle04_31_dasm(DASM_OPS_32); |
| 87 | | int arcompact_handle04_32_dasm(DASM_OPS_32); |
| 88 | | int arcompact_handle04_33_dasm(DASM_OPS_32); |
| 89 | | int arcompact_handle04_34_dasm(DASM_OPS_32); |
| 90 | | int arcompact_handle04_35_dasm(DASM_OPS_32); |
| 91 | | int arcompact_handle04_36_dasm(DASM_OPS_32); |
| 92 | | int arcompact_handle04_37_dasm(DASM_OPS_32); |
| 93 | | int arcompact_handle04_38_dasm(DASM_OPS_32); |
| 94 | | int arcompact_handle04_39_dasm(DASM_OPS_32); |
| 95 | | int arcompact_handle04_3a_dasm(DASM_OPS_32); |
| 96 | | int arcompact_handle04_3b_dasm(DASM_OPS_32); |
| 97 | | int arcompact_handle04_3c_dasm(DASM_OPS_32); |
| 98 | | int arcompact_handle04_3d_dasm(DASM_OPS_32); |
| 99 | | int arcompact_handle04_3e_dasm(DASM_OPS_32); |
| 100 | | int arcompact_handle04_3f_dasm(DASM_OPS_32); |
| 101 | | |
| 102 | | int arcompact_handle04_2f_00_dasm(DASM_OPS_32); |
| 103 | | int arcompact_handle04_2f_01_dasm(DASM_OPS_32); |
| 104 | | int arcompact_handle04_2f_02_dasm(DASM_OPS_32); |
| 105 | | int arcompact_handle04_2f_03_dasm(DASM_OPS_32); |
| 106 | | int arcompact_handle04_2f_04_dasm(DASM_OPS_32); |
| 107 | | int arcompact_handle04_2f_05_dasm(DASM_OPS_32); |
| 108 | | int arcompact_handle04_2f_06_dasm(DASM_OPS_32); |
| 109 | | int arcompact_handle04_2f_07_dasm(DASM_OPS_32); |
| 110 | | int arcompact_handle04_2f_08_dasm(DASM_OPS_32); |
| 111 | | int arcompact_handle04_2f_09_dasm(DASM_OPS_32); |
| 112 | | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32); |
| 113 | | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32); |
| 114 | | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32); |
| 115 | | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32); |
| 116 | | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32); |
| 117 | | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32); |
| 118 | | int arcompact_handle04_2f_10_dasm(DASM_OPS_32); |
| 119 | | int arcompact_handle04_2f_11_dasm(DASM_OPS_32); |
| 120 | | int arcompact_handle04_2f_12_dasm(DASM_OPS_32); |
| 121 | | int arcompact_handle04_2f_13_dasm(DASM_OPS_32); |
| 122 | | int arcompact_handle04_2f_14_dasm(DASM_OPS_32); |
| 123 | | int arcompact_handle04_2f_15_dasm(DASM_OPS_32); |
| 124 | | int arcompact_handle04_2f_16_dasm(DASM_OPS_32); |
| 125 | | int arcompact_handle04_2f_17_dasm(DASM_OPS_32); |
| 126 | | int arcompact_handle04_2f_18_dasm(DASM_OPS_32); |
| 127 | | int arcompact_handle04_2f_19_dasm(DASM_OPS_32); |
| 128 | | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32); |
| 129 | | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32); |
| 130 | | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32); |
| 131 | | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32); |
| 132 | | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32); |
| 133 | | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32); |
| 134 | | int arcompact_handle04_2f_20_dasm(DASM_OPS_32); |
| 135 | | int arcompact_handle04_2f_21_dasm(DASM_OPS_32); |
| 136 | | int arcompact_handle04_2f_22_dasm(DASM_OPS_32); |
| 137 | | int arcompact_handle04_2f_23_dasm(DASM_OPS_32); |
| 138 | | int arcompact_handle04_2f_24_dasm(DASM_OPS_32); |
| 139 | | int arcompact_handle04_2f_25_dasm(DASM_OPS_32); |
| 140 | | int arcompact_handle04_2f_26_dasm(DASM_OPS_32); |
| 141 | | int arcompact_handle04_2f_27_dasm(DASM_OPS_32); |
| 142 | | int arcompact_handle04_2f_28_dasm(DASM_OPS_32); |
| 143 | | int arcompact_handle04_2f_29_dasm(DASM_OPS_32); |
| 144 | | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32); |
| 145 | | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32); |
| 146 | | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32); |
| 147 | | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32); |
| 148 | | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32); |
| 149 | | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32); |
| 150 | | int arcompact_handle04_2f_30_dasm(DASM_OPS_32); |
| 151 | | int arcompact_handle04_2f_31_dasm(DASM_OPS_32); |
| 152 | | int arcompact_handle04_2f_32_dasm(DASM_OPS_32); |
| 153 | | int arcompact_handle04_2f_33_dasm(DASM_OPS_32); |
| 154 | | int arcompact_handle04_2f_34_dasm(DASM_OPS_32); |
| 155 | | int arcompact_handle04_2f_35_dasm(DASM_OPS_32); |
| 156 | | int arcompact_handle04_2f_36_dasm(DASM_OPS_32); |
| 157 | | int arcompact_handle04_2f_37_dasm(DASM_OPS_32); |
| 158 | | int arcompact_handle04_2f_38_dasm(DASM_OPS_32); |
| 159 | | int arcompact_handle04_2f_39_dasm(DASM_OPS_32); |
| 160 | | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32); |
| 161 | | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32); |
| 162 | | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32); |
| 163 | | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32); |
| 164 | | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32); |
| 165 | | int arcompact_handle04_2f_3f_dasm(DASM_OPS_32); |
| 166 | | |
| 167 | | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32); |
| 168 | | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32); |
| 169 | | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32); |
| 170 | | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32); |
| 171 | | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32); |
| 172 | | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32); |
| 173 | | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32); |
| 174 | | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32); |
| 175 | | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32); |
| 176 | | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32); |
| 177 | | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32); |
| 178 | | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32); |
| 179 | | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32); |
| 180 | | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32); |
| 181 | | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32); |
| 182 | | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32); |
| 183 | | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32); |
| 184 | | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32); |
| 185 | | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32); |
| 186 | | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32); |
| 187 | | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32); |
| 188 | | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32); |
| 189 | | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32); |
| 190 | | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32); |
| 191 | | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32); |
| 192 | | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32); |
| 193 | | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32); |
| 194 | | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32); |
| 195 | | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32); |
| 196 | | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32); |
| 197 | | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32); |
| 198 | | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32); |
| 199 | | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32); |
| 200 | | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32); |
| 201 | | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32); |
| 202 | | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32); |
| 203 | | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32); |
| 204 | | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32); |
| 205 | | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32); |
| 206 | | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32); |
| 207 | | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32); |
| 208 | | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32); |
| 209 | | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32); |
| 210 | | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32); |
| 211 | | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32); |
| 212 | | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32); |
| 213 | | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32); |
| 214 | | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32); |
| 215 | | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32); |
| 216 | | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32); |
| 217 | | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32); |
| 218 | | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32); |
| 219 | | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32); |
| 220 | | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32); |
| 221 | | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32); |
| 222 | | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32); |
| 223 | | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32); |
| 224 | | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32); |
| 225 | | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32); |
| 226 | | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32); |
| 227 | | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32); |
| 228 | | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32); |
| 229 | | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32); |
| 230 | | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32); |
| 231 | | |
| 232 | | int arcompact_handle05_00_dasm(DASM_OPS_32); |
| 233 | | int arcompact_handle05_01_dasm(DASM_OPS_32); |
| 234 | | int arcompact_handle05_02_dasm(DASM_OPS_32); |
| 235 | | int arcompact_handle05_03_dasm(DASM_OPS_32); |
| 236 | | int arcompact_handle05_04_dasm(DASM_OPS_32); |
| 237 | | int arcompact_handle05_05_dasm(DASM_OPS_32); |
| 238 | | int arcompact_handle05_06_dasm(DASM_OPS_32); |
| 239 | | int arcompact_handle05_07_dasm(DASM_OPS_32); |
| 240 | | int arcompact_handle05_08_dasm(DASM_OPS_32); |
| 241 | | int arcompact_handle05_09_dasm(DASM_OPS_32); |
| 242 | | int arcompact_handle05_0a_dasm(DASM_OPS_32); |
| 243 | | int arcompact_handle05_0b_dasm(DASM_OPS_32); |
| 244 | | int arcompact_handle05_0c_dasm(DASM_OPS_32); |
| 245 | | int arcompact_handle05_0d_dasm(DASM_OPS_32); |
| 246 | | int arcompact_handle05_0e_dasm(DASM_OPS_32); |
| 247 | | int arcompact_handle05_0f_dasm(DASM_OPS_32); |
| 248 | | int arcompact_handle05_10_dasm(DASM_OPS_32); |
| 249 | | int arcompact_handle05_11_dasm(DASM_OPS_32); |
| 250 | | int arcompact_handle05_12_dasm(DASM_OPS_32); |
| 251 | | int arcompact_handle05_13_dasm(DASM_OPS_32); |
| 252 | | int arcompact_handle05_14_dasm(DASM_OPS_32); |
| 253 | | int arcompact_handle05_15_dasm(DASM_OPS_32); |
| 254 | | int arcompact_handle05_16_dasm(DASM_OPS_32); |
| 255 | | int arcompact_handle05_17_dasm(DASM_OPS_32); |
| 256 | | int arcompact_handle05_18_dasm(DASM_OPS_32); |
| 257 | | int arcompact_handle05_19_dasm(DASM_OPS_32); |
| 258 | | int arcompact_handle05_1a_dasm(DASM_OPS_32); |
| 259 | | int arcompact_handle05_1b_dasm(DASM_OPS_32); |
| 260 | | int arcompact_handle05_1c_dasm(DASM_OPS_32); |
| 261 | | int arcompact_handle05_1d_dasm(DASM_OPS_32); |
| 262 | | int arcompact_handle05_1e_dasm(DASM_OPS_32); |
| 263 | | int arcompact_handle05_1f_dasm(DASM_OPS_32); |
| 264 | | int arcompact_handle05_20_dasm(DASM_OPS_32); |
| 265 | | int arcompact_handle05_21_dasm(DASM_OPS_32); |
| 266 | | int arcompact_handle05_22_dasm(DASM_OPS_32); |
| 267 | | int arcompact_handle05_23_dasm(DASM_OPS_32); |
| 268 | | int arcompact_handle05_24_dasm(DASM_OPS_32); |
| 269 | | int arcompact_handle05_25_dasm(DASM_OPS_32); |
| 270 | | int arcompact_handle05_26_dasm(DASM_OPS_32); |
| 271 | | int arcompact_handle05_27_dasm(DASM_OPS_32); |
| 272 | | int arcompact_handle05_28_dasm(DASM_OPS_32); |
| 273 | | int arcompact_handle05_29_dasm(DASM_OPS_32); |
| 274 | | int arcompact_handle05_2a_dasm(DASM_OPS_32); |
| 275 | | int arcompact_handle05_2b_dasm(DASM_OPS_32); |
| 276 | | int arcompact_handle05_2c_dasm(DASM_OPS_32); |
| 277 | | int arcompact_handle05_2d_dasm(DASM_OPS_32); |
| 278 | | int arcompact_handle05_2e_dasm(DASM_OPS_32); |
| 279 | | int arcompact_handle05_2f_dasm(DASM_OPS_32); |
| 280 | | int arcompact_handle05_30_dasm(DASM_OPS_32); |
| 281 | | int arcompact_handle05_31_dasm(DASM_OPS_32); |
| 282 | | int arcompact_handle05_32_dasm(DASM_OPS_32); |
| 283 | | int arcompact_handle05_33_dasm(DASM_OPS_32); |
| 284 | | int arcompact_handle05_34_dasm(DASM_OPS_32); |
| 285 | | int arcompact_handle05_35_dasm(DASM_OPS_32); |
| 286 | | int arcompact_handle05_36_dasm(DASM_OPS_32); |
| 287 | | int arcompact_handle05_37_dasm(DASM_OPS_32); |
| 288 | | int arcompact_handle05_38_dasm(DASM_OPS_32); |
| 289 | | int arcompact_handle05_39_dasm(DASM_OPS_32); |
| 290 | | int arcompact_handle05_3a_dasm(DASM_OPS_32); |
| 291 | | int arcompact_handle05_3b_dasm(DASM_OPS_32); |
| 292 | | int arcompact_handle05_3c_dasm(DASM_OPS_32); |
| 293 | | int arcompact_handle05_3d_dasm(DASM_OPS_32); |
| 294 | | int arcompact_handle05_3e_dasm(DASM_OPS_32); |
| 295 | | int arcompact_handle05_3f_dasm(DASM_OPS_32); |
| 296 | | |
| 297 | | |
| 298 | | int arcompact_handle0c_00_dasm(DASM_OPS_16); |
| 299 | | int arcompact_handle0c_01_dasm(DASM_OPS_16); |
| 300 | | int arcompact_handle0c_02_dasm(DASM_OPS_16); |
| 301 | | int arcompact_handle0c_03_dasm(DASM_OPS_16); |
| 302 | | |
| 303 | | int arcompact_handle0d_00_dasm(DASM_OPS_16); |
| 304 | | int arcompact_handle0d_01_dasm(DASM_OPS_16); |
| 305 | | int arcompact_handle0d_02_dasm(DASM_OPS_16); |
| 306 | | int arcompact_handle0d_03_dasm(DASM_OPS_16); |
| 307 | | |
| 308 | | int arcompact_handle0e_00_dasm(DASM_OPS_16); |
| 309 | | int arcompact_handle0e_01_dasm(DASM_OPS_16); |
| 310 | | int arcompact_handle0e_02_dasm(DASM_OPS_16); |
| 311 | | int arcompact_handle0e_03_dasm(DASM_OPS_16); |
| 312 | | |
| 313 | | int arcompact_handle17_00_dasm(DASM_OPS_16); |
| 314 | | int arcompact_handle17_01_dasm(DASM_OPS_16); |
| 315 | | int arcompact_handle17_02_dasm(DASM_OPS_16); |
| 316 | | int arcompact_handle17_03_dasm(DASM_OPS_16); |
| 317 | | int arcompact_handle17_04_dasm(DASM_OPS_16); |
| 318 | | int arcompact_handle17_05_dasm(DASM_OPS_16); |
| 319 | | int arcompact_handle17_06_dasm(DASM_OPS_16); |
| 320 | | int arcompact_handle17_07_dasm(DASM_OPS_16); |
| 321 | | |
| 322 | | int arcompact_handle18_00_dasm(DASM_OPS_16); |
| 323 | | int arcompact_handle18_01_dasm(DASM_OPS_16); |
| 324 | | int arcompact_handle18_02_dasm(DASM_OPS_16); |
| 325 | | int arcompact_handle18_03_dasm(DASM_OPS_16); |
| 326 | | int arcompact_handle18_04_dasm(DASM_OPS_16); |
| 327 | | |
| 328 | | int arcompact_handle18_05_dasm(DASM_OPS_16); |
| 329 | | int arcompact_handle18_05_00_dasm(DASM_OPS_16); |
| 330 | | int arcompact_handle18_05_01_dasm(DASM_OPS_16); |
| 331 | | int arcompact_handle18_05_02_dasm(DASM_OPS_16); |
| 332 | | int arcompact_handle18_05_03_dasm(DASM_OPS_16); |
| 333 | | int arcompact_handle18_05_04_dasm(DASM_OPS_16); |
| 334 | | int arcompact_handle18_05_05_dasm(DASM_OPS_16); |
| 335 | | int arcompact_handle18_05_06_dasm(DASM_OPS_16); |
| 336 | | int arcompact_handle18_05_07_dasm(DASM_OPS_16); |
| 337 | | |
| 338 | | int arcompact_handle18_06_dasm(DASM_OPS_16); |
| 339 | | int arcompact_handle18_06_00_dasm(DASM_OPS_16); |
| 340 | | int arcompact_handle18_06_01_dasm(DASM_OPS_16); |
| 341 | | int arcompact_handle18_06_02_dasm(DASM_OPS_16); |
| 342 | | int arcompact_handle18_06_03_dasm(DASM_OPS_16); |
| 343 | | int arcompact_handle18_06_04_dasm(DASM_OPS_16); |
| 344 | | int arcompact_handle18_06_05_dasm(DASM_OPS_16); |
| 345 | | int arcompact_handle18_06_06_dasm(DASM_OPS_16); |
| 346 | | int arcompact_handle18_06_07_dasm(DASM_OPS_16); |
| 347 | | int arcompact_handle18_06_08_dasm(DASM_OPS_16); |
| 348 | | int arcompact_handle18_06_09_dasm(DASM_OPS_16); |
| 349 | | int arcompact_handle18_06_0a_dasm(DASM_OPS_16); |
| 350 | | int arcompact_handle18_06_0b_dasm(DASM_OPS_16); |
| 351 | | int arcompact_handle18_06_0c_dasm(DASM_OPS_16); |
| 352 | | int arcompact_handle18_06_0d_dasm(DASM_OPS_16); |
| 353 | | int arcompact_handle18_06_0e_dasm(DASM_OPS_16); |
| 354 | | int arcompact_handle18_06_0f_dasm(DASM_OPS_16); |
| 355 | | int arcompact_handle18_06_10_dasm(DASM_OPS_16); |
| 356 | | int arcompact_handle18_06_11_dasm(DASM_OPS_16); |
| 357 | | int arcompact_handle18_06_12_dasm(DASM_OPS_16); |
| 358 | | int arcompact_handle18_06_13_dasm(DASM_OPS_16); |
| 359 | | int arcompact_handle18_06_14_dasm(DASM_OPS_16); |
| 360 | | int arcompact_handle18_06_15_dasm(DASM_OPS_16); |
| 361 | | int arcompact_handle18_06_16_dasm(DASM_OPS_16); |
| 362 | | int arcompact_handle18_06_17_dasm(DASM_OPS_16); |
| 363 | | int arcompact_handle18_06_18_dasm(DASM_OPS_16); |
| 364 | | int arcompact_handle18_06_19_dasm(DASM_OPS_16); |
| 365 | | int arcompact_handle18_06_1a_dasm(DASM_OPS_16); |
| 366 | | int arcompact_handle18_06_1b_dasm(DASM_OPS_16); |
| 367 | | int arcompact_handle18_06_1c_dasm(DASM_OPS_16); |
| 368 | | int arcompact_handle18_06_1d_dasm(DASM_OPS_16); |
| 369 | | int arcompact_handle18_06_1e_dasm(DASM_OPS_16); |
| 370 | | int arcompact_handle18_06_1f_dasm(DASM_OPS_16); |
| 371 | | |
| 372 | | int arcompact_handle18_07_dasm(DASM_OPS_16); |
| 373 | | int arcompact_handle18_07_00_dasm(DASM_OPS_16); |
| 374 | | int arcompact_handle18_07_01_dasm(DASM_OPS_16); |
| 375 | | int arcompact_handle18_07_02_dasm(DASM_OPS_16); |
| 376 | | int arcompact_handle18_07_03_dasm(DASM_OPS_16); |
| 377 | | int arcompact_handle18_07_04_dasm(DASM_OPS_16); |
| 378 | | int arcompact_handle18_07_05_dasm(DASM_OPS_16); |
| 379 | | int arcompact_handle18_07_06_dasm(DASM_OPS_16); |
| 380 | | int arcompact_handle18_07_07_dasm(DASM_OPS_16); |
| 381 | | int arcompact_handle18_07_08_dasm(DASM_OPS_16); |
| 382 | | int arcompact_handle18_07_09_dasm(DASM_OPS_16); |
| 383 | | int arcompact_handle18_07_0a_dasm(DASM_OPS_16); |
| 384 | | int arcompact_handle18_07_0b_dasm(DASM_OPS_16); |
| 385 | | int arcompact_handle18_07_0c_dasm(DASM_OPS_16); |
| 386 | | int arcompact_handle18_07_0d_dasm(DASM_OPS_16); |
| 387 | | int arcompact_handle18_07_0e_dasm(DASM_OPS_16); |
| 388 | | int arcompact_handle18_07_0f_dasm(DASM_OPS_16); |
| 389 | | int arcompact_handle18_07_10_dasm(DASM_OPS_16); |
| 390 | | int arcompact_handle18_07_11_dasm(DASM_OPS_16); |
| 391 | | int arcompact_handle18_07_12_dasm(DASM_OPS_16); |
| 392 | | int arcompact_handle18_07_13_dasm(DASM_OPS_16); |
| 393 | | int arcompact_handle18_07_14_dasm(DASM_OPS_16); |
| 394 | | int arcompact_handle18_07_15_dasm(DASM_OPS_16); |
| 395 | | int arcompact_handle18_07_16_dasm(DASM_OPS_16); |
| 396 | | int arcompact_handle18_07_17_dasm(DASM_OPS_16); |
| 397 | | int arcompact_handle18_07_18_dasm(DASM_OPS_16); |
| 398 | | int arcompact_handle18_07_19_dasm(DASM_OPS_16); |
| 399 | | int arcompact_handle18_07_1a_dasm(DASM_OPS_16); |
| 400 | | int arcompact_handle18_07_1b_dasm(DASM_OPS_16); |
| 401 | | int arcompact_handle18_07_1c_dasm(DASM_OPS_16); |
| 402 | | int arcompact_handle18_07_1d_dasm(DASM_OPS_16); |
| 403 | | int arcompact_handle18_07_1e_dasm(DASM_OPS_16); |
| 404 | | int arcompact_handle18_07_1f_dasm(DASM_OPS_16); |
| 405 | | |
| 406 | | int arcompact_handle19_00_dasm(DASM_OPS_16); |
| 407 | | int arcompact_handle19_01_dasm(DASM_OPS_16); |
| 408 | | int arcompact_handle19_02_dasm(DASM_OPS_16); |
| 409 | | int arcompact_handle19_03_dasm(DASM_OPS_16); |
| 410 | | |
| 411 | | int arcompact_handle1c_00_dasm(DASM_OPS_16); |
| 412 | | int arcompact_handle1c_01_dasm(DASM_OPS_16); |
| 413 | | |
| 414 | | int arcompact_handle1d_00_dasm(DASM_OPS_16); |
| 415 | | int arcompact_handle1d_01_dasm(DASM_OPS_16); |
| 416 | | |
| 417 | | int arcompact_handle1e_00_dasm(DASM_OPS_16); |
| 418 | | int arcompact_handle1e_01_dasm(DASM_OPS_16); |
| 419 | | int arcompact_handle1e_02_dasm(DASM_OPS_16); |
| 420 | | int arcompact_handle1e_03_dasm(DASM_OPS_16); |
| 421 | | |
| 422 | | int arcompact_handle1e_03_00_dasm(DASM_OPS_16); |
| 423 | | int arcompact_handle1e_03_01_dasm(DASM_OPS_16); |
| 424 | | int arcompact_handle1e_03_02_dasm(DASM_OPS_16); |
| 425 | | int arcompact_handle1e_03_03_dasm(DASM_OPS_16); |
| 426 | | int arcompact_handle1e_03_04_dasm(DASM_OPS_16); |
| 427 | | int arcompact_handle1e_03_05_dasm(DASM_OPS_16); |
| 428 | | int arcompact_handle1e_03_06_dasm(DASM_OPS_16); |
| 429 | | int arcompact_handle1e_03_07_dasm(DASM_OPS_16); |
| 430 | | |
| 431 | | |
| 432 | | |
| 433 | | // condition codes (basic ones are the same as arc |
| 434 | | static const char *conditions[0x20] = |
| 435 | | { |
| 436 | | /* 00 */ "AL", // (aka RA - Always) |
| 437 | | /* 01 */ "EQ", // (aka Z - Zero |
| 438 | | /* 02 */ "NE", // (aka NZ - Non-Zero) |
| 439 | | /* 03 */ "PL", // (aka P - Positive) |
| 440 | | /* 04 */ "MI", // (aka N - Negative) |
| 441 | | /* 05 */ "CS", // (aka C, LO - Carry set / Lower than) (unsigned) |
| 442 | | /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned) |
| 443 | | /* 07 */ "VS", // (aka V - Overflow set) |
| 444 | | /* 08 */ "VC", // (aka NV - Overflow clear) |
| 445 | | /* 09 */ "GT", // ( - Greater than) (signed) |
| 446 | | /* 0a */ "GE", // ( - Greater than or Equal) (signed) |
| 447 | | /* 0b */ "LT", // ( - Less than) (signed) |
| 448 | | /* 0c */ "LE", // ( - Less than or Equal) (signed) |
| 449 | | /* 0d */ "HI", // ( - Higher than) (unsigned) |
| 450 | | /* 0e */ "LS", // ( - Lower or Same) (unsigned) |
| 451 | | /* 0f */ "PNZ",// ( - Positive non-0 value) |
| 452 | | /* 10 */ "0x10 Reserved", // possible CPU implementation specifics |
| 453 | | /* 11 */ "0x11 Reserved", |
| 454 | | /* 12 */ "0x12 Reserved", |
| 455 | | /* 13 */ "0x13 Reserved", |
| 456 | | /* 14 */ "0x14 Reserved", |
| 457 | | /* 15 */ "0x15 Reserved", |
| 458 | | /* 16 */ "0x16 Reserved", |
| 459 | | /* 17 */ "0x17 Reserved", |
| 460 | | /* 18 */ "0x18 Reserved", |
| 461 | | /* 19 */ "0x19 Reserved", |
| 462 | | /* 1a */ "0x1a Reserved", |
| 463 | | /* 1b */ "0x1b Reserved", |
| 464 | | /* 1c */ "0x1c Reserved", |
| 465 | | /* 1d */ "0x1d Reserved", |
| 466 | | /* 1e */ "0x1e Reserved", |
| 467 | | /* 1f */ "0x1f Reserved" |
| 468 | | }; |
| 469 | | |
| 470 | | static const char *table01_01_0x[0x10] = |
| 471 | | { |
| 472 | | /* 00 */ "BREQ", |
| 473 | | /* 01 */ "BRNE", |
| 474 | | /* 02 */ "BRLT", |
| 475 | | /* 03 */ "BRGE", |
| 476 | | /* 04 */ "BRLO", |
| 477 | | /* 05 */ "BRHS", |
| 478 | | /* 06 */ "<reserved>", |
| 479 | | /* 07 */ "<reserved>", |
| 480 | | /* 08 */ "<reserved>", |
| 481 | | /* 09 */ "<reserved>", |
| 482 | | /* 0a */ "<reserved>", |
| 483 | | /* 0b */ "<reserved>", |
| 484 | | /* 0c */ "<reserved>", |
| 485 | | /* 0d */ "<reserved>", |
| 486 | | /* 0e */ "<BBIT0>", |
| 487 | | /* 0f */ "<BBIT1>" |
| 488 | | }; |
| 489 | | |
| 490 | | |
| 491 | | |
| 492 | | |
| 493 | | |
| 494 | | static const char *table0f[0x20] = |
| 495 | | { |
| 496 | | /* 00 */ "SOPs", // Sub Operation (another table..) ( table0f_00 ) |
| 497 | | /* 01 */ "0x01 <illegal>", |
| 498 | | /* 02 */ "SUB_S", |
| 499 | | /* 03 */ "0x03 <illegal>", |
| 500 | | /* 04 */ "AND_S", |
| 501 | | /* 05 */ "OR_S", |
| 502 | | /* 06 */ "BIC_S", |
| 503 | | /* 07 */ "XOR_S", |
| 504 | | /* 08 */ "0x08 <illegal>", |
| 505 | | /* 09 */ "0x09 <illegal>", |
| 506 | | /* 0a */ "0x0a <illegal>", |
| 507 | | /* 0b */ "TST_S", |
| 508 | | /* 0c */ "MUL64_S", |
| 509 | | /* 0d */ "SEXB_S", |
| 510 | | /* 0e */ "SEXW_S", |
| 511 | | /* 0f */ "EXTB_S", |
| 512 | | /* 10 */ "EXTW_S", |
| 513 | | /* 11 */ "ABS_S", |
| 514 | | /* 12 */ "NOT_S", |
| 515 | | /* 13 */ "NEG_S", |
| 516 | | /* 14 */ "ADD1_S", |
| 517 | | /* 15 */ "ADD2_S>", |
| 518 | | /* 16 */ "ADD3_S", |
| 519 | | /* 17 */ "0x17 <illegal>", |
| 520 | | /* 18 */ "ASL_S (multiple)", |
| 521 | | /* 19 */ "LSR_S (multiple)", |
| 522 | | /* 1a */ "ASR_S (multiple)", |
| 523 | | /* 1b */ "ASL_S (single)", |
| 524 | | /* 1c */ "LSR_S (single)", |
| 525 | | /* 1d */ "ASR_S (single)", |
| 526 | | /* 1e */ "TRAP (not a5?)", |
| 527 | | /* 1f */ "BRK_S" // 0x7fff only? |
| 528 | | }; |
| 529 | | |
| 530 | | static const char *table0f_00[0x8] = |
| 531 | | { |
| 532 | | /* 00 */ "J_S", |
| 533 | | /* 01 */ "J_S.D", |
| 534 | | /* 02 */ "JL_S", |
| 535 | | /* 03 */ "JL_S.D", |
| 536 | | /* 04 */ "0x04 <illegal>", |
| 537 | | /* 05 */ "0x05 <illegal>", |
| 538 | | /* 06 */ "SUB_S.NE", |
| 539 | | /* 07 */ "ZOPs", // Sub Operations (yet another table..) ( table0f_00_07 ) |
| 540 | | }; |
| 541 | | |
| 542 | | static const char *table0f_00_07[0x8] = |
| 543 | | { |
| 544 | | /* 00 */ "NOP_S", |
| 545 | | /* 01 */ "UNIMP_S", // unimplemented (not a5?) |
| 546 | | /* 02 */ "0x02 <illegal>", |
| 547 | | /* 03 */ "0x03 <illegal>", |
| 548 | | /* 04 */ "JEQ_S [BLINK]", |
| 549 | | /* 05 */ "JNE_S [BLINK]", |
| 550 | | /* 06 */ "J_S [BLINK]", |
| 551 | | /* 07 */ "J_S.D [BLINK]", |
| 552 | | }; |
| 553 | | |
| 554 | 21 | #define ARCOMPACT_OPERATION ((op & 0xf800) >> 11) |
| 555 | 22 | |
| 23 | extern char *output;; |
| 556 | 24 | |
| 557 | | int arcompact_handle00_dasm(DASM_OPS_32) |
| 558 | | { |
| 559 | | if (op & 0x00010000) |
| 560 | | { // Branch Unconditionally Far |
| 561 | | // 00000 ssssssssss 1 SSSSSSSSSS N R TTTT |
| 562 | | INT32 address = (op & 0x07fe0000) >> 17; |
| 563 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 564 | | address |= ((op & 0x0000000f) >> 0) << 20; |
| 565 | | if (address & 0x800000) address = -(address & 0x7fffff); |
| 566 | | |
| 567 | | print("B %08x (%08x)", pc + (address * 2) + 2, op & ~0xffffffcf); |
| 568 | | } |
| 569 | | else |
| 570 | | { // Branch Conditionally |
| 571 | | // 00000 ssssssssss 0 SSSSSSSSSS N QQQQQ |
| 572 | | INT32 address = (op & 0x07fe0000) >> 17; |
| 573 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 574 | | if (address & 0x800000) address = -(address & 0x7fffff); |
| 575 | | |
| 576 | | UINT8 condition = op & 0x0000001f; |
| 577 | | |
| 578 | | print("B(%s) %08x (%08x)", conditions[condition], pc + (address * 2) + 2, op & ~0xffffffdf); |
| 579 | | } |
| 580 | | return 4; |
| 581 | | } |
| 582 | | |
| 583 | | int arcompact_handle01_dasm(DASM_OPS_32) |
| 584 | | { |
| 585 | | int size = 4; |
| 586 | | |
| 587 | | if (op & 0x00010000) |
| 588 | | { |
| 589 | | if (op & 0x00000010) |
| 590 | | { // Branch on Compare / Bit Test - Register-Immediate |
| 591 | | // 00001 bbb sssssss 1 S BBB UUUUUU N 1 iiii |
| 592 | | UINT8 subinstr = op & 0x0000000f; |
| 593 | | INT32 address = (op & 0x00fe0000) >> 17; |
| 594 | | address |= ((op & 0x00008000) >> 15) << 7; |
| 595 | | if (address & 0x80) address = -(address & 0x7f); |
| 596 | | |
| 597 | | |
| 598 | | print("%s (reg-imm) %08x (%08x)", table01_01_0x[subinstr], pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 599 | | |
| 600 | | |
| 601 | | } |
| 602 | | else |
| 603 | | { |
| 604 | | // Branch on Compare / Bit Test - Register-Register |
| 605 | | // 00001 bbb sssssss 1 S BBB CCCCCC N 0 iiii |
| 606 | | UINT8 subinstr = op & 0x0000000f; |
| 607 | | INT32 address = (op & 0x00fe0000) >> 17; |
| 608 | | address |= ((op & 0x00008000) >> 15) << 7; |
| 609 | | if (address & 0x80) address = -(address & 0x7f); |
| 610 | | |
| 611 | | int c = (op & 0x00000fc0)>> 6; |
| 612 | | int b = (op & 0x07000000) >> 24; |
| 613 | | b |= ((op & 0x00007000) >> 12) << 3; |
| 614 | | |
| 615 | | op &= ~0x07007fe0; |
| 616 | | |
| 617 | | if ((b != LIMM_REG) && (c != LIMM_REG)) |
| 618 | | { |
| 619 | | print("%s (reg-reg) (r%d) (r%d) %08x (%08x)", table01_01_0x[subinstr], b, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 620 | | } |
| 621 | | else |
| 622 | | { |
| 623 | | UINT32 limm; |
| 624 | | GET_LIMM_32; |
| 625 | | size = 8; |
| 626 | | |
| 627 | | if ((b == LIMM_REG) && (c != LIMM_REG)) |
| 628 | | { |
| 629 | | print("%s (reg-reg) (%08x) (r%d) %08x (%08x)", table01_01_0x[subinstr], limm, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 630 | | } |
| 631 | | else if ((c == LIMM_REG) && (b != LIMM_REG)) |
| 632 | | { |
| 633 | | print("%s (reg-reg) (r%d) (%08x) %08x (%08x)", table01_01_0x[subinstr], b, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 634 | | } |
| 635 | | else |
| 636 | | { |
| 637 | | // b and c are LIMM? invalid?? |
| 638 | | print("%s (reg-reg) (%08x) (%08x) (illegal?) %08x (%08x)", table01_01_0x[subinstr], limm, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 639 | | |
| 640 | | } |
| 641 | | } |
| 642 | | |
| 643 | | } |
| 644 | | |
| 645 | | } |
| 646 | | else |
| 647 | | { |
| 648 | | if (op & 0x00020000) |
| 649 | | { // Branch and Link Unconditionally Far |
| 650 | | // 00001 sssssssss 10 SSSSSSSSSS N R TTTT |
| 651 | | INT32 address = (op & 0x07fc0000) >> 17; |
| 652 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 653 | | address |= ((op & 0x0000000f) >> 0) << 20; |
| 654 | | if (address & 0x800000) address = -(address&0x7fffff); |
| 655 | | |
| 656 | | print("BL %08x (%08x)", pc + (address *2) + 2, op & ~0xffffffcf ); |
| 657 | | } |
| 658 | | else |
| 659 | | { // Branch and Link Conditionally |
| 660 | | // 00001 sssssssss 00 SSSSSSSSSS N QQQQQ |
| 661 | | INT32 address = (op & 0x07fc0000) >> 17; |
| 662 | | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 663 | | if (address & 0x800000) address = -(address&0x7fffff); |
| 664 | | |
| 665 | | UINT8 condition = op & 0x0000001f; |
| 666 | | |
| 667 | | print("BL(%s) %08x (%08x)", conditions[condition], pc + (address *2) + 2, op & ~0xffffffdf ); |
| 668 | | |
| 669 | | } |
| 670 | | |
| 671 | | } |
| 672 | | return size; |
| 673 | | } |
| 674 | | |
| 675 | | int arcompact_handle02_dasm(DASM_OPS_32) |
| 676 | | { |
| 677 | | // bitpos |
| 678 | | // 11111 111 11111111 0 000 0 00 00 0 000000 |
| 679 | | // fedcb a98 76543210 f edc b a9 87 6 543210 |
| 680 | | // fields |
| 681 | | // 00010 bbb ssssssss S BBB D aa ZZ X AAAAAA |
| 682 | | #if 0 |
| 683 | | int A = (op & 0x0000003f >> 0); op &= ~0x0000003f; |
| 684 | | int X = (op & 0x00000040 >> 6); op &= ~0x00000040; |
| 685 | | int Z = (op & 0x00000180 >> 7); op &= ~0x00000180; |
| 686 | | int a = (op & 0x00000600 >> 9); op &= ~0x00000600; |
| 687 | | int D = (op & 0x00000800 >> 11); op &= ~0x00000800; |
| 688 | | int B = (op & 0x00007000 >> 12); op &= ~0x00007000; |
| 689 | | int S = (op & 0x00008000 >> 15); op &= ~0x00008000; |
| 690 | | int s = (op & 0x00ff0000 >> 16); op &= ~0x00ff0000; |
| 691 | | int b = (op & 0x07000000 >> 24); op &= ~0x07000000; |
| 692 | | #endif |
| 693 | | |
| 694 | | print("LD r+o (%08x)", op ); |
| 695 | | return 4; |
| 696 | | } |
| 697 | | |
| 698 | | int arcompact_handle03_dasm(DASM_OPS_32) |
| 699 | | { |
| 700 | | // bitpos |
| 701 | | // 11111 111 11111111 0 000 000000 0 00 00 0 |
| 702 | | // fedcb a98 76543210 f edc ba9876 5 43 21 0 |
| 703 | | // fields |
| 704 | | // 00011 bbb ssssssss S BBB CCCCCC D aa ZZ R |
| 705 | | |
| 706 | | print("ST r+o (%08x)", op ); |
| 707 | | return 4; |
| 708 | | } |
| 709 | | |
| 710 | | int arcompact_handle04_dasm(DASM_OPS_32) |
| 711 | | { |
| 712 | | int size = 4; |
| 713 | | // General Operations |
| 714 | | |
| 715 | | // bitpos |
| 716 | | // 11111 111 11 111111 0 000 000000 0 00000 |
| 717 | | // fedcb a98 76 543210 f edc ba9876 5 43210 |
| 718 | | // |
| 719 | | // 00100 bbb 00 iiiiii F BBB CCCCCC A AAAAA General Operations *UN*Conditional Register to Register |
| 720 | | // 00100 bbb 01 iiiiii F BBB UUUUUU A AAAAA General Operations *UN*Conditional Register (Unsigned 6-bit IMM) |
| 721 | | // 00100 bbb 10 iiiiii F BBB ssssss S SSSSS General Operations *UN*Conditional Register (Signed 12-bit IMM) |
| 722 | | |
| 723 | | // 00100 bbb 11 iiiiii F BBB CCCCCC 0 QQQQQ General Operations Conditional Register |
| 724 | | // 00100 bbb 11 iiiiii F BBB UUUUUU 1 QQQQQ General Operations Conditional Register (Unsigned 6-bit IMM) |
| 725 | | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 726 | | op &= ~0x003f0000; |
| 727 | | |
| 728 | | switch (subinstr) |
| 729 | | { |
| 730 | | case 0x00: size = arcompact_handle04_00_dasm(DASM_PARAMS); break; // ADD |
| 731 | | case 0x01: size = arcompact_handle04_01_dasm(DASM_PARAMS); break; // ADC |
| 732 | | case 0x02: size = arcompact_handle04_02_dasm(DASM_PARAMS); break; // SUB |
| 733 | | case 0x03: size = arcompact_handle04_03_dasm(DASM_PARAMS); break; // SBC |
| 734 | | case 0x04: size = arcompact_handle04_04_dasm(DASM_PARAMS); break; // AND |
| 735 | | case 0x05: size = arcompact_handle04_05_dasm(DASM_PARAMS); break; // OR |
| 736 | | case 0x06: size = arcompact_handle04_06_dasm(DASM_PARAMS); break; // BIC |
| 737 | | case 0x07: size = arcompact_handle04_07_dasm(DASM_PARAMS); break; // XOR |
| 738 | | case 0x08: size = arcompact_handle04_08_dasm(DASM_PARAMS); break; // MAX |
| 739 | | case 0x09: size = arcompact_handle04_09_dasm(DASM_PARAMS); break; // MIN |
| 740 | | case 0x0a: size = arcompact_handle04_0a_dasm(DASM_PARAMS); break; // MOV |
| 741 | | case 0x0b: size = arcompact_handle04_0b_dasm(DASM_PARAMS); break; // TST |
| 742 | | case 0x0c: size = arcompact_handle04_0c_dasm(DASM_PARAMS); break; // CMP |
| 743 | | case 0x0d: size = arcompact_handle04_0d_dasm(DASM_PARAMS); break; // RCMP |
| 744 | | case 0x0e: size = arcompact_handle04_0e_dasm(DASM_PARAMS); break; // RSUB |
| 745 | | case 0x0f: size = arcompact_handle04_0f_dasm(DASM_PARAMS); break; // BSET |
| 746 | | case 0x10: size = arcompact_handle04_10_dasm(DASM_PARAMS); break; // BCLR |
| 747 | | case 0x11: size = arcompact_handle04_11_dasm(DASM_PARAMS); break; // BTST |
| 748 | | case 0x12: size = arcompact_handle04_12_dasm(DASM_PARAMS); break; // BXOR |
| 749 | | case 0x13: size = arcompact_handle04_13_dasm(DASM_PARAMS); break; // BMSK |
| 750 | | case 0x14: size = arcompact_handle04_14_dasm(DASM_PARAMS); break; // ADD1 |
| 751 | | case 0x15: size = arcompact_handle04_15_dasm(DASM_PARAMS); break; // ADD2 |
| 752 | | case 0x16: size = arcompact_handle04_16_dasm(DASM_PARAMS); break; // ADD3 |
| 753 | | case 0x17: size = arcompact_handle04_17_dasm(DASM_PARAMS); break; // SUB1 |
| 754 | | case 0x18: size = arcompact_handle04_18_dasm(DASM_PARAMS); break; // SUB2 |
| 755 | | case 0x19: size = arcompact_handle04_19_dasm(DASM_PARAMS); break; // SUB3 |
| 756 | | case 0x1a: size = arcompact_handle04_1a_dasm(DASM_PARAMS); break; // MPY * |
| 757 | | case 0x1b: size = arcompact_handle04_1b_dasm(DASM_PARAMS); break; // MPYH * |
| 758 | | case 0x1c: size = arcompact_handle04_1c_dasm(DASM_PARAMS); break; // MPYHU * |
| 759 | | case 0x1d: size = arcompact_handle04_1d_dasm(DASM_PARAMS); break; // MPYU * |
| 760 | | case 0x1e: size = arcompact_handle04_1e_dasm(DASM_PARAMS); break; // illegal |
| 761 | | case 0x1f: size = arcompact_handle04_1f_dasm(DASM_PARAMS); break; // illegal |
| 762 | | case 0x20: size = arcompact_handle04_20_dasm(DASM_PARAMS); break; // Jcc |
| 763 | | case 0x21: size = arcompact_handle04_21_dasm(DASM_PARAMS); break; // Jcc.D |
| 764 | | case 0x22: size = arcompact_handle04_22_dasm(DASM_PARAMS); break; // JLcc |
| 765 | | case 0x23: size = arcompact_handle04_23_dasm(DASM_PARAMS); break; // JLcc.D |
| 766 | | case 0x24: size = arcompact_handle04_24_dasm(DASM_PARAMS); break; // illegal |
| 767 | | case 0x25: size = arcompact_handle04_25_dasm(DASM_PARAMS); break; // illegal |
| 768 | | case 0x26: size = arcompact_handle04_26_dasm(DASM_PARAMS); break; // illegal |
| 769 | | case 0x27: size = arcompact_handle04_27_dasm(DASM_PARAMS); break; // illegal |
| 770 | | case 0x28: size = arcompact_handle04_28_dasm(DASM_PARAMS); break; // LPcc |
| 771 | | case 0x29: size = arcompact_handle04_29_dasm(DASM_PARAMS); break; // FLAG |
| 772 | | case 0x2a: size = arcompact_handle04_2a_dasm(DASM_PARAMS); break; // LR |
| 773 | | case 0x2b: size = arcompact_handle04_2b_dasm(DASM_PARAMS); break; // SR |
| 774 | | case 0x2c: size = arcompact_handle04_2c_dasm(DASM_PARAMS); break; // illegal |
| 775 | | case 0x2d: size = arcompact_handle04_2d_dasm(DASM_PARAMS); break; // illegal |
| 776 | | case 0x2e: size = arcompact_handle04_2e_dasm(DASM_PARAMS); break; // illegal |
| 777 | | case 0x2f: size = arcompact_handle04_2f_dasm(DASM_PARAMS); break; // Sub Opcode |
| 778 | | case 0x30: size = arcompact_handle04_30_dasm(DASM_PARAMS); break; // LD r-r |
| 779 | | case 0x31: size = arcompact_handle04_31_dasm(DASM_PARAMS); break; // LD r-r |
| 780 | | case 0x32: size = arcompact_handle04_32_dasm(DASM_PARAMS); break; // LD r-r |
| 781 | | case 0x33: size = arcompact_handle04_33_dasm(DASM_PARAMS); break; // LD r-r |
| 782 | | case 0x34: size = arcompact_handle04_34_dasm(DASM_PARAMS); break; // LD r-r |
| 783 | | case 0x35: size = arcompact_handle04_35_dasm(DASM_PARAMS); break; // LD r-r |
| 784 | | case 0x36: size = arcompact_handle04_36_dasm(DASM_PARAMS); break; // LD r-r |
| 785 | | case 0x37: size = arcompact_handle04_37_dasm(DASM_PARAMS); break; // LD r-r |
| 786 | | case 0x38: size = arcompact_handle04_38_dasm(DASM_PARAMS); break; // illegal |
| 787 | | case 0x39: size = arcompact_handle04_39_dasm(DASM_PARAMS); break; // illegal |
| 788 | | case 0x3a: size = arcompact_handle04_3a_dasm(DASM_PARAMS); break; // illegal |
| 789 | | case 0x3b: size = arcompact_handle04_3b_dasm(DASM_PARAMS); break; // illegal |
| 790 | | case 0x3c: size = arcompact_handle04_3c_dasm(DASM_PARAMS); break; // illegal |
| 791 | | case 0x3d: size = arcompact_handle04_3d_dasm(DASM_PARAMS); break; // illegal |
| 792 | | case 0x3e: size = arcompact_handle04_3e_dasm(DASM_PARAMS); break; // illegal |
| 793 | | case 0x3f: size = arcompact_handle04_3f_dasm(DASM_PARAMS); break; // illegal |
| 794 | | } |
| 795 | | |
| 796 | | return size; |
| 797 | | } |
| 798 | | |
| 799 | | int arcompact_handle04_00_dasm(DASM_OPS_32) { print("ADD (%08x)", op); return 4;} |
| 800 | | int arcompact_handle04_01_dasm(DASM_OPS_32) { print("ADC (%08x)", op); return 4;} |
| 801 | | int arcompact_handle04_02_dasm(DASM_OPS_32) { print("SUB (%08x)", op); return 4;} |
| 802 | | int arcompact_handle04_03_dasm(DASM_OPS_32) { print("SBC (%08x)", op); return 4;} |
| 803 | | int arcompact_handle04_04_dasm(DASM_OPS_32) { print("AND (%08x)", op); return 4;} |
| 804 | | int arcompact_handle04_05_dasm(DASM_OPS_32) { print("OR (%08x)", op); return 4;} |
| 805 | | int arcompact_handle04_06_dasm(DASM_OPS_32) { print("BIC (%08x)", op); return 4;} |
| 806 | | int arcompact_handle04_07_dasm(DASM_OPS_32) { print("XOR (%08x)", op); return 4;} |
| 807 | | int arcompact_handle04_08_dasm(DASM_OPS_32) { print("MAX (%08x)", op); return 4;} |
| 808 | | int arcompact_handle04_09_dasm(DASM_OPS_32) { print("MIN (%08x)", op); return 4;} |
| 809 | | int arcompact_handle04_0a_dasm(DASM_OPS_32) { print("MOV (%08x)", op); return 4;} |
| 810 | | int arcompact_handle04_0b_dasm(DASM_OPS_32) { print("TST (%08x)", op); return 4;} |
| 811 | | int arcompact_handle04_0c_dasm(DASM_OPS_32) { print("CMP (%08x)", op); return 4;} |
| 812 | | int arcompact_handle04_0d_dasm(DASM_OPS_32) { print("RCMP (%08x)", op); return 4;} |
| 813 | | int arcompact_handle04_0e_dasm(DASM_OPS_32) { print("RSUB (%08x)", op); return 4;} |
| 814 | | int arcompact_handle04_0f_dasm(DASM_OPS_32) { print("BSET (%08x)", op); return 4;} |
| 815 | | int arcompact_handle04_10_dasm(DASM_OPS_32) { print("BCLR (%08x)", op); return 4;} |
| 816 | | int arcompact_handle04_11_dasm(DASM_OPS_32) { print("BTST (%08x)", op); return 4;} |
| 817 | | int arcompact_handle04_12_dasm(DASM_OPS_32) { print("BXOR (%08x)", op); return 4;} |
| 818 | | int arcompact_handle04_13_dasm(DASM_OPS_32) { print("BMSK (%08x)", op); return 4;} |
| 819 | | int arcompact_handle04_14_dasm(DASM_OPS_32) { print("ADD1 (%08x)", op); return 4;} |
| 820 | | int arcompact_handle04_15_dasm(DASM_OPS_32) { print("ADD2 (%08x)", op); return 4;} |
| 821 | | int arcompact_handle04_16_dasm(DASM_OPS_32) { print("ADD3 (%08x)", op); return 4;} |
| 822 | | int arcompact_handle04_17_dasm(DASM_OPS_32) { print("SUB1 (%08x)", op); return 4;} |
| 823 | | int arcompact_handle04_18_dasm(DASM_OPS_32) { print("SUB2 (%08x)", op); return 4;} |
| 824 | | int arcompact_handle04_19_dasm(DASM_OPS_32) { print("SUB3 (%08x)", op); return 4;} |
| 825 | | int arcompact_handle04_1a_dasm(DASM_OPS_32) { print("MPY (%08x)", op); return 4;} // * |
| 826 | | int arcompact_handle04_1b_dasm(DASM_OPS_32) { print("MPYH (%08x)", op); return 4;} // * |
| 827 | | int arcompact_handle04_1c_dasm(DASM_OPS_32) { print("MPYHU (%08x)", op); return 4;} // * |
| 828 | | int arcompact_handle04_1d_dasm(DASM_OPS_32) { print("MPYU (%08x)", op); return 4;} // * |
| 829 | | int arcompact_handle04_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_1e> (%08x)", op); return 4;} |
| 830 | | int arcompact_handle04_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_1f> (%08x)", op); return 4;} |
| 831 | | |
| 832 | | |
| 833 | | |
| 834 | | int arcompact_handle04_20_dasm(DASM_OPS_32) |
| 835 | | { |
| 836 | | // todo, other bits (in none long immediate mode at least) |
| 837 | | |
| 838 | | int size = 4; |
| 839 | | int C = (op & 0x00000fc0) >> 6; |
| 840 | | UINT8 condition = op & 0x0000001f; |
| 841 | | |
| 842 | | op &= ~0x00000fc0; |
| 843 | | |
| 844 | | if (C == LIMM_REG) |
| 845 | | { |
| 846 | | UINT32 limm; |
| 847 | | GET_LIMM_32; |
| 848 | | size = 8; |
| 849 | | |
| 850 | | print("J(%s) %08x (%08x)", conditions[condition], limm, op); |
| 851 | | } |
| 852 | | else |
| 853 | | { |
| 854 | | print("J(%s) (r%d) (%08x)", conditions[condition], C, op); |
| 855 | | } |
| 856 | | |
| 857 | | return size; |
| 858 | | } |
| 859 | | |
| 860 | | |
| 861 | | |
| 862 | | int arcompact_handle04_21_dasm(DASM_OPS_32) { print("Jcc.D (%08x)", op); return 4;} |
| 863 | | int arcompact_handle04_22_dasm(DASM_OPS_32) { print("JLcc (%08x)", op); return 4;} |
| 864 | | int arcompact_handle04_23_dasm(DASM_OPS_32) { print("JLcc.D (%08x)", op); return 4;} |
| 865 | | int arcompact_handle04_24_dasm(DASM_OPS_32) { print("<illegal 0x04_24> (%08x)", op); return 4;} |
| 866 | | int arcompact_handle04_25_dasm(DASM_OPS_32) { print("<illegal 0x04_25> (%08x)", op); return 4;} |
| 867 | | int arcompact_handle04_26_dasm(DASM_OPS_32) { print("<illegal 0x04_26> (%08x)", op); return 4;} |
| 868 | | int arcompact_handle04_27_dasm(DASM_OPS_32) { print("<illegal 0x04_27> (%08x)", op); return 4;} |
| 869 | | int arcompact_handle04_28_dasm(DASM_OPS_32) { print("LPcc (%08x)", op); return 4;} |
| 870 | | int arcompact_handle04_29_dasm(DASM_OPS_32) { print("FLAG (%08x)", op); return 4;} |
| 871 | | int arcompact_handle04_2a_dasm(DASM_OPS_32) { print("LR (%08x)", op); return 4;} |
| 872 | | int arcompact_handle04_2b_dasm(DASM_OPS_32) { print("SR (%08x)", op); return 4;} |
| 873 | | int arcompact_handle04_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2c> (%08x)", op); return 4;} |
| 874 | | int arcompact_handle04_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2d> (%08x)", op); return 4;} |
| 875 | | int arcompact_handle04_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2e> (%08x)", op); return 4;} |
| 876 | | |
| 877 | | int arcompact_handle04_2f_dasm(DASM_OPS_32) |
| 878 | | { |
| 879 | | int size = 4; |
| 880 | | UINT8 subinstr2 = (op & 0x0000003f) >> 0; |
| 881 | | op &= ~0x0000003f; |
| 882 | | |
| 883 | | switch (subinstr2) |
| 884 | | { |
| 885 | | case 0x00: size = arcompact_handle04_2f_00_dasm(DASM_PARAMS); break; // ASL |
| 886 | | case 0x01: size = arcompact_handle04_2f_01_dasm(DASM_PARAMS); break; // ASR |
| 887 | | case 0x02: size = arcompact_handle04_2f_02_dasm(DASM_PARAMS); break; // LSR |
| 888 | | case 0x03: size = arcompact_handle04_2f_03_dasm(DASM_PARAMS); break; // ROR |
| 889 | | case 0x04: size = arcompact_handle04_2f_04_dasm(DASM_PARAMS); break; // RCC |
| 890 | | case 0x05: size = arcompact_handle04_2f_05_dasm(DASM_PARAMS); break; // SEXB |
| 891 | | case 0x06: size = arcompact_handle04_2f_06_dasm(DASM_PARAMS); break; // SEXW |
| 892 | | case 0x07: size = arcompact_handle04_2f_07_dasm(DASM_PARAMS); break; // EXTB |
| 893 | | case 0x08: size = arcompact_handle04_2f_08_dasm(DASM_PARAMS); break; // EXTW |
| 894 | | case 0x09: size = arcompact_handle04_2f_09_dasm(DASM_PARAMS); break; // ABS |
| 895 | | case 0x0a: size = arcompact_handle04_2f_0a_dasm(DASM_PARAMS); break; // NOT |
| 896 | | case 0x0b: size = arcompact_handle04_2f_0b_dasm(DASM_PARAMS); break; // RLC |
| 897 | | case 0x0c: size = arcompact_handle04_2f_0c_dasm(DASM_PARAMS); break; // EX |
| 898 | | case 0x0d: size = arcompact_handle04_2f_0d_dasm(DASM_PARAMS); break; // illegal |
| 899 | | case 0x0e: size = arcompact_handle04_2f_0e_dasm(DASM_PARAMS); break; // illegal |
| 900 | | case 0x0f: size = arcompact_handle04_2f_0f_dasm(DASM_PARAMS); break; // illegal |
| 901 | | case 0x10: size = arcompact_handle04_2f_10_dasm(DASM_PARAMS); break; // illegal |
| 902 | | case 0x11: size = arcompact_handle04_2f_11_dasm(DASM_PARAMS); break; // illegal |
| 903 | | case 0x12: size = arcompact_handle04_2f_12_dasm(DASM_PARAMS); break; // illegal |
| 904 | | case 0x13: size = arcompact_handle04_2f_13_dasm(DASM_PARAMS); break; // illegal |
| 905 | | case 0x14: size = arcompact_handle04_2f_14_dasm(DASM_PARAMS); break; // illegal |
| 906 | | case 0x15: size = arcompact_handle04_2f_15_dasm(DASM_PARAMS); break; // illegal |
| 907 | | case 0x16: size = arcompact_handle04_2f_16_dasm(DASM_PARAMS); break; // illegal |
| 908 | | case 0x17: size = arcompact_handle04_2f_17_dasm(DASM_PARAMS); break; // illegal |
| 909 | | case 0x18: size = arcompact_handle04_2f_18_dasm(DASM_PARAMS); break; // illegal |
| 910 | | case 0x19: size = arcompact_handle04_2f_19_dasm(DASM_PARAMS); break; // illegal |
| 911 | | case 0x1a: size = arcompact_handle04_2f_1a_dasm(DASM_PARAMS); break; // illegal |
| 912 | | case 0x1b: size = arcompact_handle04_2f_1b_dasm(DASM_PARAMS); break; // illegal |
| 913 | | case 0x1c: size = arcompact_handle04_2f_1c_dasm(DASM_PARAMS); break; // illegal |
| 914 | | case 0x1d: size = arcompact_handle04_2f_1d_dasm(DASM_PARAMS); break; // illegal |
| 915 | | case 0x1e: size = arcompact_handle04_2f_1e_dasm(DASM_PARAMS); break; // illegal |
| 916 | | case 0x1f: size = arcompact_handle04_2f_1f_dasm(DASM_PARAMS); break; // illegal |
| 917 | | case 0x20: size = arcompact_handle04_2f_20_dasm(DASM_PARAMS); break; // illegal |
| 918 | | case 0x21: size = arcompact_handle04_2f_21_dasm(DASM_PARAMS); break; // illegal |
| 919 | | case 0x22: size = arcompact_handle04_2f_22_dasm(DASM_PARAMS); break; // illegal |
| 920 | | case 0x23: size = arcompact_handle04_2f_23_dasm(DASM_PARAMS); break; // illegal |
| 921 | | case 0x24: size = arcompact_handle04_2f_24_dasm(DASM_PARAMS); break; // illegal |
| 922 | | case 0x25: size = arcompact_handle04_2f_25_dasm(DASM_PARAMS); break; // illegal |
| 923 | | case 0x26: size = arcompact_handle04_2f_26_dasm(DASM_PARAMS); break; // illegal |
| 924 | | case 0x27: size = arcompact_handle04_2f_27_dasm(DASM_PARAMS); break; // illegal |
| 925 | | case 0x28: size = arcompact_handle04_2f_28_dasm(DASM_PARAMS); break; // illegal |
| 926 | | case 0x29: size = arcompact_handle04_2f_29_dasm(DASM_PARAMS); break; // illegal |
| 927 | | case 0x2a: size = arcompact_handle04_2f_2a_dasm(DASM_PARAMS); break; // illegal |
| 928 | | case 0x2b: size = arcompact_handle04_2f_2b_dasm(DASM_PARAMS); break; // illegal |
| 929 | | case 0x2c: size = arcompact_handle04_2f_2c_dasm(DASM_PARAMS); break; // illegal |
| 930 | | case 0x2d: size = arcompact_handle04_2f_2d_dasm(DASM_PARAMS); break; // illegal |
| 931 | | case 0x2e: size = arcompact_handle04_2f_2e_dasm(DASM_PARAMS); break; // illegal |
| 932 | | case 0x2f: size = arcompact_handle04_2f_2f_dasm(DASM_PARAMS); break; // illegal |
| 933 | | case 0x30: size = arcompact_handle04_2f_30_dasm(DASM_PARAMS); break; // illegal |
| 934 | | case 0x31: size = arcompact_handle04_2f_31_dasm(DASM_PARAMS); break; // illegal |
| 935 | | case 0x32: size = arcompact_handle04_2f_32_dasm(DASM_PARAMS); break; // illegal |
| 936 | | case 0x33: size = arcompact_handle04_2f_33_dasm(DASM_PARAMS); break; // illegal |
| 937 | | case 0x34: size = arcompact_handle04_2f_34_dasm(DASM_PARAMS); break; // illegal |
| 938 | | case 0x35: size = arcompact_handle04_2f_35_dasm(DASM_PARAMS); break; // illegal |
| 939 | | case 0x36: size = arcompact_handle04_2f_36_dasm(DASM_PARAMS); break; // illegal |
| 940 | | case 0x37: size = arcompact_handle04_2f_37_dasm(DASM_PARAMS); break; // illegal |
| 941 | | case 0x38: size = arcompact_handle04_2f_38_dasm(DASM_PARAMS); break; // illegal |
| 942 | | case 0x39: size = arcompact_handle04_2f_39_dasm(DASM_PARAMS); break; // illegal |
| 943 | | case 0x3a: size = arcompact_handle04_2f_3a_dasm(DASM_PARAMS); break; // illegal |
| 944 | | case 0x3b: size = arcompact_handle04_2f_3b_dasm(DASM_PARAMS); break; // illegal |
| 945 | | case 0x3c: size = arcompact_handle04_2f_3c_dasm(DASM_PARAMS); break; // illegal |
| 946 | | case 0x3d: size = arcompact_handle04_2f_3d_dasm(DASM_PARAMS); break; // illegal |
| 947 | | case 0x3e: size = arcompact_handle04_2f_3e_dasm(DASM_PARAMS); break; // illegal |
| 948 | | case 0x3f: size = arcompact_handle04_2f_3f_dasm(DASM_PARAMS); break; // ZOPs (Zero Operand Opcodes) |
| 949 | | } |
| 950 | | |
| 951 | | return size; |
| 952 | | } |
| 953 | | |
| 954 | | |
| 955 | | int arcompact_handle04_2f_00_dasm(DASM_OPS_32) { print("ASL (%08x)", op); return 4;} // ASL |
| 956 | | int arcompact_handle04_2f_01_dasm(DASM_OPS_32) { print("ASR (%08x)", op); return 4;} // ASR |
| 957 | | int arcompact_handle04_2f_02_dasm(DASM_OPS_32) { print("LSR (%08x)", op); return 4;} // LSR |
| 958 | | int arcompact_handle04_2f_03_dasm(DASM_OPS_32) { print("ROR (%08x)", op); return 4;} // ROR |
| 959 | | int arcompact_handle04_2f_04_dasm(DASM_OPS_32) { print("RCC (%08x)", op); return 4;} // RCC |
| 960 | | int arcompact_handle04_2f_05_dasm(DASM_OPS_32) { print("SEXB (%08x)", op); return 4;} // SEXB |
| 961 | | int arcompact_handle04_2f_06_dasm(DASM_OPS_32) { print("SEXW (%08x)", op); return 4;} // SEXW |
| 962 | | int arcompact_handle04_2f_07_dasm(DASM_OPS_32) { print("EXTB (%08x)", op); return 4;} // EXTB |
| 963 | | int arcompact_handle04_2f_08_dasm(DASM_OPS_32) { print("EXTW (%08x)", op); return 4;} // EXTW |
| 964 | | int arcompact_handle04_2f_09_dasm(DASM_OPS_32) { print("ABS (%08x)", op); return 4;} // ABS |
| 965 | | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32) { print("NOT (%08x)", op); return 4;} // NOT |
| 966 | | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32) { print("RLC (%08x)", op); return 4;} // RLC |
| 967 | | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32) { print("EX (%08x)", op); return 4;} // EX |
| 968 | | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0d> (%08x)", op); return 4;} |
| 969 | | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0e> (%08x)", op); return 4;} |
| 970 | | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0f> (%08x)", op); return 4;} |
| 971 | | int arcompact_handle04_2f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_10> (%08x)", op); return 4;} |
| 972 | | int arcompact_handle04_2f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_11> (%08x)", op); return 4;} |
| 973 | | int arcompact_handle04_2f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_12> (%08x)", op); return 4;} |
| 974 | | int arcompact_handle04_2f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_13> (%08x)", op); return 4;} |
| 975 | | int arcompact_handle04_2f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_14> (%08x)", op); return 4;} |
| 976 | | int arcompact_handle04_2f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_15> (%08x)", op); return 4;} |
| 977 | | int arcompact_handle04_2f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_16> (%08x)", op); return 4;} |
| 978 | | int arcompact_handle04_2f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_17> (%08x)", op); return 4;} |
| 979 | | int arcompact_handle04_2f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_18> (%08x)", op); return 4;} |
| 980 | | int arcompact_handle04_2f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_19> (%08x)", op); return 4;} |
| 981 | | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1a> (%08x)", op); return 4;} |
| 982 | | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1b> (%08x)", op); return 4;} |
| 983 | | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1c> (%08x)", op); return 4;} |
| 984 | | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1d> (%08x)", op); return 4;} |
| 985 | | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1e> (%08x)", op); return 4;} |
| 986 | | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1f> (%08x)", op); return 4;} |
| 987 | | int arcompact_handle04_2f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_20> (%08x)", op); return 4;} |
| 988 | | int arcompact_handle04_2f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_21> (%08x)", op); return 4;} |
| 989 | | int arcompact_handle04_2f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_22> (%08x)", op); return 4;} |
| 990 | | int arcompact_handle04_2f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_23> (%08x)", op); return 4;} |
| 991 | | int arcompact_handle04_2f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_24> (%08x)", op); return 4;} |
| 992 | | int arcompact_handle04_2f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_25> (%08x)", op); return 4;} |
| 993 | | int arcompact_handle04_2f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_26> (%08x)", op); return 4;} |
| 994 | | int arcompact_handle04_2f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_27> (%08x)", op); return 4;} |
| 995 | | int arcompact_handle04_2f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_28> (%08x)", op); return 4;} |
| 996 | | int arcompact_handle04_2f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_29> (%08x)", op); return 4;} |
| 997 | | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2a> (%08x)", op); return 4;} |
| 998 | | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2b> (%08x)", op); return 4;} |
| 999 | | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2c> (%08x)", op); return 4;} |
| 1000 | | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2d> (%08x)", op); return 4;} |
| 1001 | | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2e> (%08x)", op); return 4;} |
| 1002 | | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2f> (%08x)", op); return 4;} |
| 1003 | | int arcompact_handle04_2f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_30> (%08x)", op); return 4;} |
| 1004 | | int arcompact_handle04_2f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_31> (%08x)", op); return 4;} |
| 1005 | | int arcompact_handle04_2f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_32> (%08x)", op); return 4;} |
| 1006 | | int arcompact_handle04_2f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_33> (%08x)", op); return 4;} |
| 1007 | | int arcompact_handle04_2f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_34> (%08x)", op); return 4;} |
| 1008 | | int arcompact_handle04_2f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_35> (%08x)", op); return 4;} |
| 1009 | | int arcompact_handle04_2f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_36> (%08x)", op); return 4;} |
| 1010 | | int arcompact_handle04_2f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_37> (%08x)", op); return 4;} |
| 1011 | | int arcompact_handle04_2f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_38> (%08x)", op); return 4;} |
| 1012 | | int arcompact_handle04_2f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_39> (%08x)", op); return 4;} |
| 1013 | | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3a> (%08x)", op); return 4;} |
| 1014 | | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3b> (%08x)", op); return 4;} |
| 1015 | | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3c> (%08x)", op); return 4;} |
| 1016 | | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3d> (%08x)", op); return 4;} |
| 1017 | | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3e> (%08x)", op); return 4;} |
| 1018 | | |
| 1019 | | int arcompact_handle04_2f_3f_dasm(DASM_OPS_32) |
| 1020 | | { |
| 1021 | | int size = 4; |
| 1022 | | UINT8 subinstr3 = (op & 0x07000000) >> 24; |
| 1023 | | subinstr3 |= ((op & 0x00007000) >> 12) << 3; |
| 1024 | | |
| 1025 | | op &= ~0x07007000; |
| 1026 | | |
| 1027 | | switch (subinstr3) |
| 1028 | | { |
| 1029 | | case 0x00: size = arcompact_handle04_2f_3f_00_dasm(DASM_PARAMS); break; // illegal |
| 1030 | | case 0x01: size = arcompact_handle04_2f_3f_01_dasm(DASM_PARAMS); break; // SLEEP |
| 1031 | | case 0x02: size = arcompact_handle04_2f_3f_02_dasm(DASM_PARAMS); break; // SWI / TRAP9 |
| 1032 | | case 0x03: size = arcompact_handle04_2f_3f_03_dasm(DASM_PARAMS); break; // SYNC |
| 1033 | | case 0x04: size = arcompact_handle04_2f_3f_04_dasm(DASM_PARAMS); break; // RTIE |
| 1034 | | case 0x05: size = arcompact_handle04_2f_3f_05_dasm(DASM_PARAMS); break; // BRK |
| 1035 | | case 0x06: size = arcompact_handle04_2f_3f_06_dasm(DASM_PARAMS); break; // illegal |
| 1036 | | case 0x07: size = arcompact_handle04_2f_3f_07_dasm(DASM_PARAMS); break; // illegal |
| 1037 | | case 0x08: size = arcompact_handle04_2f_3f_08_dasm(DASM_PARAMS); break; // illegal |
| 1038 | | case 0x09: size = arcompact_handle04_2f_3f_09_dasm(DASM_PARAMS); break; // illegal |
| 1039 | | case 0x0a: size = arcompact_handle04_2f_3f_0a_dasm(DASM_PARAMS); break; // illegal |
| 1040 | | case 0x0b: size = arcompact_handle04_2f_3f_0b_dasm(DASM_PARAMS); break; // illegal |
| 1041 | | case 0x0c: size = arcompact_handle04_2f_3f_0c_dasm(DASM_PARAMS); break; // illegal |
| 1042 | | case 0x0d: size = arcompact_handle04_2f_3f_0d_dasm(DASM_PARAMS); break; // illegal |
| 1043 | | case 0x0e: size = arcompact_handle04_2f_3f_0e_dasm(DASM_PARAMS); break; // illegal |
| 1044 | | case 0x0f: size = arcompact_handle04_2f_3f_0f_dasm(DASM_PARAMS); break; // illegal |
| 1045 | | case 0x10: size = arcompact_handle04_2f_3f_10_dasm(DASM_PARAMS); break; // illegal |
| 1046 | | case 0x11: size = arcompact_handle04_2f_3f_11_dasm(DASM_PARAMS); break; // illegal |
| 1047 | | case 0x12: size = arcompact_handle04_2f_3f_12_dasm(DASM_PARAMS); break; // illegal |
| 1048 | | case 0x13: size = arcompact_handle04_2f_3f_13_dasm(DASM_PARAMS); break; // illegal |
| 1049 | | case 0x14: size = arcompact_handle04_2f_3f_14_dasm(DASM_PARAMS); break; // illegal |
| 1050 | | case 0x15: size = arcompact_handle04_2f_3f_15_dasm(DASM_PARAMS); break; // illegal |
| 1051 | | case 0x16: size = arcompact_handle04_2f_3f_16_dasm(DASM_PARAMS); break; // illegal |
| 1052 | | case 0x17: size = arcompact_handle04_2f_3f_17_dasm(DASM_PARAMS); break; // illegal |
| 1053 | | case 0x18: size = arcompact_handle04_2f_3f_18_dasm(DASM_PARAMS); break; // illegal |
| 1054 | | case 0x19: size = arcompact_handle04_2f_3f_19_dasm(DASM_PARAMS); break; // illegal |
| 1055 | | case 0x1a: size = arcompact_handle04_2f_3f_1a_dasm(DASM_PARAMS); break; // illegal |
| 1056 | | case 0x1b: size = arcompact_handle04_2f_3f_1b_dasm(DASM_PARAMS); break; // illegal |
| 1057 | | case 0x1c: size = arcompact_handle04_2f_3f_1c_dasm(DASM_PARAMS); break; // illegal |
| 1058 | | case 0x1d: size = arcompact_handle04_2f_3f_1d_dasm(DASM_PARAMS); break; // illegal |
| 1059 | | case 0x1e: size = arcompact_handle04_2f_3f_1e_dasm(DASM_PARAMS); break; // illegal |
| 1060 | | case 0x1f: size = arcompact_handle04_2f_3f_1f_dasm(DASM_PARAMS); break; // illegal |
| 1061 | | case 0x20: size = arcompact_handle04_2f_3f_20_dasm(DASM_PARAMS); break; // illegal |
| 1062 | | case 0x21: size = arcompact_handle04_2f_3f_21_dasm(DASM_PARAMS); break; // illegal |
| 1063 | | case 0x22: size = arcompact_handle04_2f_3f_22_dasm(DASM_PARAMS); break; // illegal |
| 1064 | | case 0x23: size = arcompact_handle04_2f_3f_23_dasm(DASM_PARAMS); break; // illegal |
| 1065 | | case 0x24: size = arcompact_handle04_2f_3f_24_dasm(DASM_PARAMS); break; // illegal |
| 1066 | | case 0x25: size = arcompact_handle04_2f_3f_25_dasm(DASM_PARAMS); break; // illegal |
| 1067 | | case 0x26: size = arcompact_handle04_2f_3f_26_dasm(DASM_PARAMS); break; // illegal |
| 1068 | | case 0x27: size = arcompact_handle04_2f_3f_27_dasm(DASM_PARAMS); break; // illegal |
| 1069 | | case 0x28: size = arcompact_handle04_2f_3f_28_dasm(DASM_PARAMS); break; // illegal |
| 1070 | | case 0x29: size = arcompact_handle04_2f_3f_29_dasm(DASM_PARAMS); break; // illegal |
| 1071 | | case 0x2a: size = arcompact_handle04_2f_3f_2a_dasm(DASM_PARAMS); break; // illegal |
| 1072 | | case 0x2b: size = arcompact_handle04_2f_3f_2b_dasm(DASM_PARAMS); break; // illegal |
| 1073 | | case 0x2c: size = arcompact_handle04_2f_3f_2c_dasm(DASM_PARAMS); break; // illegal |
| 1074 | | case 0x2d: size = arcompact_handle04_2f_3f_2d_dasm(DASM_PARAMS); break; // illegal |
| 1075 | | case 0x2e: size = arcompact_handle04_2f_3f_2e_dasm(DASM_PARAMS); break; // illegal |
| 1076 | | case 0x2f: size = arcompact_handle04_2f_3f_2f_dasm(DASM_PARAMS); break; // illegal |
| 1077 | | case 0x30: size = arcompact_handle04_2f_3f_30_dasm(DASM_PARAMS); break; // illegal |
| 1078 | | case 0x31: size = arcompact_handle04_2f_3f_31_dasm(DASM_PARAMS); break; // illegal |
| 1079 | | case 0x32: size = arcompact_handle04_2f_3f_32_dasm(DASM_PARAMS); break; // illegal |
| 1080 | | case 0x33: size = arcompact_handle04_2f_3f_33_dasm(DASM_PARAMS); break; // illegal |
| 1081 | | case 0x34: size = arcompact_handle04_2f_3f_34_dasm(DASM_PARAMS); break; // illegal |
| 1082 | | case 0x35: size = arcompact_handle04_2f_3f_35_dasm(DASM_PARAMS); break; // illegal |
| 1083 | | case 0x36: size = arcompact_handle04_2f_3f_36_dasm(DASM_PARAMS); break; // illegal |
| 1084 | | case 0x37: size = arcompact_handle04_2f_3f_37_dasm(DASM_PARAMS); break; // illegal |
| 1085 | | case 0x38: size = arcompact_handle04_2f_3f_38_dasm(DASM_PARAMS); break; // illegal |
| 1086 | | case 0x39: size = arcompact_handle04_2f_3f_39_dasm(DASM_PARAMS); break; // illegal |
| 1087 | | case 0x3a: size = arcompact_handle04_2f_3f_3a_dasm(DASM_PARAMS); break; // illegal |
| 1088 | | case 0x3b: size = arcompact_handle04_2f_3f_3b_dasm(DASM_PARAMS); break; // illegal |
| 1089 | | case 0x3c: size = arcompact_handle04_2f_3f_3c_dasm(DASM_PARAMS); break; // illegal |
| 1090 | | case 0x3d: size = arcompact_handle04_2f_3f_3d_dasm(DASM_PARAMS); break; // illegal |
| 1091 | | case 0x3e: size = arcompact_handle04_2f_3f_3e_dasm(DASM_PARAMS); break; // illegal |
| 1092 | | case 0x3f: size = arcompact_handle04_2f_3f_3f_dasm(DASM_PARAMS); break; // illegal |
| 1093 | | } |
| 1094 | | |
| 1095 | | return size; |
| 1096 | | } |
| 1097 | | |
| 1098 | | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_00> (%08x)", op); return 4;} |
| 1099 | | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32) { print("SLEEP (%08x)", op); return 4;} |
| 1100 | | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32) { print("SWI / TRAP0 (%08x)", op); return 4;} |
| 1101 | | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32) { print("SYNC (%08x)", op); return 4;} |
| 1102 | | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32) { print("RTIE (%08x)", op); return 4;} |
| 1103 | | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32) { print("BRK (%08x)", op); return 4;} |
| 1104 | | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_06> (%08x)", op); return 4;} |
| 1105 | | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_07> (%08x)", op); return 4;} |
| 1106 | | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_08> (%08x)", op); return 4;} |
| 1107 | | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_09> (%08x)", op); return 4;} |
| 1108 | | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0a> (%08x)", op); return 4;} |
| 1109 | | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0b> (%08x)", op); return 4;} |
| 1110 | | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0c> (%08x)", op); return 4;} |
| 1111 | | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0d> (%08x)", op); return 4;} |
| 1112 | | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0e> (%08x)", op); return 4;} |
| 1113 | | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0f> (%08x)", op); return 4;} |
| 1114 | | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_10> (%08x)", op); return 4;} |
| 1115 | | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_11> (%08x)", op); return 4;} |
| 1116 | | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_12> (%08x)", op); return 4;} |
| 1117 | | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_13> (%08x)", op); return 4;} |
| 1118 | | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_14> (%08x)", op); return 4;} |
| 1119 | | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_15> (%08x)", op); return 4;} |
| 1120 | | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_16> (%08x)", op); return 4;} |
| 1121 | | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_17> (%08x)", op); return 4;} |
| 1122 | | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_18> (%08x)", op); return 4;} |
| 1123 | | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_19> (%08x)", op); return 4;} |
| 1124 | | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1a> (%08x)", op); return 4;} |
| 1125 | | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1b> (%08x)", op); return 4;} |
| 1126 | | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1c> (%08x)", op); return 4;} |
| 1127 | | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1d> (%08x)", op); return 4;} |
| 1128 | | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1e> (%08x)", op); return 4;} |
| 1129 | | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1f> (%08x)", op); return 4;} |
| 1130 | | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_20> (%08x)", op); return 4;} |
| 1131 | | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_21> (%08x)", op); return 4;} |
| 1132 | | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_22> (%08x)", op); return 4;} |
| 1133 | | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_23> (%08x)", op); return 4;} |
| 1134 | | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_24> (%08x)", op); return 4;} |
| 1135 | | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_25> (%08x)", op); return 4;} |
| 1136 | | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_26> (%08x)", op); return 4;} |
| 1137 | | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_27> (%08x)", op); return 4;} |
| 1138 | | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_28> (%08x)", op); return 4;} |
| 1139 | | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_29> (%08x)", op); return 4;} |
| 1140 | | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2a> (%08x)", op); return 4;} |
| 1141 | | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2b> (%08x)", op); return 4;} |
| 1142 | | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2c> (%08x)", op); return 4;} |
| 1143 | | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2d> (%08x)", op); return 4;} |
| 1144 | | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2e> (%08x)", op); return 4;} |
| 1145 | | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2f> (%08x)", op); return 4;} |
| 1146 | | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_30> (%08x)", op); return 4;} |
| 1147 | | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_31> (%08x)", op); return 4;} |
| 1148 | | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_32> (%08x)", op); return 4;} |
| 1149 | | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_33> (%08x)", op); return 4;} |
| 1150 | | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_34> (%08x)", op); return 4;} |
| 1151 | | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_35> (%08x)", op); return 4;} |
| 1152 | | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_36> (%08x)", op); return 4;} |
| 1153 | | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_37> (%08x)", op); return 4;} |
| 1154 | | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_38> (%08x)", op); return 4;} |
| 1155 | | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_39> (%08x)", op); return 4;} |
| 1156 | | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3a> (%08x)", op); return 4;} |
| 1157 | | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3b> (%08x)", op); return 4;} |
| 1158 | | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3c> (%08x)", op); return 4;} |
| 1159 | | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3d> (%08x)", op); return 4;} |
| 1160 | | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3e> (%08x)", op); return 4;} |
| 1161 | | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3f> (%08x)", op); return 4;} |
| 1162 | | |
| 1163 | | |
| 1164 | | |
| 1165 | | |
| 1166 | | |
| 1167 | | |
| 1168 | | |
| 1169 | | |
| 1170 | | int arcompact_handle04_30_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x30) (%08x)", op); return 4;} |
| 1171 | | int arcompact_handle04_31_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x31) (%08x)", op); return 4;} |
| 1172 | | int arcompact_handle04_32_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x32) (%08x)", op); return 4;} |
| 1173 | | int arcompact_handle04_33_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x33) (%08x)", op); return 4;} |
| 1174 | | int arcompact_handle04_34_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x34) (%08x)", op); return 4;} |
| 1175 | | int arcompact_handle04_35_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x35) (%08x)", op); return 4;} |
| 1176 | | int arcompact_handle04_36_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x36) (%08x)", op); return 4;} |
| 1177 | | int arcompact_handle04_37_dasm(DASM_OPS_32) { print("LD r-r (basecase 0x37) (%08x)", op); return 4;} |
| 1178 | | int arcompact_handle04_38_dasm(DASM_OPS_32) { print("<illegal 0x04_38> (%08x)", op); return 4;} |
| 1179 | | int arcompact_handle04_39_dasm(DASM_OPS_32) { print("<illegal 0x04_39> (%08x)", op); return 4;} |
| 1180 | | int arcompact_handle04_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_3a> (%08x)", op); return 4;} |
| 1181 | | int arcompact_handle04_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_3b> (%08x)", op); return 4;} |
| 1182 | | int arcompact_handle04_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_3c> (%08x)", op); return 4;} |
| 1183 | | int arcompact_handle04_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_3d> (%08x)", op); return 4;} |
| 1184 | | int arcompact_handle04_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_3e> (%08x)", op); return 4;} |
| 1185 | | int arcompact_handle04_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_3f> (%08x)", op); return 4;} |
| 1186 | | |
| 1187 | | |
| 1188 | | |
| 1189 | | |
| 1190 | | |
| 1191 | | // this is an Extension ALU group, maybe optional on some CPUs? |
| 1192 | | int arcompact_handle05_dasm(DASM_OPS_32) |
| 1193 | | { |
| 1194 | | int size = 4; |
| 1195 | | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 1196 | | op &= ~0x003f0000; |
| 1197 | | |
| 1198 | | switch (subinstr) |
| 1199 | | { |
| 1200 | | case 0x00: size = arcompact_handle05_00_dasm(DASM_PARAMS); break; // ASL |
| 1201 | | case 0x01: size = arcompact_handle05_01_dasm(DASM_PARAMS); break; // LSR |
| 1202 | | case 0x02: size = arcompact_handle05_02_dasm(DASM_PARAMS); break; // ASR |
| 1203 | | case 0x03: size = arcompact_handle05_03_dasm(DASM_PARAMS); break; // ROR |
| 1204 | | case 0x04: size = arcompact_handle05_04_dasm(DASM_PARAMS); break; // MUL64 |
| 1205 | | case 0x05: size = arcompact_handle05_05_dasm(DASM_PARAMS); break; // MULU64 |
| 1206 | | case 0x06: size = arcompact_handle05_06_dasm(DASM_PARAMS); break; // ADDS |
| 1207 | | case 0x07: size = arcompact_handle05_07_dasm(DASM_PARAMS); break; // SUBS |
| 1208 | | case 0x08: size = arcompact_handle05_08_dasm(DASM_PARAMS); break; // DIVAW |
| 1209 | | case 0x09: size = arcompact_handle05_09_dasm(DASM_PARAMS); break; // illegal |
| 1210 | | case 0x0a: size = arcompact_handle05_0a_dasm(DASM_PARAMS); break; // ASLS |
| 1211 | | case 0x0b: size = arcompact_handle05_0b_dasm(DASM_PARAMS); break; // ASRS |
| 1212 | | case 0x0c: size = arcompact_handle05_0c_dasm(DASM_PARAMS); break; // illegal |
| 1213 | | case 0x0d: size = arcompact_handle05_0d_dasm(DASM_PARAMS); break; // illegal |
| 1214 | | case 0x0e: size = arcompact_handle05_0e_dasm(DASM_PARAMS); break; // illegal |
| 1215 | | case 0x0f: size = arcompact_handle05_0f_dasm(DASM_PARAMS); break; // illegal |
| 1216 | | case 0x10: size = arcompact_handle05_10_dasm(DASM_PARAMS); break; // illegal |
| 1217 | | case 0x11: size = arcompact_handle05_11_dasm(DASM_PARAMS); break; // illegal |
| 1218 | | case 0x12: size = arcompact_handle05_12_dasm(DASM_PARAMS); break; // illegal |
| 1219 | | case 0x13: size = arcompact_handle05_13_dasm(DASM_PARAMS); break; // illegal |
| 1220 | | case 0x14: size = arcompact_handle05_14_dasm(DASM_PARAMS); break; // illegal |
| 1221 | | case 0x15: size = arcompact_handle05_15_dasm(DASM_PARAMS); break; // illegal |
| 1222 | | case 0x16: size = arcompact_handle05_16_dasm(DASM_PARAMS); break; // illegal |
| 1223 | | case 0x17: size = arcompact_handle05_17_dasm(DASM_PARAMS); break; // illegal |
| 1224 | | case 0x18: size = arcompact_handle05_18_dasm(DASM_PARAMS); break; // illegal |
| 1225 | | case 0x19: size = arcompact_handle05_19_dasm(DASM_PARAMS); break; // illegal |
| 1226 | | case 0x1a: size = arcompact_handle05_1a_dasm(DASM_PARAMS); break; // illegal |
| 1227 | | case 0x1b: size = arcompact_handle05_1b_dasm(DASM_PARAMS); break; // illegal |
| 1228 | | case 0x1c: size = arcompact_handle05_1c_dasm(DASM_PARAMS); break; // illegal |
| 1229 | | case 0x1d: size = arcompact_handle05_1d_dasm(DASM_PARAMS); break; // illegal |
| 1230 | | case 0x1e: size = arcompact_handle05_1e_dasm(DASM_PARAMS); break; // illegal |
| 1231 | | case 0x1f: size = arcompact_handle05_1f_dasm(DASM_PARAMS); break; // illegal |
| 1232 | | case 0x20: size = arcompact_handle05_20_dasm(DASM_PARAMS); break; // illegal |
| 1233 | | case 0x21: size = arcompact_handle05_21_dasm(DASM_PARAMS); break; // illegal |
| 1234 | | case 0x22: size = arcompact_handle05_22_dasm(DASM_PARAMS); break; // illegal |
| 1235 | | case 0x23: size = arcompact_handle05_23_dasm(DASM_PARAMS); break; // illegal |
| 1236 | | case 0x24: size = arcompact_handle05_24_dasm(DASM_PARAMS); break; // illegal |
| 1237 | | case 0x25: size = arcompact_handle05_25_dasm(DASM_PARAMS); break; // illegal |
| 1238 | | case 0x26: size = arcompact_handle05_26_dasm(DASM_PARAMS); break; // illegal |
| 1239 | | case 0x27: size = arcompact_handle05_27_dasm(DASM_PARAMS); break; // illegal |
| 1240 | | case 0x28: size = arcompact_handle05_28_dasm(DASM_PARAMS); break; // ADDSDW |
| 1241 | | case 0x29: size = arcompact_handle05_29_dasm(DASM_PARAMS); break; // SUBSDW |
| 1242 | | case 0x2a: size = arcompact_handle05_2a_dasm(DASM_PARAMS); break; // illegal |
| 1243 | | case 0x2b: size = arcompact_handle05_2b_dasm(DASM_PARAMS); break; // illegal |
| 1244 | | case 0x2c: size = arcompact_handle05_2c_dasm(DASM_PARAMS); break; // illegal |
| 1245 | | case 0x2d: size = arcompact_handle05_2d_dasm(DASM_PARAMS); break; // illegal |
| 1246 | | case 0x2e: size = arcompact_handle05_2e_dasm(DASM_PARAMS); break; // illegal |
| 1247 | | case 0x2f: size = arcompact_handle05_2f_dasm(DASM_PARAMS); break; // SOPs |
| 1248 | | case 0x30: size = arcompact_handle05_30_dasm(DASM_PARAMS); break; // illegal |
| 1249 | | case 0x31: size = arcompact_handle05_31_dasm(DASM_PARAMS); break; // illegal |
| 1250 | | case 0x32: size = arcompact_handle05_32_dasm(DASM_PARAMS); break; // illegal |
| 1251 | | case 0x33: size = arcompact_handle05_33_dasm(DASM_PARAMS); break; // illegal |
| 1252 | | case 0x34: size = arcompact_handle05_34_dasm(DASM_PARAMS); break; // illegal |
| 1253 | | case 0x35: size = arcompact_handle05_35_dasm(DASM_PARAMS); break; // illegal |
| 1254 | | case 0x36: size = arcompact_handle05_36_dasm(DASM_PARAMS); break; // illegal |
| 1255 | | case 0x37: size = arcompact_handle05_37_dasm(DASM_PARAMS); break; // illegal |
| 1256 | | case 0x38: size = arcompact_handle05_38_dasm(DASM_PARAMS); break; // illegal |
| 1257 | | case 0x39: size = arcompact_handle05_39_dasm(DASM_PARAMS); break; // illegal |
| 1258 | | case 0x3a: size = arcompact_handle05_3a_dasm(DASM_PARAMS); break; // illegal |
| 1259 | | case 0x3b: size = arcompact_handle05_3b_dasm(DASM_PARAMS); break; // illegal |
| 1260 | | case 0x3c: size = arcompact_handle05_3c_dasm(DASM_PARAMS); break; // illegal |
| 1261 | | case 0x3d: size = arcompact_handle05_3d_dasm(DASM_PARAMS); break; // illegal |
| 1262 | | case 0x3e: size = arcompact_handle05_3e_dasm(DASM_PARAMS); break; // illegal |
| 1263 | | case 0x3f: size = arcompact_handle05_3f_dasm(DASM_PARAMS); break; // illegal |
| 1264 | | } |
| 1265 | | |
| 1266 | | return size; |
| 1267 | | } |
| 1268 | | |
| 1269 | | int arcompact_handle05_00_dasm(DASM_OPS_32) { print("ASL a <- b asl c (%08x)", op); return 4;} |
| 1270 | | int arcompact_handle05_01_dasm(DASM_OPS_32) { print("LSR a <- b lsr c (%08x)", op); return 4;} |
| 1271 | | int arcompact_handle05_02_dasm(DASM_OPS_32) { print("ASR a <- b asr c (%08x)", op); return 4;} |
| 1272 | | int arcompact_handle05_03_dasm(DASM_OPS_32) { print("ROR a <- b ror c (%08x)", op); return 4;} |
| 1273 | | int arcompact_handle05_04_dasm(DASM_OPS_32) { print("MUL64 mulres <- b * c (%08x)", op); return 4;} |
| 1274 | | int arcompact_handle05_05_dasm(DASM_OPS_32) { print("MULU64 mulres <- b * c (%08x)", op); return 4;} |
| 1275 | | int arcompact_handle05_06_dasm(DASM_OPS_32) { print("ADDS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 1276 | | int arcompact_handle05_07_dasm(DASM_OPS_32) { print("SUBS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 1277 | | int arcompact_handle05_08_dasm(DASM_OPS_32) { print("DIVAW (%08x)", op); return 4;} |
| 1278 | | int arcompact_handle05_09_dasm(DASM_OPS_32) { print("<illegal 0x05_09> (%08x)", op); return 4;} |
| 1279 | | int arcompact_handle05_0a_dasm(DASM_OPS_32) { print("ASLS a <- sat32 (b << c) (%08x)", op); return 4;} |
| 1280 | | int arcompact_handle05_0b_dasm(DASM_OPS_32) { print("ASRS a ,- sat32 (b >> c) (%08x)", op); return 4;} |
| 1281 | | int arcompact_handle05_0c_dasm(DASM_OPS_32) { print("<illegal 0x05_0c> (%08x)", op); return 4;} |
| 1282 | | int arcompact_handle05_0d_dasm(DASM_OPS_32) { print("<illegal 0x05_0d> (%08x)", op); return 4;} |
| 1283 | | int arcompact_handle05_0e_dasm(DASM_OPS_32) { print("<illegal 0x05_0e> (%08x)", op); return 4;} |
| 1284 | | int arcompact_handle05_0f_dasm(DASM_OPS_32) { print("<illegal 0x05_0f> (%08x)", op); return 4;} |
| 1285 | | int arcompact_handle05_10_dasm(DASM_OPS_32) { print("<illegal 0x05_10> (%08x)", op); return 4;} |
| 1286 | | int arcompact_handle05_11_dasm(DASM_OPS_32) { print("<illegal 0x05_11> (%08x)", op); return 4;} |
| 1287 | | int arcompact_handle05_12_dasm(DASM_OPS_32) { print("<illegal 0x05_12> (%08x)", op); return 4;} |
| 1288 | | int arcompact_handle05_13_dasm(DASM_OPS_32) { print("<illegal 0x05_13> (%08x)", op); return 4;} |
| 1289 | | int arcompact_handle05_14_dasm(DASM_OPS_32) { print("<illegal 0x05_14> (%08x)", op); return 4;} |
| 1290 | | int arcompact_handle05_15_dasm(DASM_OPS_32) { print("<illegal 0x05_15> (%08x)", op); return 4;} |
| 1291 | | int arcompact_handle05_16_dasm(DASM_OPS_32) { print("<illegal 0x05_16> (%08x)", op); return 4;} |
| 1292 | | int arcompact_handle05_17_dasm(DASM_OPS_32) { print("<illegal 0x05_17> (%08x)", op); return 4;} |
| 1293 | | int arcompact_handle05_18_dasm(DASM_OPS_32) { print("<illegal 0x05_18> (%08x)", op); return 4;} |
| 1294 | | int arcompact_handle05_19_dasm(DASM_OPS_32) { print("<illegal 0x05_19> (%08x)", op); return 4;} |
| 1295 | | int arcompact_handle05_1a_dasm(DASM_OPS_32) { print("<illegal 0x05_1a> (%08x)", op); return 4;} |
| 1296 | | int arcompact_handle05_1b_dasm(DASM_OPS_32) { print("<illegal 0x05_1b> (%08x)", op); return 4;} |
| 1297 | | int arcompact_handle05_1c_dasm(DASM_OPS_32) { print("<illegal 0x05_1c> (%08x)", op); return 4;} |
| 1298 | | int arcompact_handle05_1d_dasm(DASM_OPS_32) { print("<illegal 0x05_1d> (%08x)", op); return 4;} |
| 1299 | | int arcompact_handle05_1e_dasm(DASM_OPS_32) { print("<illegal 0x05_1e> (%08x)", op); return 4;} |
| 1300 | | int arcompact_handle05_1f_dasm(DASM_OPS_32) { print("<illegal 0x05_1f> (%08x)", op); return 4;} |
| 1301 | | int arcompact_handle05_20_dasm(DASM_OPS_32) { print("<illegal 0x05_20> (%08x)", op); return 4;} |
| 1302 | | int arcompact_handle05_21_dasm(DASM_OPS_32) { print("<illegal 0x05_21> (%08x)", op); return 4;} |
| 1303 | | int arcompact_handle05_22_dasm(DASM_OPS_32) { print("<illegal 0x05_22> (%08x)", op); return 4;} |
| 1304 | | int arcompact_handle05_23_dasm(DASM_OPS_32) { print("<illegal 0x05_23> (%08x)", op); return 4;} |
| 1305 | | int arcompact_handle05_24_dasm(DASM_OPS_32) { print("<illegal 0x05_24> (%08x)", op); return 4;} |
| 1306 | | int arcompact_handle05_25_dasm(DASM_OPS_32) { print("<illegal 0x05_25> (%08x)", op); return 4;} |
| 1307 | | int arcompact_handle05_26_dasm(DASM_OPS_32) { print("<illegal 0x05_26> (%08x)", op); return 4;} |
| 1308 | | int arcompact_handle05_27_dasm(DASM_OPS_32) { print("<illegal 0x05_27> (%08x)", op); return 4;} |
| 1309 | | int arcompact_handle05_28_dasm(DASM_OPS_32) { print("ADDSDW (%08x)", op); return 4;} |
| 1310 | | int arcompact_handle05_29_dasm(DASM_OPS_32) { print("SUBSDW (%08x)", op); return 4;} |
| 1311 | | int arcompact_handle05_2a_dasm(DASM_OPS_32) { print("<illegal 0x05_2a> (%08x)", op); return 4;} |
| 1312 | | int arcompact_handle05_2b_dasm(DASM_OPS_32) { print("<illegal 0x05_2b> (%08x)", op); return 4;} |
| 1313 | | int arcompact_handle05_2c_dasm(DASM_OPS_32) { print("<illegal 0x05_2c> (%08x)", op); return 4;} |
| 1314 | | int arcompact_handle05_2d_dasm(DASM_OPS_32) { print("<illegal 0x05_2d> (%08x)", op); return 4;} |
| 1315 | | int arcompact_handle05_2e_dasm(DASM_OPS_32) { print("<illegal 0x05_2e> (%08x)", op); return 4;} |
| 1316 | | int arcompact_handle05_2f_dasm(DASM_OPS_32) { print("SOP (another table) (%08x)", op); return 4;} |
| 1317 | | int arcompact_handle05_30_dasm(DASM_OPS_32) { print("<illegal 0x05_30> (%08x)", op); return 4;} |
| 1318 | | int arcompact_handle05_31_dasm(DASM_OPS_32) { print("<illegal 0x05_31> (%08x)", op); return 4;} |
| 1319 | | int arcompact_handle05_32_dasm(DASM_OPS_32) { print("<illegal 0x05_32> (%08x)", op); return 4;} |
| 1320 | | int arcompact_handle05_33_dasm(DASM_OPS_32) { print("<illegal 0x05_33> (%08x)", op); return 4;} |
| 1321 | | int arcompact_handle05_34_dasm(DASM_OPS_32) { print("<illegal 0x05_34> (%08x)", op); return 4;} |
| 1322 | | int arcompact_handle05_35_dasm(DASM_OPS_32) { print("<illegal 0x05_35> (%08x)", op); return 4;} |
| 1323 | | int arcompact_handle05_36_dasm(DASM_OPS_32) { print("<illegal 0x05_36> (%08x)", op); return 4;} |
| 1324 | | int arcompact_handle05_37_dasm(DASM_OPS_32) { print("<illegal 0x05_37> (%08x)", op); return 4;} |
| 1325 | | int arcompact_handle05_38_dasm(DASM_OPS_32) { print("<illegal 0x05_38> (%08x)", op); return 4;} |
| 1326 | | int arcompact_handle05_39_dasm(DASM_OPS_32) { print("<illegal 0x05_39> (%08x)", op); return 4;} |
| 1327 | | int arcompact_handle05_3a_dasm(DASM_OPS_32) { print("<illegal 0x05_3a> (%08x)", op); return 4;} |
| 1328 | | int arcompact_handle05_3b_dasm(DASM_OPS_32) { print("<illegal 0x05_3b> (%08x)", op); return 4;} |
| 1329 | | int arcompact_handle05_3c_dasm(DASM_OPS_32) { print("<illegal 0x05_3c> (%08x)", op); return 4;} |
| 1330 | | int arcompact_handle05_3d_dasm(DASM_OPS_32) { print("<illegal 0x05_3d> (%08x)", op); return 4;} |
| 1331 | | int arcompact_handle05_3e_dasm(DASM_OPS_32) { print("<illegal 0x05_3e> (%08x)", op); return 4;} |
| 1332 | | int arcompact_handle05_3f_dasm(DASM_OPS_32) { print("<illegal 0x05_3f> (%08x)", op); return 4;} |
| 1333 | | |
| 1334 | | |
| 1335 | | |
| 1336 | | int arcompact_handle06_dasm(DASM_OPS_32) |
| 1337 | | { |
| 1338 | | print("op a,b,c (06 ARC ext) (%08x)", op ); |
| 1339 | | return 4; |
| 1340 | | } |
| 1341 | | |
| 1342 | | int arcompact_handle07_dasm(DASM_OPS_32) |
| 1343 | | { |
| 1344 | | print("op a,b,c (07 User ext) (%08x)", op ); |
| 1345 | | return 4; |
| 1346 | | } |
| 1347 | | |
| 1348 | | int arcompact_handle08_dasm(DASM_OPS_32) |
| 1349 | | { |
| 1350 | | print("op a,b,c (08 User ext) (%08x)", op ); |
| 1351 | | return 4; |
| 1352 | | } |
| 1353 | | |
| 1354 | | int arcompact_handle09_dasm(DASM_OPS_32) |
| 1355 | | { |
| 1356 | | print("op a,b,c (09 Market ext) (%08x)", op ); |
| 1357 | | return 4; |
| 1358 | | } |
| 1359 | | |
| 1360 | | int arcompact_handle0a_dasm(DASM_OPS_32) |
| 1361 | | { |
| 1362 | | print("op a,b,c (0a Market ext) (%08x)", op ); |
| 1363 | | return 4; |
| 1364 | | } |
| 1365 | | |
| 1366 | | int arcompact_handle0b_dasm(DASM_OPS_32) |
| 1367 | | { |
| 1368 | | print("op a,b,c (0b Market ext) (%08x)", op ); |
| 1369 | | return 4; |
| 1370 | | } |
| 1371 | | |
| 1372 | | |
| 1373 | | |
| 1374 | | |
| 1375 | | int arcompact_handle0c_dasm(DASM_OPS_16) |
| 1376 | | { |
| 1377 | | int size = 2; |
| 1378 | | UINT8 subinstr = (op & 0x0018) >> 3; |
| 1379 | | op &= ~0x0018; |
| 1380 | | |
| 1381 | | switch (subinstr) |
| 1382 | | { |
| 1383 | | case 0x00: size = arcompact_handle0c_00_dasm(DASM_PARAMS); break; // LD_S |
| 1384 | | case 0x01: size = arcompact_handle0c_01_dasm(DASM_PARAMS); break; // LDB_S |
| 1385 | | case 0x02: size = arcompact_handle0c_02_dasm(DASM_PARAMS); break; // LDW_S |
| 1386 | | case 0x03: size = arcompact_handle0c_03_dasm(DASM_PARAMS); break; // ADD_S |
| 1387 | | } |
| 1388 | | return size; |
| 1389 | | } |
| 1390 | | |
| 1391 | | |
| 1392 | | int arcompact_handle0c_00_dasm(DASM_OPS_16) |
| 1393 | | { |
| 1394 | | int size = 2; |
| 1395 | | print("LD_S a <- m[b + c].long (%04x)", op); |
| 1396 | | return size; |
| 1397 | | } |
| 1398 | | |
| 1399 | | int arcompact_handle0c_01_dasm(DASM_OPS_16) |
| 1400 | | { |
| 1401 | | int size = 2; |
| 1402 | | print("LDB_S a <- m[b + c].byte (%04x)", op); |
| 1403 | | return size; |
| 1404 | | } |
| 1405 | | |
| 1406 | | int arcompact_handle0c_02_dasm(DASM_OPS_16) |
| 1407 | | { |
| 1408 | | int size = 2; |
| 1409 | | print("LDW_S a <- m[b + c].word (%04x)", op); |
| 1410 | | return size; |
| 1411 | | } |
| 1412 | | |
| 1413 | | int arcompact_handle0c_03_dasm(DASM_OPS_16) |
| 1414 | | { |
| 1415 | | int size = 2; |
| 1416 | | print("ADD_S a <- b + c (%04x)", op); |
| 1417 | | return size; |
| 1418 | | } |
| 1419 | | |
| 1420 | | |
| 1421 | | int arcompact_handle0d_dasm(DASM_OPS_16) |
| 1422 | | { |
| 1423 | | int size = 2; |
| 1424 | | UINT8 subinstr = (op & 0x0018) >> 3; |
| 1425 | | op &= ~0x0018; |
| 1426 | | |
| 1427 | | switch (subinstr) |
| 1428 | | { |
| 1429 | | case 0x00: size = arcompact_handle0d_00_dasm(DASM_PARAMS); break; // ADD_S |
| 1430 | | case 0x01: size = arcompact_handle0d_01_dasm(DASM_PARAMS); break; // SUB_S |
| 1431 | | case 0x02: size = arcompact_handle0d_02_dasm(DASM_PARAMS); break; // ASL_S |
| 1432 | | case 0x03: size = arcompact_handle0d_03_dasm(DASM_PARAMS); break; // ASR_S |
| 1433 | | } |
| 1434 | | return size; |
| 1435 | | } |
| 1436 | | |
| 1437 | | int arcompact_handle0d_00_dasm(DASM_OPS_16) |
| 1438 | | { |
| 1439 | | int size = 2; |
| 1440 | | print("ADD_S c <- b + u3 (%04x)", op); |
| 1441 | | return size; |
| 1442 | | } |
| 1443 | | |
| 1444 | | int arcompact_handle0d_01_dasm(DASM_OPS_16) |
| 1445 | | { |
| 1446 | | int size = 2; |
| 1447 | | print("SUB_S c <- b - u3 (%04x)", op); |
| 1448 | | return size; |
| 1449 | | } |
| 1450 | | |
| 1451 | | int arcompact_handle0d_02_dasm(DASM_OPS_16) |
| 1452 | | { |
| 1453 | | int size = 2; |
| 1454 | | print("ASL_S c <- b asl u3 (%04x)", op); |
| 1455 | | return size; |
| 1456 | | } |
| 1457 | | |
| 1458 | | int arcompact_handle0d_03_dasm(DASM_OPS_16) |
| 1459 | | { |
| 1460 | | int size = 2; |
| 1461 | | print("ASL_S c <- b asr u3 (%04x)", op); |
| 1462 | | return size; |
| 1463 | | } |
| 1464 | | |
| 1465 | | |
| 1466 | | int arcompact_handle0e_dasm(DASM_OPS_16) |
| 1467 | | { |
| 1468 | | int size = 2; |
| 1469 | | UINT8 subinstr = (op & 0x0018) >> 3; |
| 1470 | | op &= ~0x0018; |
| 1471 | | |
| 1472 | | switch (subinstr) |
| 1473 | | { |
| 1474 | | case 0x00: size = arcompact_handle0e_00_dasm(DASM_PARAMS); break; // ADD_S |
| 1475 | | case 0x01: size = arcompact_handle0e_01_dasm(DASM_PARAMS); break; // MOV_S |
| 1476 | | case 0x02: size = arcompact_handle0e_02_dasm(DASM_PARAMS); break; // CMP_S |
| 1477 | | case 0x03: size = arcompact_handle0e_03_dasm(DASM_PARAMS); break; // MOV_S |
| 1478 | | } |
| 1479 | | return size; |
| 1480 | | } |
| 1481 | | |
| 1482 | | |
| 1483 | | |
| 1484 | | |
| 1485 | | #define GROUP_0e_GET_h \ |
| 1486 | | h = ((op & 0x0007) << 3); \ |
| 1487 | | h |= ((op & 0x00e0) >> 5); \ |
| 1488 | | |
| 1489 | | // this is as messed up as the rest of the 16-bit alignment in LE mode... |
| 1490 | | |
| 1491 | | #define GET_LIMM \ |
| 1492 | | limm = oprom[4] | (oprom[5] << 8); \ |
| 1493 | | limm |= (oprom[2] << 16) | (oprom[3] << 24); \ |
| 1494 | | |
| 1495 | | |
| 1496 | | int arcompact_handle0e_00_dasm(DASM_OPS_16) |
| 1497 | | { |
| 1498 | | int h; |
| 1499 | | int size = 2; |
| 1500 | | |
| 1501 | | GROUP_0e_GET_h; |
| 1502 | | |
| 1503 | | if (h == LIMM_REG) |
| 1504 | | { |
| 1505 | | UINT32 limm; |
| 1506 | | GET_LIMM; |
| 1507 | | size = 6; |
| 1508 | | print("ADD_S b <- b + (%08x) (%04x)", limm, op); |
| 1509 | | } |
| 1510 | | else |
| 1511 | | { |
| 1512 | | |
| 1513 | | print("ADD_S b <- b + (r%d) (%04x)", h, op); |
| 1514 | | } |
| 1515 | | |
| 1516 | | return size; |
| 1517 | | } |
| 1518 | | |
| 1519 | | int arcompact_handle0e_01_dasm(DASM_OPS_16) |
| 1520 | | { |
| 1521 | | int h; |
| 1522 | | int size = 2; |
| 1523 | | GROUP_0e_GET_h; |
| 1524 | | |
| 1525 | | if (h == LIMM_REG) |
| 1526 | | { |
| 1527 | | UINT32 limm; |
| 1528 | | GET_LIMM; |
| 1529 | | size = 6; |
| 1530 | | print("MOV_S b <- (%08x) (%04x)", limm, op); |
| 1531 | | } |
| 1532 | | else |
| 1533 | | { |
| 1534 | | print("MOV_S b <- (r%d) (%04x)", h, op); |
| 1535 | | } |
| 1536 | | return size; |
| 1537 | | } |
| 1538 | | |
| 1539 | | int arcompact_handle0e_02_dasm(DASM_OPS_16) |
| 1540 | | { |
| 1541 | | int h; |
| 1542 | | int size = 2; |
| 1543 | | GROUP_0e_GET_h; |
| 1544 | | |
| 1545 | | if (h == LIMM_REG) |
| 1546 | | { |
| 1547 | | UINT32 limm; |
| 1548 | | GET_LIMM; |
| 1549 | | size = 6; |
| 1550 | | print("CMP_S b - (%08x) (%04x)", limm, op); |
| 1551 | | } |
| 1552 | | else |
| 1553 | | { |
| 1554 | | print("CMP_S b - (r%d) (%04x)", h, op); |
| 1555 | | } |
| 1556 | | return size; |
| 1557 | | } |
| 1558 | | |
| 1559 | | int arcompact_handle0e_03_dasm(DASM_OPS_16) |
| 1560 | | { |
| 1561 | | int h; |
| 1562 | | int size = 2; |
| 1563 | | GROUP_0e_GET_h; |
| 1564 | | |
| 1565 | | if (h == LIMM_REG) |
| 1566 | | { |
| 1567 | | UINT32 limm; |
| 1568 | | GET_LIMM; |
| 1569 | | size = 6; |
| 1570 | | print("MOV_S (%08x) <- b (%04x)", limm, op); |
| 1571 | | } |
| 1572 | | else |
| 1573 | | { |
| 1574 | | print("MOV_S (r%d) <- b (%04x)", h, op); |
| 1575 | | } |
| 1576 | | |
| 1577 | | return size; |
| 1578 | | } |
| 1579 | | |
| 1580 | | |
| 1581 | | |
| 1582 | | int arcompact_handle0f_dasm(DASM_OPS_16) |
| 1583 | | { |
| 1584 | | // General Register Instructions (16-bit) |
| 1585 | | // 01111 bbb ccc iiiii |
| 1586 | | UINT8 subinstr = (op & 0x01f) >> 0; |
| 1587 | | //print("%s (%04x)", table0f[subinstr], op & ~0xf81f); |
| 1588 | | |
| 1589 | | switch (subinstr) |
| 1590 | | { |
| 1591 | | |
| 1592 | | default: |
| 1593 | | print("%s (%04x)", table0f[subinstr], op & ~0xf81f); |
| 1594 | | break; |
| 1595 | | |
| 1596 | | case 0x00: |
| 1597 | | { |
| 1598 | | // General Operations w/ Register |
| 1599 | | // 01111 bbb iii 00000 |
| 1600 | | UINT8 subinstr2 = (op & 0x00e0) >> 5; |
| 1601 | | |
| 1602 | | switch (subinstr2) |
| 1603 | | { |
| 1604 | | default: |
| 1605 | | print("%s (%04x)", table0f_00[subinstr2], op & ~0xf8ff); |
| 1606 | | return 2; |
| 1607 | | |
| 1608 | | case 0x7: |
| 1609 | | { |
| 1610 | | // General Operations w/o Register |
| 1611 | | // 01111 iii 111 00000 |
| 1612 | | UINT8 subinstr3 = (op & 0x0700) >> 8; |
| 1613 | | |
| 1614 | | print("%s (%04x)", table0f_00_07[subinstr3], op & ~0xffff); |
| 1615 | | |
| 1616 | | return 2; |
| 1617 | | } |
| 1618 | | } |
| 1619 | | } |
| 1620 | | } |
| 1621 | | |
| 1622 | | return 2; |
| 1623 | | } |
| 1624 | | |
| 1625 | | int arcompact_handle10_dasm(DASM_OPS_16) |
| 1626 | | { |
| 1627 | | print("LD_S (%04x)", op); |
| 1628 | | return 2; |
| 1629 | | } |
| 1630 | | |
| 1631 | | int arcompact_handle11_dasm(DASM_OPS_16) |
| 1632 | | { |
| 1633 | | print("LDB_S (%04x)", op); |
| 1634 | | return 2; |
| 1635 | | } |
| 1636 | | |
| 1637 | | int arcompact_handle12_dasm(DASM_OPS_16) |
| 1638 | | { |
| 1639 | | print("LDW_S (%04x)", op); |
| 1640 | | return 2; |
| 1641 | | } |
| 1642 | | |
| 1643 | | int arcompact_handle13_dasm(DASM_OPS_16) |
| 1644 | | { |
| 1645 | | print("LSW_S.X (%04x)", op); |
| 1646 | | return 2; |
| 1647 | | } |
| 1648 | | |
| 1649 | | int arcompact_handle14_dasm(DASM_OPS_16) |
| 1650 | | { |
| 1651 | | print("ST_S (%04x)", op); |
| 1652 | | return 2; |
| 1653 | | } |
| 1654 | | |
| 1655 | | int arcompact_handle15_dasm(DASM_OPS_16) |
| 1656 | | { |
| 1657 | | print("STB_S (%04x)", op); |
| 1658 | | return 2; |
| 1659 | | } |
| 1660 | | |
| 1661 | | int arcompact_handle16_dasm(DASM_OPS_16) |
| 1662 | | { |
| 1663 | | print("STW_S (%04x)", op); |
| 1664 | | return 2; |
| 1665 | | } |
| 1666 | | |
| 1667 | | int arcompact_handle17_dasm(DASM_OPS_16) |
| 1668 | | { |
| 1669 | | int size = 2; |
| 1670 | | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 1671 | | op &= ~0x00e0; |
| 1672 | | |
| 1673 | | switch (subinstr) |
| 1674 | | { |
| 1675 | | case 0x00: size = arcompact_handle17_00_dasm(DASM_PARAMS); break; // ASL_S |
| 1676 | | case 0x01: size = arcompact_handle17_01_dasm(DASM_PARAMS); break; // LSR_S |
| 1677 | | case 0x02: size = arcompact_handle17_02_dasm(DASM_PARAMS); break; // ASR_S |
| 1678 | | case 0x03: size = arcompact_handle17_03_dasm(DASM_PARAMS); break; // SUB_S |
| 1679 | | case 0x04: size = arcompact_handle17_04_dasm(DASM_PARAMS); break; // BSET_S |
| 1680 | | case 0x05: size = arcompact_handle17_05_dasm(DASM_PARAMS); break; // BCLR_S |
| 1681 | | case 0x06: size = arcompact_handle17_06_dasm(DASM_PARAMS); break; // BMSK_S |
| 1682 | | case 0x07: size = arcompact_handle17_07_dasm(DASM_PARAMS); break; // BTST_S |
| 1683 | | } |
| 1684 | | |
| 1685 | | return size; |
| 1686 | | } |
| 1687 | | |
| 1688 | | int arcompact_handle17_00_dasm(DASM_OPS_16) |
| 1689 | | { |
| 1690 | | int size = 2; |
| 1691 | | print("ASL_S b <- b asl u5 (%04x)", op); |
| 1692 | | return size; |
| 1693 | | } |
| 1694 | | |
| 1695 | | int arcompact_handle17_01_dasm(DASM_OPS_16) |
| 1696 | | { |
| 1697 | | int size = 2; |
| 1698 | | print("LSR_S b <- b lsr u5 (%04x)", op); |
| 1699 | | return size; |
| 1700 | | } |
| 1701 | | |
| 1702 | | int arcompact_handle17_02_dasm(DASM_OPS_16) |
| 1703 | | { |
| 1704 | | int size = 2; |
| 1705 | | print("ASR_S b <- b asr u5 (%04x)", op); |
| 1706 | | return size; |
| 1707 | | } |
| 1708 | | |
| 1709 | | int arcompact_handle17_03_dasm(DASM_OPS_16) |
| 1710 | | { |
| 1711 | | int size = 2; |
| 1712 | | print("SUB_S b <- b - u5 (%04x)", op); |
| 1713 | | return size; |
| 1714 | | } |
| 1715 | | |
| 1716 | | int arcompact_handle17_04_dasm(DASM_OPS_16) |
| 1717 | | { |
| 1718 | | int size = 2; |
| 1719 | | print("BSET_S b <- b | (1 << u5) (%04x)", op); |
| 1720 | | return size; |
| 1721 | | } |
| 1722 | | |
| 1723 | | int arcompact_handle17_05_dasm(DASM_OPS_16) |
| 1724 | | { |
| 1725 | | int size = 2; |
| 1726 | | print("BCLR_S b <- b & !(1 << u5) (%04x)", op); |
| 1727 | | return size; |
| 1728 | | } |
| 1729 | | |
| 1730 | | int arcompact_handle17_06_dasm(DASM_OPS_16) |
| 1731 | | { |
| 1732 | | int size = 2; |
| 1733 | | print("BMSK_S (%04x)", op); |
| 1734 | | return size; |
| 1735 | | } |
| 1736 | | |
| 1737 | | int arcompact_handle17_07_dasm(DASM_OPS_16) |
| 1738 | | { |
| 1739 | | int size = 2; |
| 1740 | | print("BTST_S (%04x)", op); |
| 1741 | | return size; |
| 1742 | | } |
| 1743 | | |
| 1744 | | int arcompact_handle18_dasm(DASM_OPS_16) |
| 1745 | | { |
| 1746 | | int size = 2; |
| 1747 | | // Stack Pointer Based Instructions (16-bit) |
| 1748 | | // 11000 bbb iii uuuuu |
| 1749 | | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 1750 | | op &= ~0x00e0; |
| 1751 | | |
| 1752 | | switch (subinstr) |
| 1753 | | { |
| 1754 | | case 0x00: size = arcompact_handle18_00_dasm(DASM_PARAMS); break; // LD_S (SP) |
| 1755 | | case 0x01: size = arcompact_handle18_01_dasm(DASM_PARAMS); break; // LDB_S (SP) |
| 1756 | | case 0x02: size = arcompact_handle18_02_dasm(DASM_PARAMS); break; // ST_S (SP) |
| 1757 | | case 0x03: size = arcompact_handle18_03_dasm(DASM_PARAMS); break; // STB_S (SP) |
| 1758 | | case 0x04: size = arcompact_handle18_04_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 1759 | | case 0x05: size = arcompact_handle18_05_dasm(DASM_PARAMS); break; // subtable 18_05 |
| 1760 | | case 0x06: size = arcompact_handle18_06_dasm(DASM_PARAMS); break; // subtable 18_06 |
| 1761 | | case 0x07: size = arcompact_handle18_07_dasm(DASM_PARAMS); break; // subtable 18_07 |
| 1762 | | } |
| 1763 | | |
| 1764 | | return size; |
| 1765 | | } |
| 1766 | | |
| 1767 | | // op bits remaining for 0x18_xx subgroups 0x071f |
| 1768 | | |
| 1769 | | int arcompact_handle18_00_dasm(DASM_OPS_16) |
| 1770 | | { |
| 1771 | | print("LD_S (SP) (%04x)", op); |
| 1772 | | return 2; |
| 1773 | | } |
| 1774 | | |
| 1775 | | int arcompact_handle18_01_dasm(DASM_OPS_16) |
| 1776 | | { |
| 1777 | | print("LDB_S (SP) (%04x)", op); |
| 1778 | | return 2; |
| 1779 | | } |
| 1780 | | |
| 1781 | | int arcompact_handle18_02_dasm(DASM_OPS_16) |
| 1782 | | { |
| 1783 | | print("ST_S (SP) (%04x)", op); |
| 1784 | | return 2; |
| 1785 | | } |
| 1786 | | |
| 1787 | | int arcompact_handle18_03_dasm(DASM_OPS_16) |
| 1788 | | { |
| 1789 | | print("STB_S (SP) (%04x)", op); |
| 1790 | | return 2; |
| 1791 | | } |
| 1792 | | |
| 1793 | | int arcompact_handle18_04_dasm(DASM_OPS_16) |
| 1794 | | { |
| 1795 | | print("ADD_S (SP) (%04x)", op); |
| 1796 | | return 2; |
| 1797 | | } |
| 1798 | | |
| 1799 | | |
| 1800 | | |
| 1801 | | |
| 1802 | | |
| 1803 | | int arcompact_handle18_05_dasm(DASM_OPS_16) |
| 1804 | | { |
| 1805 | | int size = 2; |
| 1806 | | UINT8 subinstr2 = (op & 0x0700) >> 8; |
| 1807 | | op &= ~0x001f; |
| 1808 | | |
| 1809 | | switch (subinstr2) |
| 1810 | | { |
| 1811 | | case 0x00: size = arcompact_handle18_05_00_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 1812 | | case 0x01: size = arcompact_handle18_05_01_dasm(DASM_PARAMS); break; // SUB_S (SP) |
| 1813 | | case 0x02: size = arcompact_handle18_05_02_dasm(DASM_PARAMS); break; // <illegal 0x18_05_02> |
| 1814 | | case 0x03: size = arcompact_handle18_05_03_dasm(DASM_PARAMS); break; // <illegal 0x18_05_03> |
| 1815 | | case 0x04: size = arcompact_handle18_05_04_dasm(DASM_PARAMS); break; // <illegal 0x18_05_04> |
| 1816 | | case 0x05: size = arcompact_handle18_05_05_dasm(DASM_PARAMS); break; // <illegal 0x18_05_05> |
| 1817 | | case 0x06: size = arcompact_handle18_05_06_dasm(DASM_PARAMS); break; // <illegal 0x18_05_06> |
| 1818 | | case 0x07: size = arcompact_handle18_05_07_dasm(DASM_PARAMS); break; // <illegal 0x18_05_07> |
| 1819 | | } |
| 1820 | | |
| 1821 | | return size; |
| 1822 | | } |
| 1823 | | // op bits remaining for 0x18_05_xx subgroups 0x001f |
| 1824 | | int arcompact_handle18_05_00_dasm(DASM_OPS_16) |
| 1825 | | { |
| 1826 | | int u = op & 0x001f; |
| 1827 | | op &= ~0x001f; // all bits now used |
| 1828 | | |
| 1829 | | print("ADD_S %02x (SP)", u); |
| 1830 | | return 2; |
| 1831 | | |
| 1832 | | } |
| 1833 | | |
| 1834 | | int arcompact_handle18_05_01_dasm(DASM_OPS_16) |
| 1835 | | { |
| 1836 | | int u = op & 0x001f; |
| 1837 | | op &= ~0x001f; // all bits now used |
| 1838 | | |
| 1839 | | print("SUB_S %02x (SP)", u); |
| 1840 | | return 2; |
| 1841 | | } |
| 1842 | | |
| 1843 | | |
| 1844 | | int arcompact_handle18_05_02_dasm(DASM_OPS_16) { print("<illegal 0x18_05_02> (%04x)", op); return 2;} |
| 1845 | | int arcompact_handle18_05_03_dasm(DASM_OPS_16) { print("<illegal 0x18_05_03> (%04x)", op); return 2;} |
| 1846 | | int arcompact_handle18_05_04_dasm(DASM_OPS_16) { print("<illegal 0x18_05_04> (%04x)", op); return 2;} |
| 1847 | | int arcompact_handle18_05_05_dasm(DASM_OPS_16) { print("<illegal 0x18_05_05> (%04x)", op); return 2;} |
| 1848 | | int arcompact_handle18_05_06_dasm(DASM_OPS_16) { print("<illegal 0x18_05_06> (%04x)", op); return 2;} |
| 1849 | | int arcompact_handle18_05_07_dasm(DASM_OPS_16) { print("<illegal 0x18_05_07> (%04x)", op); return 2;} |
| 1850 | | |
| 1851 | | |
| 1852 | | int arcompact_handle18_06_dasm(DASM_OPS_16) |
| 1853 | | { |
| 1854 | | int size = 2; |
| 1855 | | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 1856 | | op &= ~0x001f; |
| 1857 | | |
| 1858 | | switch (subinstr2) |
| 1859 | | { |
| 1860 | | case 0x00: size = arcompact_handle18_06_00_dasm(DASM_PARAMS); break; // <illegal 0x18_06_00> |
| 1861 | | case 0x01: size = arcompact_handle18_06_01_dasm(DASM_PARAMS); break; // POP_S b |
| 1862 | | case 0x02: size = arcompact_handle18_06_02_dasm(DASM_PARAMS); break; // <illegal 0x18_06_02> |
| 1863 | | case 0x03: size = arcompact_handle18_06_03_dasm(DASM_PARAMS); break; // <illegal 0x18_06_03> |
| 1864 | | case 0x04: size = arcompact_handle18_06_04_dasm(DASM_PARAMS); break; // <illegal 0x18_06_04> |
| 1865 | | case 0x05: size = arcompact_handle18_06_05_dasm(DASM_PARAMS); break; // <illegal 0x18_06_05> |
| 1866 | | case 0x06: size = arcompact_handle18_06_06_dasm(DASM_PARAMS); break; // <illegal 0x18_06_06> |
| 1867 | | case 0x07: size = arcompact_handle18_06_07_dasm(DASM_PARAMS); break; // <illegal 0x18_06_07> |
| 1868 | | case 0x08: size = arcompact_handle18_06_08_dasm(DASM_PARAMS); break; // <illegal 0x18_06_08> |
| 1869 | | case 0x09: size = arcompact_handle18_06_09_dasm(DASM_PARAMS); break; // <illegal 0x18_06_09> |
| 1870 | | case 0x0a: size = arcompact_handle18_06_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0a> |
| 1871 | | case 0x0b: size = arcompact_handle18_06_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0b> |
| 1872 | | case 0x0c: size = arcompact_handle18_06_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0c> |
| 1873 | | case 0x0d: size = arcompact_handle18_06_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0d> |
| 1874 | | case 0x0e: size = arcompact_handle18_06_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0e> |
| 1875 | | case 0x0f: size = arcompact_handle18_06_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0f> |
| 1876 | | case 0x10: size = arcompact_handle18_06_10_dasm(DASM_PARAMS); break; // <illegal 0x18_06_10> |
| 1877 | | case 0x11: size = arcompact_handle18_06_11_dasm(DASM_PARAMS); break; // POP_S blink |
| 1878 | | case 0x12: size = arcompact_handle18_06_12_dasm(DASM_PARAMS); break; // <illegal 0x18_06_12> |
| 1879 | | case 0x13: size = arcompact_handle18_06_13_dasm(DASM_PARAMS); break; // <illegal 0x18_06_13> |
| 1880 | | case 0x14: size = arcompact_handle18_06_14_dasm(DASM_PARAMS); break; // <illegal 0x18_06_14> |
| 1881 | | case 0x15: size = arcompact_handle18_06_15_dasm(DASM_PARAMS); break; // <illegal 0x18_06_15> |
| 1882 | | case 0x16: size = arcompact_handle18_06_16_dasm(DASM_PARAMS); break; // <illegal 0x18_06_16> |
| 1883 | | case 0x17: size = arcompact_handle18_06_17_dasm(DASM_PARAMS); break; // <illegal 0x18_06_17> |
| 1884 | | case 0x18: size = arcompact_handle18_06_18_dasm(DASM_PARAMS); break; // <illegal 0x18_06_18> |
| 1885 | | case 0x19: size = arcompact_handle18_06_19_dasm(DASM_PARAMS); break; // <illegal 0x18_06_19> |
| 1886 | | case 0x1a: size = arcompact_handle18_06_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1a> |
| 1887 | | case 0x1b: size = arcompact_handle18_06_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1b> |
| 1888 | | case 0x1c: size = arcompact_handle18_06_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1c> |
| 1889 | | case 0x1d: size = arcompact_handle18_06_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1d> |
| 1890 | | case 0x1e: size = arcompact_handle18_06_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1e> |
| 1891 | | case 0x1f: size = arcompact_handle18_06_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1f> |
| 1892 | | } |
| 1893 | | |
| 1894 | | return size; |
| 1895 | | } |
| 1896 | | |
| 1897 | | |
| 1898 | | // op bits remaining for 0x18_06_xx subgroups 0x0700 |
| 1899 | | int arcompact_handle18_06_00_dasm(DASM_OPS_16) { print("<illegal 0x18_06_00> (%04x)", op); return 2;} |
| 1900 | | |
| 1901 | | int arcompact_handle18_06_01_dasm(DASM_OPS_16) |
| 1902 | | { |
| 1903 | | int b = (op & 0x0700) >> 8; |
| 1904 | | op &= ~0x0700; // all bits now used |
| 1905 | | |
| 1906 | | print("POP_S [%02x]", b); |
| 1907 | | |
| 1908 | | return 2; |
| 1909 | | } |
| 1910 | | |
| 1911 | | int arcompact_handle18_06_02_dasm(DASM_OPS_16) { print("<illegal 0x18_06_02> (%04x)", op); return 2;} |
| 1912 | | int arcompact_handle18_06_03_dasm(DASM_OPS_16) { print("<illegal 0x18_06_03> (%04x)", op); return 2;} |
| 1913 | | int arcompact_handle18_06_04_dasm(DASM_OPS_16) { print("<illegal 0x18_06_04> (%04x)", op); return 2;} |
| 1914 | | int arcompact_handle18_06_05_dasm(DASM_OPS_16) { print("<illegal 0x18_06_05> (%04x)", op); return 2;} |
| 1915 | | int arcompact_handle18_06_06_dasm(DASM_OPS_16) { print("<illegal 0x18_06_06> (%04x)", op); return 2;} |
| 1916 | | int arcompact_handle18_06_07_dasm(DASM_OPS_16) { print("<illegal 0x18_06_07> (%04x)", op); return 2;} |
| 1917 | | int arcompact_handle18_06_08_dasm(DASM_OPS_16) { print("<illegal 0x18_06_08> (%04x)", op); return 2;} |
| 1918 | | int arcompact_handle18_06_09_dasm(DASM_OPS_16) { print("<illegal 0x18_06_09> (%04x)", op); return 2;} |
| 1919 | | int arcompact_handle18_06_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0a> (%04x)", op); return 2;} |
| 1920 | | int arcompact_handle18_06_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0b> (%04x)", op); return 2;} |
| 1921 | | int arcompact_handle18_06_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0c> (%04x)", op); return 2;} |
| 1922 | | int arcompact_handle18_06_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0d> (%04x)", op); return 2;} |
| 1923 | | int arcompact_handle18_06_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0e> (%04x)", op); return 2;} |
| 1924 | | int arcompact_handle18_06_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0f> (%04x)", op); return 2;} |
| 1925 | | int arcompact_handle18_06_10_dasm(DASM_OPS_16) { print("<illegal 0x18_06_10> (%04x)", op); return 2;} |
| 1926 | | |
| 1927 | | int arcompact_handle18_06_11_dasm(DASM_OPS_16) |
| 1928 | | { |
| 1929 | | int res = (op & 0x0700) >> 8; |
| 1930 | | op &= ~0x0700; // all bits now used |
| 1931 | | |
| 1932 | | if (res) |
| 1933 | | print("POP_S [BLINK] (Reserved Bits set %04x)", op); |
| 1934 | | else |
| 1935 | | print("POP_S [BLINK]"); |
| 1936 | | |
| 1937 | | return 2; |
| 1938 | | } |
| 1939 | | |
| 1940 | | int arcompact_handle18_06_12_dasm(DASM_OPS_16) { print("<illegal 0x18_06_12> (%04x)", op); return 2;} |
| 1941 | | int arcompact_handle18_06_13_dasm(DASM_OPS_16) { print("<illegal 0x18_06_13> (%04x)", op); return 2;} |
| 1942 | | int arcompact_handle18_06_14_dasm(DASM_OPS_16) { print("<illegal 0x18_06_14> (%04x)", op); return 2;} |
| 1943 | | int arcompact_handle18_06_15_dasm(DASM_OPS_16) { print("<illegal 0x18_06_15> (%04x)", op); return 2;} |
| 1944 | | int arcompact_handle18_06_16_dasm(DASM_OPS_16) { print("<illegal 0x18_06_16> (%04x)", op); return 2;} |
| 1945 | | int arcompact_handle18_06_17_dasm(DASM_OPS_16) { print("<illegal 0x18_06_17> (%04x)", op); return 2;} |
| 1946 | | int arcompact_handle18_06_18_dasm(DASM_OPS_16) { print("<illegal 0x18_06_18> (%04x)", op); return 2;} |
| 1947 | | int arcompact_handle18_06_19_dasm(DASM_OPS_16) { print("<illegal 0x18_06_19> (%04x)", op); return 2;} |
| 1948 | | int arcompact_handle18_06_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1a> (%04x)", op); return 2;} |
| 1949 | | int arcompact_handle18_06_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1b> (%04x)", op); return 2;} |
| 1950 | | int arcompact_handle18_06_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1c> (%04x)", op); return 2;} |
| 1951 | | int arcompact_handle18_06_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1d> (%04x)", op); return 2;} |
| 1952 | | int arcompact_handle18_06_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1e> (%04x)", op); return 2;} |
| 1953 | | int arcompact_handle18_06_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1f> (%04x)", op); return 2;} |
| 1954 | | |
| 1955 | | |
| 1956 | | |
| 1957 | | |
| 1958 | | int arcompact_handle18_07_dasm(DASM_OPS_16) |
| 1959 | | { |
| 1960 | | int size = 2; |
| 1961 | | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 1962 | | op &= ~0x001f; |
| 1963 | | |
| 1964 | | switch (subinstr2) |
| 1965 | | { |
| 1966 | | case 0x00: size = arcompact_handle18_07_00_dasm(DASM_PARAMS); break; // <illegal 0x18_07_00> |
| 1967 | | case 0x01: size = arcompact_handle18_07_01_dasm(DASM_PARAMS); break; // PUSH_S b |
| 1968 | | case 0x02: size = arcompact_handle18_07_02_dasm(DASM_PARAMS); break; // <illegal 0x18_07_02> |
| 1969 | | case 0x03: size = arcompact_handle18_07_03_dasm(DASM_PARAMS); break; // <illegal 0x18_07_03> |
| 1970 | | case 0x04: size = arcompact_handle18_07_04_dasm(DASM_PARAMS); break; // <illegal 0x18_07_04> |
| 1971 | | case 0x05: size = arcompact_handle18_07_05_dasm(DASM_PARAMS); break; // <illegal 0x18_07_05> |
| 1972 | | case 0x06: size = arcompact_handle18_07_06_dasm(DASM_PARAMS); break; // <illegal 0x18_07_06> |
| 1973 | | case 0x07: size = arcompact_handle18_07_07_dasm(DASM_PARAMS); break; // <illegal 0x18_07_07> |
| 1974 | | case 0x08: size = arcompact_handle18_07_08_dasm(DASM_PARAMS); break; // <illegal 0x18_07_08> |
| 1975 | | case 0x09: size = arcompact_handle18_07_09_dasm(DASM_PARAMS); break; // <illegal 0x18_07_09> |
| 1976 | | case 0x0a: size = arcompact_handle18_07_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0a> |
| 1977 | | case 0x0b: size = arcompact_handle18_07_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0b> |
| 1978 | | case 0x0c: size = arcompact_handle18_07_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0c> |
| 1979 | | case 0x0d: size = arcompact_handle18_07_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0d> |
| 1980 | | case 0x0e: size = arcompact_handle18_07_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0e> |
| 1981 | | case 0x0f: size = arcompact_handle18_07_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0f> |
| 1982 | | case 0x10: size = arcompact_handle18_07_10_dasm(DASM_PARAMS); break; // <illegal 0x18_07_10> |
| 1983 | | case 0x11: size = arcompact_handle18_07_11_dasm(DASM_PARAMS); break; // PUSH_S blink |
| 1984 | | case 0x12: size = arcompact_handle18_07_12_dasm(DASM_PARAMS); break; // <illegal 0x18_07_12> |
| 1985 | | case 0x13: size = arcompact_handle18_07_13_dasm(DASM_PARAMS); break; // <illegal 0x18_07_13> |
| 1986 | | case 0x14: size = arcompact_handle18_07_14_dasm(DASM_PARAMS); break; // <illegal 0x18_07_14> |
| 1987 | | case 0x15: size = arcompact_handle18_07_15_dasm(DASM_PARAMS); break; // <illegal 0x18_07_15> |
| 1988 | | case 0x16: size = arcompact_handle18_07_16_dasm(DASM_PARAMS); break; // <illegal 0x18_07_16> |
| 1989 | | case 0x17: size = arcompact_handle18_07_17_dasm(DASM_PARAMS); break; // <illegal 0x18_07_17> |
| 1990 | | case 0x18: size = arcompact_handle18_07_18_dasm(DASM_PARAMS); break; // <illegal 0x18_07_18> |
| 1991 | | case 0x19: size = arcompact_handle18_07_19_dasm(DASM_PARAMS); break; // <illegal 0x18_07_19> |
| 1992 | | case 0x1a: size = arcompact_handle18_07_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1a> |
| 1993 | | case 0x1b: size = arcompact_handle18_07_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1b> |
| 1994 | | case 0x1c: size = arcompact_handle18_07_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1c> |
| 1995 | | case 0x1d: size = arcompact_handle18_07_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1d> |
| 1996 | | case 0x1e: size = arcompact_handle18_07_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1e> |
| 1997 | | case 0x1f: size = arcompact_handle18_07_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1f> |
| 1998 | | } |
| 1999 | | |
| 2000 | | return size; |
| 2001 | | } |
| 2002 | | |
| 2003 | | |
| 2004 | | // op bits remaining for 0x18_07_xx subgroups 0x0700 |
| 2005 | | int arcompact_handle18_07_00_dasm(DASM_OPS_16) { print("<illegal 0x18_07_00> (%04x)", op); return 2;} |
| 2006 | | |
| 2007 | | int arcompact_handle18_07_01_dasm(DASM_OPS_16) |
| 2008 | | { |
| 2009 | | int b = (op & 0x0700) >> 8; |
| 2010 | | op &= ~0x0700; // all bits now used |
| 2011 | | |
| 2012 | | print("PUSH_S [%02x]", b); |
| 2013 | | |
| 2014 | | return 2; |
| 2015 | | } |
| 2016 | | |
| 2017 | | int arcompact_handle18_07_02_dasm(DASM_OPS_16) { print("<illegal 0x18_07_02> (%04x)", op); return 2;} |
| 2018 | | int arcompact_handle18_07_03_dasm(DASM_OPS_16) { print("<illegal 0x18_07_03> (%04x)", op); return 2;} |
| 2019 | | int arcompact_handle18_07_04_dasm(DASM_OPS_16) { print("<illegal 0x18_07_04> (%04x)", op); return 2;} |
| 2020 | | int arcompact_handle18_07_05_dasm(DASM_OPS_16) { print("<illegal 0x18_07_05> (%04x)", op); return 2;} |
| 2021 | | int arcompact_handle18_07_06_dasm(DASM_OPS_16) { print("<illegal 0x18_07_06> (%04x)", op); return 2;} |
| 2022 | | int arcompact_handle18_07_07_dasm(DASM_OPS_16) { print("<illegal 0x18_07_07> (%04x)", op); return 2;} |
| 2023 | | int arcompact_handle18_07_08_dasm(DASM_OPS_16) { print("<illegal 0x18_07_08> (%04x)", op); return 2;} |
| 2024 | | int arcompact_handle18_07_09_dasm(DASM_OPS_16) { print("<illegal 0x18_07_09> (%04x)", op); return 2;} |
| 2025 | | int arcompact_handle18_07_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0a> (%04x)", op); return 2;} |
| 2026 | | int arcompact_handle18_07_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0b> (%04x)", op); return 2;} |
| 2027 | | int arcompact_handle18_07_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0c> (%04x)", op); return 2;} |
| 2028 | | int arcompact_handle18_07_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0d> (%04x)", op); return 2;} |
| 2029 | | int arcompact_handle18_07_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0e> (%04x)", op); return 2;} |
| 2030 | | int arcompact_handle18_07_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0f> (%04x)", op); return 2;} |
| 2031 | | int arcompact_handle18_07_10_dasm(DASM_OPS_16) { print("<illegal 0x18_07_10> (%04x)", op); return 2;} |
| 2032 | | |
| 2033 | | int arcompact_handle18_07_11_dasm(DASM_OPS_16) |
| 2034 | | { |
| 2035 | | int res = (op & 0x0700) >> 8; |
| 2036 | | op &= ~0x0700; // all bits now used |
| 2037 | | |
| 2038 | | if (res) |
| 2039 | | print("PUSH_S [BLINK] (Reserved Bits set %04x)", op); |
| 2040 | | else |
| 2041 | | print("PUSH_S [BLINK]"); |
| 2042 | | |
| 2043 | | return 2; |
| 2044 | | } |
| 2045 | | |
| 2046 | | int arcompact_handle18_07_12_dasm(DASM_OPS_16) { print("<illegal 0x18_07_12> (%04x)", op); return 2;} |
| 2047 | | int arcompact_handle18_07_13_dasm(DASM_OPS_16) { print("<illegal 0x18_07_13> (%04x)", op); return 2;} |
| 2048 | | int arcompact_handle18_07_14_dasm(DASM_OPS_16) { print("<illegal 0x18_07_14> (%04x)", op); return 2;} |
| 2049 | | int arcompact_handle18_07_15_dasm(DASM_OPS_16) { print("<illegal 0x18_07_15> (%04x)", op); return 2;} |
| 2050 | | int arcompact_handle18_07_16_dasm(DASM_OPS_16) { print("<illegal 0x18_07_16> (%04x)", op); return 2;} |
| 2051 | | int arcompact_handle18_07_17_dasm(DASM_OPS_16) { print("<illegal 0x18_07_17> (%04x)", op); return 2;} |
| 2052 | | int arcompact_handle18_07_18_dasm(DASM_OPS_16) { print("<illegal 0x18_07_18> (%04x)", op); return 2;} |
| 2053 | | int arcompact_handle18_07_19_dasm(DASM_OPS_16) { print("<illegal 0x18_07_19> (%04x)", op); return 2;} |
| 2054 | | int arcompact_handle18_07_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1a> (%04x)", op); return 2;} |
| 2055 | | int arcompact_handle18_07_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1b> (%04x)", op); return 2;} |
| 2056 | | int arcompact_handle18_07_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1c> (%04x)", op); return 2;} |
| 2057 | | int arcompact_handle18_07_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1d> (%04x)", op); return 2;} |
| 2058 | | int arcompact_handle18_07_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1e> (%04x)", op); return 2;} |
| 2059 | | int arcompact_handle18_07_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1f> (%04x)", op); return 2;} |
| 2060 | | |
| 2061 | | |
| 2062 | | int arcompact_handle19_dasm(DASM_OPS_16) |
| 2063 | | { |
| 2064 | | int size = 2; |
| 2065 | | UINT8 subinstr = (op & 0x0600) >> 9; |
| 2066 | | op &= ~0x0600; |
| 2067 | | |
| 2068 | | switch (subinstr) |
| 2069 | | { |
| 2070 | | case 0x00: size = arcompact_handle19_00_dasm(DASM_PARAMS); break; // LD_S (GP) |
| 2071 | | case 0x01: size = arcompact_handle19_01_dasm(DASM_PARAMS); break; // LDB_S (GP) |
| 2072 | | case 0x02: size = arcompact_handle19_02_dasm(DASM_PARAMS); break; // LDW_S (GP) |
| 2073 | | case 0x03: size = arcompact_handle19_03_dasm(DASM_PARAMS); break; // ADD_S (GP) |
| 2074 | | } |
| 2075 | | return size; |
| 2076 | | } |
| 2077 | | |
| 2078 | | int arcompact_handle19_00_dasm(DASM_OPS_16) { print("LD_S r0 <- m[GP + s11].long (%04x)", op); return 2;} |
| 2079 | | int arcompact_handle19_01_dasm(DASM_OPS_16) { print("LDB_S r0 <- m[GP + s9].byte (%04x)", op); return 2;} |
| 2080 | | int arcompact_handle19_02_dasm(DASM_OPS_16) { print("LDW_S r0 <- m[GP + s10].word (%04x)", op); return 2;} |
| 2081 | | int arcompact_handle19_03_dasm(DASM_OPS_16) { print("ADD_S r0 <- GP + s11 (%04x)", op); return 2;} |
| 2082 | | |
| 2083 | | |
| 2084 | | |
| 2085 | | int arcompact_handle1a_dasm(DASM_OPS_16) |
| 2086 | | { |
| 2087 | | print("PCL Instr (%04x)", op); |
| 2088 | | return 2; |
| 2089 | | } |
| 2090 | | |
| 2091 | | int arcompact_handle1b_dasm(DASM_OPS_16) |
| 2092 | | { |
| 2093 | | print("MOV_S (%04x)", op); |
| 2094 | | return 2; |
| 2095 | | } |
| 2096 | | |
| 2097 | | int arcompact_handle1c_dasm(DASM_OPS_16) |
| 2098 | | { |
| 2099 | | int size = 2; |
| 2100 | | UINT8 subinstr = (op & 0x0080) >> 7; |
| 2101 | | op &= ~0x0080; |
| 2102 | | |
| 2103 | | switch (subinstr) |
| 2104 | | { |
| 2105 | | case 0x00: size = arcompact_handle1c_00_dasm(DASM_PARAMS); break; // ADD_S |
| 2106 | | case 0x01: size = arcompact_handle1c_01_dasm(DASM_PARAMS); break; // CMP_S |
| 2107 | | } |
| 2108 | | return size; |
| 2109 | | } |
| 2110 | | |
| 2111 | | int arcompact_handle1c_00_dasm(DASM_OPS_16) { print("ADD_S b <- b + u7 (%04x)", op); return 2;} |
| 2112 | | int arcompact_handle1c_01_dasm(DASM_OPS_16) { print("CMP_S b - u7 (%04x)", op); return 2;} |
| 2113 | | |
| 2114 | | |
| 2115 | | int arcompact_handle1d_dasm(DASM_OPS_16) |
| 2116 | | { |
| 2117 | | int size = 2; |
| 2118 | | UINT8 subinstr = (op & 0x0080) >> 7; |
| 2119 | | op &= ~0x0080; |
| 2120 | | |
| 2121 | | switch (subinstr) |
| 2122 | | { |
| 2123 | | case 0x00: size = arcompact_handle1d_00_dasm(DASM_PARAMS); break; // BREQ_S |
| 2124 | | case 0x01: size = arcompact_handle1d_01_dasm(DASM_PARAMS); break; // BRNE_S |
| 2125 | | } |
| 2126 | | return size; |
| 2127 | | } |
| 2128 | | |
| 2129 | | int arcompact_handle1d_00_dasm(DASM_OPS_16) { print("BREQ_S (%04x)", op); return 2;} |
| 2130 | | int arcompact_handle1d_01_dasm(DASM_OPS_16) { print("BRNE_S (%04x)", op); return 2;} |
| 2131 | | |
| 2132 | | |
| 2133 | | int arcompact_handle1e_dasm(DASM_OPS_16) |
| 2134 | | { |
| 2135 | | int size = 2; |
| 2136 | | UINT8 subinstr = (op & 0x0600) >> 9; |
| 2137 | | op &= ~0x0600; |
| 2138 | | |
| 2139 | | switch (subinstr) |
| 2140 | | { |
| 2141 | | case 0x00: size = arcompact_handle1e_00_dasm(DASM_PARAMS); break; // B_S |
| 2142 | | case 0x01: size = arcompact_handle1e_01_dasm(DASM_PARAMS); break; // BEQ_S |
| 2143 | | case 0x02: size = arcompact_handle1e_02_dasm(DASM_PARAMS); break; // BNE_S |
| 2144 | | case 0x03: size = arcompact_handle1e_03_dasm(DASM_PARAMS); break; // Bcc_S |
| 2145 | | } |
| 2146 | | return size; |
| 2147 | | } |
| 2148 | | |
| 2149 | | int arcompact_handle1e_00_dasm(DASM_OPS_16) { print("B_S (%04x)", op); return 2;} |
| 2150 | | int arcompact_handle1e_01_dasm(DASM_OPS_16) { print("BEQ_S (%04x)", op); return 2;} |
| 2151 | | int arcompact_handle1e_02_dasm(DASM_OPS_16) { print("BNE_S (%04x)", op); return 2;} |
| 2152 | | |
| 2153 | | |
| 2154 | | int arcompact_handle1e_03_dasm(DASM_OPS_16) |
| 2155 | | { |
| 2156 | | |
| 2157 | | int size = 2; |
| 2158 | | UINT8 subinstr2 = (op & 0x01c0) >> 6; |
| 2159 | | op &= ~0x01c0; |
| 2160 | | |
| 2161 | | switch (subinstr2) |
| 2162 | | { |
| 2163 | | case 0x00: size = arcompact_handle1e_03_00_dasm(DASM_PARAMS); break; // BGT_S |
| 2164 | | case 0x01: size = arcompact_handle1e_03_01_dasm(DASM_PARAMS); break; // BGE_S |
| 2165 | | case 0x02: size = arcompact_handle1e_03_02_dasm(DASM_PARAMS); break; // BLT_S |
| 2166 | | case 0x03: size = arcompact_handle1e_03_03_dasm(DASM_PARAMS); break; // BLE_S |
| 2167 | | case 0x04: size = arcompact_handle1e_03_04_dasm(DASM_PARAMS); break; // BHI_S |
| 2168 | | case 0x05: size = arcompact_handle1e_03_05_dasm(DASM_PARAMS); break; // BHS_S |
| 2169 | | case 0x06: size = arcompact_handle1e_03_06_dasm(DASM_PARAMS); break; // BLO_S |
| 2170 | | case 0x07: size = arcompact_handle1e_03_07_dasm(DASM_PARAMS); break; // BLS_S |
| 2171 | | } |
| 2172 | | return size; |
| 2173 | | |
| 2174 | | } |
| 2175 | | |
| 2176 | | int arcompact_handle1e_03_00_dasm(DASM_OPS_16) { print("BGT_S (%04x)", op); return 2;} |
| 2177 | | int arcompact_handle1e_03_01_dasm(DASM_OPS_16) { print("BGE_S (%04x)", op); return 2;} |
| 2178 | | int arcompact_handle1e_03_02_dasm(DASM_OPS_16) { print("BLT_S (%04x)", op); return 2;} |
| 2179 | | int arcompact_handle1e_03_03_dasm(DASM_OPS_16) { print("BLE_S (%04x)", op); return 2;} |
| 2180 | | int arcompact_handle1e_03_04_dasm(DASM_OPS_16) { print("BHI_S (%04x)", op); return 2;} |
| 2181 | | int arcompact_handle1e_03_05_dasm(DASM_OPS_16) { print("BHS_S (%04x)", op); return 2;} |
| 2182 | | int arcompact_handle1e_03_06_dasm(DASM_OPS_16) { print("BLO_S (%04x)", op); return 2;} |
| 2183 | | int arcompact_handle1e_03_07_dasm(DASM_OPS_16) { print("BLS_S (%04x)", op); return 2;} |
| 2184 | | |
| 2185 | | |
| 2186 | | |
| 2187 | | int arcompact_handle1f_dasm(DASM_OPS_16) |
| 2188 | | { |
| 2189 | | print("BL_S (%04x)", op); |
| 2190 | | return 2; |
| 2191 | | } |
| 2192 | | |
| 2193 | 25 | CPU_DISASSEMBLE(arcompact) |
| 2194 | 26 | { |
| 2195 | 27 | int size = 2; |
trunk/src/emu/cpu/arcompact/arcompactdasm_dispatch.c
| r0 | r242414 | |
| 1 | /*********************************\ |
| 2 | |
| 3 | ARCompact disassembler |
| 4 | |
| 5 | \*********************************/ |
| 6 | |
| 7 | #include "emu.h" |
| 8 | #include <stdarg.h> |
| 9 | |
| 10 | #include "arcompactdasm_dispatch.h" |
| 11 | #include "arcompactdasm_ops.h" |
| 12 | |
| 13 | int arcompact_handle00_dasm(DASM_OPS_32) |
| 14 | { |
| 15 | int size = 4; |
| 16 | UINT8 subinstr = (op & 0x00010000) >> 16; |
| 17 | op &= ~0x00010000; |
| 18 | |
| 19 | switch (subinstr) |
| 20 | { |
| 21 | case 0x00: size = arcompact_handle00_00_dasm(DASM_PARAMS); break; // Branch Conditionally |
| 22 | case 0x01: size = arcompact_handle00_01_dasm(DASM_PARAMS); break; // Branch Unconditionally Far |
| 23 | } |
| 24 | |
| 25 | return size; |
| 26 | } |
| 27 | |
| 28 | int arcompact_handle01_dasm(DASM_OPS_32) |
| 29 | { |
| 30 | int size = 4; |
| 31 | UINT8 subinstr = (op & 0x00010000) >> 16; |
| 32 | op &= ~0x00010000; |
| 33 | |
| 34 | switch (subinstr) |
| 35 | { |
| 36 | case 0x00: size = arcompact_handle01_00_dasm(DASM_PARAMS); break; // Branh & Link |
| 37 | case 0x01: size = arcompact_handle01_01_dasm(DASM_PARAMS); break; // Branch on Compare |
| 38 | } |
| 39 | |
| 40 | return size; |
| 41 | } |
| 42 | |
| 43 | int arcompact_handle01_00_dasm(DASM_OPS_32) |
| 44 | { |
| 45 | int size = 4; |
| 46 | UINT8 subinstr2 = (op & 0x00020000) >> 17; |
| 47 | op &= ~0x00020000; |
| 48 | |
| 49 | switch (subinstr2) |
| 50 | { |
| 51 | case 0x00: size = arcompact_handle01_00_00dasm(DASM_PARAMS); break; // Branch and Link Conditionally |
| 52 | case 0x01: size = arcompact_handle01_00_01dasm(DASM_PARAMS); break; // Branch and Link Unconditional Far |
| 53 | } |
| 54 | |
| 55 | return size; |
| 56 | } |
| 57 | |
| 58 | int arcompact_handle01_01_dasm(DASM_OPS_32) |
| 59 | { |
| 60 | int size = 4; |
| 61 | |
| 62 | UINT8 subinstr2 = (op & 0x00000010) >> 4; |
| 63 | op &= ~0x00000010; |
| 64 | |
| 65 | switch (subinstr2) |
| 66 | { |
| 67 | case 0x00: size = arcompact_handle01_01_00_dasm(DASM_PARAMS); break; // Branch on Compare Register-Register |
| 68 | case 0x01: size = arcompact_handle01_01_01_dasm(DASM_PARAMS); break; // Branch on Compare/Bit Test Register-Immediate |
| 69 | } |
| 70 | |
| 71 | return size; |
| 72 | } |
| 73 | |
| 74 | int arcompact_handle01_01_00_dasm(DASM_OPS_32) |
| 75 | { |
| 76 | int size = 4; |
| 77 | UINT8 subinstr3 = (op & 0x0000000f) >> 0; |
| 78 | op &= ~0x0000000f; |
| 79 | |
| 80 | switch (subinstr3) |
| 81 | { |
| 82 | case 0x00: size = arcompact_handle01_01_00_00_dasm(DASM_PARAMS); break; // BREQ (reg-reg) |
| 83 | case 0x01: size = arcompact_handle01_01_00_01_dasm(DASM_PARAMS); break; // BRNE (reg-reg) |
| 84 | case 0x02: size = arcompact_handle01_01_00_02_dasm(DASM_PARAMS); break; // BRLT (reg-reg) |
| 85 | case 0x03: size = arcompact_handle01_01_00_03_dasm(DASM_PARAMS); break; // BRGE (reg-reg) |
| 86 | case 0x04: size = arcompact_handle01_01_00_04_dasm(DASM_PARAMS); break; // BRLO (reg-reg) |
| 87 | case 0x05: size = arcompact_handle01_01_00_05_dasm(DASM_PARAMS); break; // BRHS (reg-reg) |
| 88 | case 0x06: size = arcompact_handle01_01_00_06_dasm(DASM_PARAMS); break; // reserved |
| 89 | case 0x07: size = arcompact_handle01_01_00_07_dasm(DASM_PARAMS); break; // reserved |
| 90 | case 0x08: size = arcompact_handle01_01_00_08_dasm(DASM_PARAMS); break; // reserved |
| 91 | case 0x09: size = arcompact_handle01_01_00_09_dasm(DASM_PARAMS); break; // reserved |
| 92 | case 0x0a: size = arcompact_handle01_01_00_0a_dasm(DASM_PARAMS); break; // reserved |
| 93 | case 0x0b: size = arcompact_handle01_01_00_0b_dasm(DASM_PARAMS); break; // reserved |
| 94 | case 0x0c: size = arcompact_handle01_01_00_0c_dasm(DASM_PARAMS); break; // reserved |
| 95 | case 0x0d: size = arcompact_handle01_01_00_0d_dasm(DASM_PARAMS); break; // reserved |
| 96 | case 0x0e: size = arcompact_handle01_01_00_0e_dasm(DASM_PARAMS); break; // BBIT0 (reg-reg) |
| 97 | case 0x0f: size = arcompact_handle01_01_00_0f_dasm(DASM_PARAMS); break; // BBIT1 (reg-reg) |
| 98 | } |
| 99 | |
| 100 | return size; |
| 101 | } |
| 102 | |
| 103 | int arcompact_handle01_01_01_dasm(DASM_OPS_32) // Branch on Compare/Bit Test Register-Immediate |
| 104 | { |
| 105 | int size = 4; |
| 106 | UINT8 subinstr3 = (op & 0x0000000f) >> 0; |
| 107 | op &= ~0x0000000f; |
| 108 | |
| 109 | switch (subinstr3) |
| 110 | { |
| 111 | case 0x00: size = arcompact_handle01_01_01_00_dasm(DASM_PARAMS); break; // BREQ (reg-imm) |
| 112 | case 0x01: size = arcompact_handle01_01_01_01_dasm(DASM_PARAMS); break; // BRNE (reg-imm) |
| 113 | case 0x02: size = arcompact_handle01_01_01_02_dasm(DASM_PARAMS); break; // BRLT (reg-imm) |
| 114 | case 0x03: size = arcompact_handle01_01_01_03_dasm(DASM_PARAMS); break; // BRGE (reg-imm) |
| 115 | case 0x04: size = arcompact_handle01_01_01_04_dasm(DASM_PARAMS); break; // BRLO (reg-imm) |
| 116 | case 0x05: size = arcompact_handle01_01_01_05_dasm(DASM_PARAMS); break; // BRHS (reg-imm) |
| 117 | case 0x06: size = arcompact_handle01_01_01_06_dasm(DASM_PARAMS); break; // reserved |
| 118 | case 0x07: size = arcompact_handle01_01_01_07_dasm(DASM_PARAMS); break; // reserved |
| 119 | case 0x08: size = arcompact_handle01_01_01_08_dasm(DASM_PARAMS); break; // reserved |
| 120 | case 0x09: size = arcompact_handle01_01_01_09_dasm(DASM_PARAMS); break; // reserved |
| 121 | case 0x0a: size = arcompact_handle01_01_01_0a_dasm(DASM_PARAMS); break; // reserved |
| 122 | case 0x0b: size = arcompact_handle01_01_01_0b_dasm(DASM_PARAMS); break; // reserved |
| 123 | case 0x0c: size = arcompact_handle01_01_01_0c_dasm(DASM_PARAMS); break; // reserved |
| 124 | case 0x0d: size = arcompact_handle01_01_01_0d_dasm(DASM_PARAMS); break; // reserved |
| 125 | case 0x0e: size = arcompact_handle01_01_01_0e_dasm(DASM_PARAMS); break; // BBIT0 (reg-imm) |
| 126 | case 0x0f: size = arcompact_handle01_01_01_0f_dasm(DASM_PARAMS); break; // BBIT1 (reg-imm) |
| 127 | } |
| 128 | |
| 129 | return size; |
| 130 | } |
| 131 | |
| 132 | int arcompact_handle04_dasm(DASM_OPS_32) |
| 133 | { |
| 134 | int size = 4; |
| 135 | // General Operations |
| 136 | |
| 137 | // bitpos |
| 138 | // 11111 111 11 111111 0 000 000000 0 00000 |
| 139 | // fedcb a98 76 543210 f edc ba9876 5 43210 |
| 140 | // |
| 141 | // 00100 bbb 00 iiiiii F BBB CCCCCC A AAAAA General Operations *UN*Conditional Register to Register |
| 142 | // 00100 bbb 01 iiiiii F BBB UUUUUU A AAAAA General Operations *UN*Conditional Register (Unsigned 6-bit IMM) |
| 143 | // 00100 bbb 10 iiiiii F BBB ssssss S SSSSS General Operations *UN*Conditional Register (Signed 12-bit IMM) |
| 144 | |
| 145 | // 00100 bbb 11 iiiiii F BBB CCCCCC 0 QQQQQ General Operations Conditional Register |
| 146 | // 00100 bbb 11 iiiiii F BBB UUUUUU 1 QQQQQ General Operations Conditional Register (Unsigned 6-bit IMM) |
| 147 | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 148 | op &= ~0x003f0000; |
| 149 | |
| 150 | switch (subinstr) |
| 151 | { |
| 152 | case 0x00: size = arcompact_handle04_00_dasm(DASM_PARAMS); break; // ADD |
| 153 | case 0x01: size = arcompact_handle04_01_dasm(DASM_PARAMS); break; // ADC |
| 154 | case 0x02: size = arcompact_handle04_02_dasm(DASM_PARAMS); break; // SUB |
| 155 | case 0x03: size = arcompact_handle04_03_dasm(DASM_PARAMS); break; // SBC |
| 156 | case 0x04: size = arcompact_handle04_04_dasm(DASM_PARAMS); break; // AND |
| 157 | case 0x05: size = arcompact_handle04_05_dasm(DASM_PARAMS); break; // OR |
| 158 | case 0x06: size = arcompact_handle04_06_dasm(DASM_PARAMS); break; // BIC |
| 159 | case 0x07: size = arcompact_handle04_07_dasm(DASM_PARAMS); break; // XOR |
| 160 | case 0x08: size = arcompact_handle04_08_dasm(DASM_PARAMS); break; // MAX |
| 161 | case 0x09: size = arcompact_handle04_09_dasm(DASM_PARAMS); break; // MIN |
| 162 | case 0x0a: size = arcompact_handle04_0a_dasm(DASM_PARAMS); break; // MOV |
| 163 | case 0x0b: size = arcompact_handle04_0b_dasm(DASM_PARAMS); break; // TST |
| 164 | case 0x0c: size = arcompact_handle04_0c_dasm(DASM_PARAMS); break; // CMP |
| 165 | case 0x0d: size = arcompact_handle04_0d_dasm(DASM_PARAMS); break; // RCMP |
| 166 | case 0x0e: size = arcompact_handle04_0e_dasm(DASM_PARAMS); break; // RSUB |
| 167 | case 0x0f: size = arcompact_handle04_0f_dasm(DASM_PARAMS); break; // BSET |
| 168 | case 0x10: size = arcompact_handle04_10_dasm(DASM_PARAMS); break; // BCLR |
| 169 | case 0x11: size = arcompact_handle04_11_dasm(DASM_PARAMS); break; // BTST |
| 170 | case 0x12: size = arcompact_handle04_12_dasm(DASM_PARAMS); break; // BXOR |
| 171 | case 0x13: size = arcompact_handle04_13_dasm(DASM_PARAMS); break; // BMSK |
| 172 | case 0x14: size = arcompact_handle04_14_dasm(DASM_PARAMS); break; // ADD1 |
| 173 | case 0x15: size = arcompact_handle04_15_dasm(DASM_PARAMS); break; // ADD2 |
| 174 | case 0x16: size = arcompact_handle04_16_dasm(DASM_PARAMS); break; // ADD3 |
| 175 | case 0x17: size = arcompact_handle04_17_dasm(DASM_PARAMS); break; // SUB1 |
| 176 | case 0x18: size = arcompact_handle04_18_dasm(DASM_PARAMS); break; // SUB2 |
| 177 | case 0x19: size = arcompact_handle04_19_dasm(DASM_PARAMS); break; // SUB3 |
| 178 | case 0x1a: size = arcompact_handle04_1a_dasm(DASM_PARAMS); break; // MPY * |
| 179 | case 0x1b: size = arcompact_handle04_1b_dasm(DASM_PARAMS); break; // MPYH * |
| 180 | case 0x1c: size = arcompact_handle04_1c_dasm(DASM_PARAMS); break; // MPYHU * |
| 181 | case 0x1d: size = arcompact_handle04_1d_dasm(DASM_PARAMS); break; // MPYU * |
| 182 | case 0x1e: size = arcompact_handle04_1e_dasm(DASM_PARAMS); break; // illegal |
| 183 | case 0x1f: size = arcompact_handle04_1f_dasm(DASM_PARAMS); break; // illegal |
| 184 | case 0x20: size = arcompact_handle04_20_dasm(DASM_PARAMS); break; // Jcc |
| 185 | case 0x21: size = arcompact_handle04_21_dasm(DASM_PARAMS); break; // Jcc.D |
| 186 | case 0x22: size = arcompact_handle04_22_dasm(DASM_PARAMS); break; // JLcc |
| 187 | case 0x23: size = arcompact_handle04_23_dasm(DASM_PARAMS); break; // JLcc.D |
| 188 | case 0x24: size = arcompact_handle04_24_dasm(DASM_PARAMS); break; // illegal |
| 189 | case 0x25: size = arcompact_handle04_25_dasm(DASM_PARAMS); break; // illegal |
| 190 | case 0x26: size = arcompact_handle04_26_dasm(DASM_PARAMS); break; // illegal |
| 191 | case 0x27: size = arcompact_handle04_27_dasm(DASM_PARAMS); break; // illegal |
| 192 | case 0x28: size = arcompact_handle04_28_dasm(DASM_PARAMS); break; // LPcc |
| 193 | case 0x29: size = arcompact_handle04_29_dasm(DASM_PARAMS); break; // FLAG |
| 194 | case 0x2a: size = arcompact_handle04_2a_dasm(DASM_PARAMS); break; // LR |
| 195 | case 0x2b: size = arcompact_handle04_2b_dasm(DASM_PARAMS); break; // SR |
| 196 | case 0x2c: size = arcompact_handle04_2c_dasm(DASM_PARAMS); break; // illegal |
| 197 | case 0x2d: size = arcompact_handle04_2d_dasm(DASM_PARAMS); break; // illegal |
| 198 | case 0x2e: size = arcompact_handle04_2e_dasm(DASM_PARAMS); break; // illegal |
| 199 | case 0x2f: size = arcompact_handle04_2f_dasm(DASM_PARAMS); break; // Sub Opcode |
| 200 | case 0x30: size = arcompact_handle04_30_dasm(DASM_PARAMS); break; // LD r-r |
| 201 | case 0x31: size = arcompact_handle04_31_dasm(DASM_PARAMS); break; // LD r-r |
| 202 | case 0x32: size = arcompact_handle04_32_dasm(DASM_PARAMS); break; // LD r-r |
| 203 | case 0x33: size = arcompact_handle04_33_dasm(DASM_PARAMS); break; // LD r-r |
| 204 | case 0x34: size = arcompact_handle04_34_dasm(DASM_PARAMS); break; // LD r-r |
| 205 | case 0x35: size = arcompact_handle04_35_dasm(DASM_PARAMS); break; // LD r-r |
| 206 | case 0x36: size = arcompact_handle04_36_dasm(DASM_PARAMS); break; // LD r-r |
| 207 | case 0x37: size = arcompact_handle04_37_dasm(DASM_PARAMS); break; // LD r-r |
| 208 | case 0x38: size = arcompact_handle04_38_dasm(DASM_PARAMS); break; // illegal |
| 209 | case 0x39: size = arcompact_handle04_39_dasm(DASM_PARAMS); break; // illegal |
| 210 | case 0x3a: size = arcompact_handle04_3a_dasm(DASM_PARAMS); break; // illegal |
| 211 | case 0x3b: size = arcompact_handle04_3b_dasm(DASM_PARAMS); break; // illegal |
| 212 | case 0x3c: size = arcompact_handle04_3c_dasm(DASM_PARAMS); break; // illegal |
| 213 | case 0x3d: size = arcompact_handle04_3d_dasm(DASM_PARAMS); break; // illegal |
| 214 | case 0x3e: size = arcompact_handle04_3e_dasm(DASM_PARAMS); break; // illegal |
| 215 | case 0x3f: size = arcompact_handle04_3f_dasm(DASM_PARAMS); break; // illegal |
| 216 | } |
| 217 | |
| 218 | return size; |
| 219 | } |
| 220 | |
| 221 | int arcompact_handle04_2f_dasm(DASM_OPS_32) |
| 222 | { |
| 223 | int size = 4; |
| 224 | UINT8 subinstr2 = (op & 0x0000003f) >> 0; |
| 225 | op &= ~0x0000003f; |
| 226 | |
| 227 | switch (subinstr2) |
| 228 | { |
| 229 | case 0x00: size = arcompact_handle04_2f_00_dasm(DASM_PARAMS); break; // ASL |
| 230 | case 0x01: size = arcompact_handle04_2f_01_dasm(DASM_PARAMS); break; // ASR |
| 231 | case 0x02: size = arcompact_handle04_2f_02_dasm(DASM_PARAMS); break; // LSR |
| 232 | case 0x03: size = arcompact_handle04_2f_03_dasm(DASM_PARAMS); break; // ROR |
| 233 | case 0x04: size = arcompact_handle04_2f_04_dasm(DASM_PARAMS); break; // RCC |
| 234 | case 0x05: size = arcompact_handle04_2f_05_dasm(DASM_PARAMS); break; // SEXB |
| 235 | case 0x06: size = arcompact_handle04_2f_06_dasm(DASM_PARAMS); break; // SEXW |
| 236 | case 0x07: size = arcompact_handle04_2f_07_dasm(DASM_PARAMS); break; // EXTB |
| 237 | case 0x08: size = arcompact_handle04_2f_08_dasm(DASM_PARAMS); break; // EXTW |
| 238 | case 0x09: size = arcompact_handle04_2f_09_dasm(DASM_PARAMS); break; // ABS |
| 239 | case 0x0a: size = arcompact_handle04_2f_0a_dasm(DASM_PARAMS); break; // NOT |
| 240 | case 0x0b: size = arcompact_handle04_2f_0b_dasm(DASM_PARAMS); break; // RLC |
| 241 | case 0x0c: size = arcompact_handle04_2f_0c_dasm(DASM_PARAMS); break; // EX |
| 242 | case 0x0d: size = arcompact_handle04_2f_0d_dasm(DASM_PARAMS); break; // illegal |
| 243 | case 0x0e: size = arcompact_handle04_2f_0e_dasm(DASM_PARAMS); break; // illegal |
| 244 | case 0x0f: size = arcompact_handle04_2f_0f_dasm(DASM_PARAMS); break; // illegal |
| 245 | case 0x10: size = arcompact_handle04_2f_10_dasm(DASM_PARAMS); break; // illegal |
| 246 | case 0x11: size = arcompact_handle04_2f_11_dasm(DASM_PARAMS); break; // illegal |
| 247 | case 0x12: size = arcompact_handle04_2f_12_dasm(DASM_PARAMS); break; // illegal |
| 248 | case 0x13: size = arcompact_handle04_2f_13_dasm(DASM_PARAMS); break; // illegal |
| 249 | case 0x14: size = arcompact_handle04_2f_14_dasm(DASM_PARAMS); break; // illegal |
| 250 | case 0x15: size = arcompact_handle04_2f_15_dasm(DASM_PARAMS); break; // illegal |
| 251 | case 0x16: size = arcompact_handle04_2f_16_dasm(DASM_PARAMS); break; // illegal |
| 252 | case 0x17: size = arcompact_handle04_2f_17_dasm(DASM_PARAMS); break; // illegal |
| 253 | case 0x18: size = arcompact_handle04_2f_18_dasm(DASM_PARAMS); break; // illegal |
| 254 | case 0x19: size = arcompact_handle04_2f_19_dasm(DASM_PARAMS); break; // illegal |
| 255 | case 0x1a: size = arcompact_handle04_2f_1a_dasm(DASM_PARAMS); break; // illegal |
| 256 | case 0x1b: size = arcompact_handle04_2f_1b_dasm(DASM_PARAMS); break; // illegal |
| 257 | case 0x1c: size = arcompact_handle04_2f_1c_dasm(DASM_PARAMS); break; // illegal |
| 258 | case 0x1d: size = arcompact_handle04_2f_1d_dasm(DASM_PARAMS); break; // illegal |
| 259 | case 0x1e: size = arcompact_handle04_2f_1e_dasm(DASM_PARAMS); break; // illegal |
| 260 | case 0x1f: size = arcompact_handle04_2f_1f_dasm(DASM_PARAMS); break; // illegal |
| 261 | case 0x20: size = arcompact_handle04_2f_20_dasm(DASM_PARAMS); break; // illegal |
| 262 | case 0x21: size = arcompact_handle04_2f_21_dasm(DASM_PARAMS); break; // illegal |
| 263 | case 0x22: size = arcompact_handle04_2f_22_dasm(DASM_PARAMS); break; // illegal |
| 264 | case 0x23: size = arcompact_handle04_2f_23_dasm(DASM_PARAMS); break; // illegal |
| 265 | case 0x24: size = arcompact_handle04_2f_24_dasm(DASM_PARAMS); break; // illegal |
| 266 | case 0x25: size = arcompact_handle04_2f_25_dasm(DASM_PARAMS); break; // illegal |
| 267 | case 0x26: size = arcompact_handle04_2f_26_dasm(DASM_PARAMS); break; // illegal |
| 268 | case 0x27: size = arcompact_handle04_2f_27_dasm(DASM_PARAMS); break; // illegal |
| 269 | case 0x28: size = arcompact_handle04_2f_28_dasm(DASM_PARAMS); break; // illegal |
| 270 | case 0x29: size = arcompact_handle04_2f_29_dasm(DASM_PARAMS); break; // illegal |
| 271 | case 0x2a: size = arcompact_handle04_2f_2a_dasm(DASM_PARAMS); break; // illegal |
| 272 | case 0x2b: size = arcompact_handle04_2f_2b_dasm(DASM_PARAMS); break; // illegal |
| 273 | case 0x2c: size = arcompact_handle04_2f_2c_dasm(DASM_PARAMS); break; // illegal |
| 274 | case 0x2d: size = arcompact_handle04_2f_2d_dasm(DASM_PARAMS); break; // illegal |
| 275 | case 0x2e: size = arcompact_handle04_2f_2e_dasm(DASM_PARAMS); break; // illegal |
| 276 | case 0x2f: size = arcompact_handle04_2f_2f_dasm(DASM_PARAMS); break; // illegal |
| 277 | case 0x30: size = arcompact_handle04_2f_30_dasm(DASM_PARAMS); break; // illegal |
| 278 | case 0x31: size = arcompact_handle04_2f_31_dasm(DASM_PARAMS); break; // illegal |
| 279 | case 0x32: size = arcompact_handle04_2f_32_dasm(DASM_PARAMS); break; // illegal |
| 280 | case 0x33: size = arcompact_handle04_2f_33_dasm(DASM_PARAMS); break; // illegal |
| 281 | case 0x34: size = arcompact_handle04_2f_34_dasm(DASM_PARAMS); break; // illegal |
| 282 | case 0x35: size = arcompact_handle04_2f_35_dasm(DASM_PARAMS); break; // illegal |
| 283 | case 0x36: size = arcompact_handle04_2f_36_dasm(DASM_PARAMS); break; // illegal |
| 284 | case 0x37: size = arcompact_handle04_2f_37_dasm(DASM_PARAMS); break; // illegal |
| 285 | case 0x38: size = arcompact_handle04_2f_38_dasm(DASM_PARAMS); break; // illegal |
| 286 | case 0x39: size = arcompact_handle04_2f_39_dasm(DASM_PARAMS); break; // illegal |
| 287 | case 0x3a: size = arcompact_handle04_2f_3a_dasm(DASM_PARAMS); break; // illegal |
| 288 | case 0x3b: size = arcompact_handle04_2f_3b_dasm(DASM_PARAMS); break; // illegal |
| 289 | case 0x3c: size = arcompact_handle04_2f_3c_dasm(DASM_PARAMS); break; // illegal |
| 290 | case 0x3d: size = arcompact_handle04_2f_3d_dasm(DASM_PARAMS); break; // illegal |
| 291 | case 0x3e: size = arcompact_handle04_2f_3e_dasm(DASM_PARAMS); break; // illegal |
| 292 | case 0x3f: size = arcompact_handle04_2f_3f_dasm(DASM_PARAMS); break; // ZOPs (Zero Operand Opcodes) |
| 293 | } |
| 294 | |
| 295 | return size; |
| 296 | } |
| 297 | |
| 298 | int arcompact_handle04_2f_3f_dasm(DASM_OPS_32) |
| 299 | { |
| 300 | int size = 4; |
| 301 | UINT8 subinstr3 = (op & 0x07000000) >> 24; |
| 302 | subinstr3 |= ((op & 0x00007000) >> 12) << 3; |
| 303 | |
| 304 | op &= ~0x07007000; |
| 305 | |
| 306 | switch (subinstr3) |
| 307 | { |
| 308 | case 0x00: size = arcompact_handle04_2f_3f_00_dasm(DASM_PARAMS); break; // illegal |
| 309 | case 0x01: size = arcompact_handle04_2f_3f_01_dasm(DASM_PARAMS); break; // SLEEP |
| 310 | case 0x02: size = arcompact_handle04_2f_3f_02_dasm(DASM_PARAMS); break; // SWI / TRAP9 |
| 311 | case 0x03: size = arcompact_handle04_2f_3f_03_dasm(DASM_PARAMS); break; // SYNC |
| 312 | case 0x04: size = arcompact_handle04_2f_3f_04_dasm(DASM_PARAMS); break; // RTIE |
| 313 | case 0x05: size = arcompact_handle04_2f_3f_05_dasm(DASM_PARAMS); break; // BRK |
| 314 | case 0x06: size = arcompact_handle04_2f_3f_06_dasm(DASM_PARAMS); break; // illegal |
| 315 | case 0x07: size = arcompact_handle04_2f_3f_07_dasm(DASM_PARAMS); break; // illegal |
| 316 | case 0x08: size = arcompact_handle04_2f_3f_08_dasm(DASM_PARAMS); break; // illegal |
| 317 | case 0x09: size = arcompact_handle04_2f_3f_09_dasm(DASM_PARAMS); break; // illegal |
| 318 | case 0x0a: size = arcompact_handle04_2f_3f_0a_dasm(DASM_PARAMS); break; // illegal |
| 319 | case 0x0b: size = arcompact_handle04_2f_3f_0b_dasm(DASM_PARAMS); break; // illegal |
| 320 | case 0x0c: size = arcompact_handle04_2f_3f_0c_dasm(DASM_PARAMS); break; // illegal |
| 321 | case 0x0d: size = arcompact_handle04_2f_3f_0d_dasm(DASM_PARAMS); break; // illegal |
| 322 | case 0x0e: size = arcompact_handle04_2f_3f_0e_dasm(DASM_PARAMS); break; // illegal |
| 323 | case 0x0f: size = arcompact_handle04_2f_3f_0f_dasm(DASM_PARAMS); break; // illegal |
| 324 | case 0x10: size = arcompact_handle04_2f_3f_10_dasm(DASM_PARAMS); break; // illegal |
| 325 | case 0x11: size = arcompact_handle04_2f_3f_11_dasm(DASM_PARAMS); break; // illegal |
| 326 | case 0x12: size = arcompact_handle04_2f_3f_12_dasm(DASM_PARAMS); break; // illegal |
| 327 | case 0x13: size = arcompact_handle04_2f_3f_13_dasm(DASM_PARAMS); break; // illegal |
| 328 | case 0x14: size = arcompact_handle04_2f_3f_14_dasm(DASM_PARAMS); break; // illegal |
| 329 | case 0x15: size = arcompact_handle04_2f_3f_15_dasm(DASM_PARAMS); break; // illegal |
| 330 | case 0x16: size = arcompact_handle04_2f_3f_16_dasm(DASM_PARAMS); break; // illegal |
| 331 | case 0x17: size = arcompact_handle04_2f_3f_17_dasm(DASM_PARAMS); break; // illegal |
| 332 | case 0x18: size = arcompact_handle04_2f_3f_18_dasm(DASM_PARAMS); break; // illegal |
| 333 | case 0x19: size = arcompact_handle04_2f_3f_19_dasm(DASM_PARAMS); break; // illegal |
| 334 | case 0x1a: size = arcompact_handle04_2f_3f_1a_dasm(DASM_PARAMS); break; // illegal |
| 335 | case 0x1b: size = arcompact_handle04_2f_3f_1b_dasm(DASM_PARAMS); break; // illegal |
| 336 | case 0x1c: size = arcompact_handle04_2f_3f_1c_dasm(DASM_PARAMS); break; // illegal |
| 337 | case 0x1d: size = arcompact_handle04_2f_3f_1d_dasm(DASM_PARAMS); break; // illegal |
| 338 | case 0x1e: size = arcompact_handle04_2f_3f_1e_dasm(DASM_PARAMS); break; // illegal |
| 339 | case 0x1f: size = arcompact_handle04_2f_3f_1f_dasm(DASM_PARAMS); break; // illegal |
| 340 | case 0x20: size = arcompact_handle04_2f_3f_20_dasm(DASM_PARAMS); break; // illegal |
| 341 | case 0x21: size = arcompact_handle04_2f_3f_21_dasm(DASM_PARAMS); break; // illegal |
| 342 | case 0x22: size = arcompact_handle04_2f_3f_22_dasm(DASM_PARAMS); break; // illegal |
| 343 | case 0x23: size = arcompact_handle04_2f_3f_23_dasm(DASM_PARAMS); break; // illegal |
| 344 | case 0x24: size = arcompact_handle04_2f_3f_24_dasm(DASM_PARAMS); break; // illegal |
| 345 | case 0x25: size = arcompact_handle04_2f_3f_25_dasm(DASM_PARAMS); break; // illegal |
| 346 | case 0x26: size = arcompact_handle04_2f_3f_26_dasm(DASM_PARAMS); break; // illegal |
| 347 | case 0x27: size = arcompact_handle04_2f_3f_27_dasm(DASM_PARAMS); break; // illegal |
| 348 | case 0x28: size = arcompact_handle04_2f_3f_28_dasm(DASM_PARAMS); break; // illegal |
| 349 | case 0x29: size = arcompact_handle04_2f_3f_29_dasm(DASM_PARAMS); break; // illegal |
| 350 | case 0x2a: size = arcompact_handle04_2f_3f_2a_dasm(DASM_PARAMS); break; // illegal |
| 351 | case 0x2b: size = arcompact_handle04_2f_3f_2b_dasm(DASM_PARAMS); break; // illegal |
| 352 | case 0x2c: size = arcompact_handle04_2f_3f_2c_dasm(DASM_PARAMS); break; // illegal |
| 353 | case 0x2d: size = arcompact_handle04_2f_3f_2d_dasm(DASM_PARAMS); break; // illegal |
| 354 | case 0x2e: size = arcompact_handle04_2f_3f_2e_dasm(DASM_PARAMS); break; // illegal |
| 355 | case 0x2f: size = arcompact_handle04_2f_3f_2f_dasm(DASM_PARAMS); break; // illegal |
| 356 | case 0x30: size = arcompact_handle04_2f_3f_30_dasm(DASM_PARAMS); break; // illegal |
| 357 | case 0x31: size = arcompact_handle04_2f_3f_31_dasm(DASM_PARAMS); break; // illegal |
| 358 | case 0x32: size = arcompact_handle04_2f_3f_32_dasm(DASM_PARAMS); break; // illegal |
| 359 | case 0x33: size = arcompact_handle04_2f_3f_33_dasm(DASM_PARAMS); break; // illegal |
| 360 | case 0x34: size = arcompact_handle04_2f_3f_34_dasm(DASM_PARAMS); break; // illegal |
| 361 | case 0x35: size = arcompact_handle04_2f_3f_35_dasm(DASM_PARAMS); break; // illegal |
| 362 | case 0x36: size = arcompact_handle04_2f_3f_36_dasm(DASM_PARAMS); break; // illegal |
| 363 | case 0x37: size = arcompact_handle04_2f_3f_37_dasm(DASM_PARAMS); break; // illegal |
| 364 | case 0x38: size = arcompact_handle04_2f_3f_38_dasm(DASM_PARAMS); break; // illegal |
| 365 | case 0x39: size = arcompact_handle04_2f_3f_39_dasm(DASM_PARAMS); break; // illegal |
| 366 | case 0x3a: size = arcompact_handle04_2f_3f_3a_dasm(DASM_PARAMS); break; // illegal |
| 367 | case 0x3b: size = arcompact_handle04_2f_3f_3b_dasm(DASM_PARAMS); break; // illegal |
| 368 | case 0x3c: size = arcompact_handle04_2f_3f_3c_dasm(DASM_PARAMS); break; // illegal |
| 369 | case 0x3d: size = arcompact_handle04_2f_3f_3d_dasm(DASM_PARAMS); break; // illegal |
| 370 | case 0x3e: size = arcompact_handle04_2f_3f_3e_dasm(DASM_PARAMS); break; // illegal |
| 371 | case 0x3f: size = arcompact_handle04_2f_3f_3f_dasm(DASM_PARAMS); break; // illegal |
| 372 | } |
| 373 | |
| 374 | return size; |
| 375 | } |
| 376 | |
| 377 | // this is an Extension ALU group, maybe optional on some CPUs? |
| 378 | int arcompact_handle05_dasm(DASM_OPS_32) |
| 379 | { |
| 380 | int size = 4; |
| 381 | UINT8 subinstr = (op & 0x003f0000) >> 16; |
| 382 | op &= ~0x003f0000; |
| 383 | |
| 384 | switch (subinstr) |
| 385 | { |
| 386 | case 0x00: size = arcompact_handle05_00_dasm(DASM_PARAMS); break; // ASL |
| 387 | case 0x01: size = arcompact_handle05_01_dasm(DASM_PARAMS); break; // LSR |
| 388 | case 0x02: size = arcompact_handle05_02_dasm(DASM_PARAMS); break; // ASR |
| 389 | case 0x03: size = arcompact_handle05_03_dasm(DASM_PARAMS); break; // ROR |
| 390 | case 0x04: size = arcompact_handle05_04_dasm(DASM_PARAMS); break; // MUL64 |
| 391 | case 0x05: size = arcompact_handle05_05_dasm(DASM_PARAMS); break; // MULU64 |
| 392 | case 0x06: size = arcompact_handle05_06_dasm(DASM_PARAMS); break; // ADDS |
| 393 | case 0x07: size = arcompact_handle05_07_dasm(DASM_PARAMS); break; // SUBS |
| 394 | case 0x08: size = arcompact_handle05_08_dasm(DASM_PARAMS); break; // DIVAW |
| 395 | case 0x09: size = arcompact_handle05_09_dasm(DASM_PARAMS); break; // illegal |
| 396 | case 0x0a: size = arcompact_handle05_0a_dasm(DASM_PARAMS); break; // ASLS |
| 397 | case 0x0b: size = arcompact_handle05_0b_dasm(DASM_PARAMS); break; // ASRS |
| 398 | case 0x0c: size = arcompact_handle05_0c_dasm(DASM_PARAMS); break; // illegal |
| 399 | case 0x0d: size = arcompact_handle05_0d_dasm(DASM_PARAMS); break; // illegal |
| 400 | case 0x0e: size = arcompact_handle05_0e_dasm(DASM_PARAMS); break; // illegal |
| 401 | case 0x0f: size = arcompact_handle05_0f_dasm(DASM_PARAMS); break; // illegal |
| 402 | case 0x10: size = arcompact_handle05_10_dasm(DASM_PARAMS); break; // illegal |
| 403 | case 0x11: size = arcompact_handle05_11_dasm(DASM_PARAMS); break; // illegal |
| 404 | case 0x12: size = arcompact_handle05_12_dasm(DASM_PARAMS); break; // illegal |
| 405 | case 0x13: size = arcompact_handle05_13_dasm(DASM_PARAMS); break; // illegal |
| 406 | case 0x14: size = arcompact_handle05_14_dasm(DASM_PARAMS); break; // illegal |
| 407 | case 0x15: size = arcompact_handle05_15_dasm(DASM_PARAMS); break; // illegal |
| 408 | case 0x16: size = arcompact_handle05_16_dasm(DASM_PARAMS); break; // illegal |
| 409 | case 0x17: size = arcompact_handle05_17_dasm(DASM_PARAMS); break; // illegal |
| 410 | case 0x18: size = arcompact_handle05_18_dasm(DASM_PARAMS); break; // illegal |
| 411 | case 0x19: size = arcompact_handle05_19_dasm(DASM_PARAMS); break; // illegal |
| 412 | case 0x1a: size = arcompact_handle05_1a_dasm(DASM_PARAMS); break; // illegal |
| 413 | case 0x1b: size = arcompact_handle05_1b_dasm(DASM_PARAMS); break; // illegal |
| 414 | case 0x1c: size = arcompact_handle05_1c_dasm(DASM_PARAMS); break; // illegal |
| 415 | case 0x1d: size = arcompact_handle05_1d_dasm(DASM_PARAMS); break; // illegal |
| 416 | case 0x1e: size = arcompact_handle05_1e_dasm(DASM_PARAMS); break; // illegal |
| 417 | case 0x1f: size = arcompact_handle05_1f_dasm(DASM_PARAMS); break; // illegal |
| 418 | case 0x20: size = arcompact_handle05_20_dasm(DASM_PARAMS); break; // illegal |
| 419 | case 0x21: size = arcompact_handle05_21_dasm(DASM_PARAMS); break; // illegal |
| 420 | case 0x22: size = arcompact_handle05_22_dasm(DASM_PARAMS); break; // illegal |
| 421 | case 0x23: size = arcompact_handle05_23_dasm(DASM_PARAMS); break; // illegal |
| 422 | case 0x24: size = arcompact_handle05_24_dasm(DASM_PARAMS); break; // illegal |
| 423 | case 0x25: size = arcompact_handle05_25_dasm(DASM_PARAMS); break; // illegal |
| 424 | case 0x26: size = arcompact_handle05_26_dasm(DASM_PARAMS); break; // illegal |
| 425 | case 0x27: size = arcompact_handle05_27_dasm(DASM_PARAMS); break; // illegal |
| 426 | case 0x28: size = arcompact_handle05_28_dasm(DASM_PARAMS); break; // ADDSDW |
| 427 | case 0x29: size = arcompact_handle05_29_dasm(DASM_PARAMS); break; // SUBSDW |
| 428 | case 0x2a: size = arcompact_handle05_2a_dasm(DASM_PARAMS); break; // illegal |
| 429 | case 0x2b: size = arcompact_handle05_2b_dasm(DASM_PARAMS); break; // illegal |
| 430 | case 0x2c: size = arcompact_handle05_2c_dasm(DASM_PARAMS); break; // illegal |
| 431 | case 0x2d: size = arcompact_handle05_2d_dasm(DASM_PARAMS); break; // illegal |
| 432 | case 0x2e: size = arcompact_handle05_2e_dasm(DASM_PARAMS); break; // illegal |
| 433 | case 0x2f: size = arcompact_handle05_2f_dasm(DASM_PARAMS); break; // SOPs |
| 434 | case 0x30: size = arcompact_handle05_30_dasm(DASM_PARAMS); break; // illegal |
| 435 | case 0x31: size = arcompact_handle05_31_dasm(DASM_PARAMS); break; // illegal |
| 436 | case 0x32: size = arcompact_handle05_32_dasm(DASM_PARAMS); break; // illegal |
| 437 | case 0x33: size = arcompact_handle05_33_dasm(DASM_PARAMS); break; // illegal |
| 438 | case 0x34: size = arcompact_handle05_34_dasm(DASM_PARAMS); break; // illegal |
| 439 | case 0x35: size = arcompact_handle05_35_dasm(DASM_PARAMS); break; // illegal |
| 440 | case 0x36: size = arcompact_handle05_36_dasm(DASM_PARAMS); break; // illegal |
| 441 | case 0x37: size = arcompact_handle05_37_dasm(DASM_PARAMS); break; // illegal |
| 442 | case 0x38: size = arcompact_handle05_38_dasm(DASM_PARAMS); break; // illegal |
| 443 | case 0x39: size = arcompact_handle05_39_dasm(DASM_PARAMS); break; // illegal |
| 444 | case 0x3a: size = arcompact_handle05_3a_dasm(DASM_PARAMS); break; // illegal |
| 445 | case 0x3b: size = arcompact_handle05_3b_dasm(DASM_PARAMS); break; // illegal |
| 446 | case 0x3c: size = arcompact_handle05_3c_dasm(DASM_PARAMS); break; // illegal |
| 447 | case 0x3d: size = arcompact_handle05_3d_dasm(DASM_PARAMS); break; // illegal |
| 448 | case 0x3e: size = arcompact_handle05_3e_dasm(DASM_PARAMS); break; // illegal |
| 449 | case 0x3f: size = arcompact_handle05_3f_dasm(DASM_PARAMS); break; // illegal |
| 450 | } |
| 451 | |
| 452 | return size; |
| 453 | } |
| 454 | |
| 455 | int arcompact_handle0c_dasm(DASM_OPS_16) |
| 456 | { |
| 457 | int size = 2; |
| 458 | UINT8 subinstr = (op & 0x0018) >> 3; |
| 459 | op &= ~0x0018; |
| 460 | |
| 461 | switch (subinstr) |
| 462 | { |
| 463 | case 0x00: size = arcompact_handle0c_00_dasm(DASM_PARAMS); break; // LD_S |
| 464 | case 0x01: size = arcompact_handle0c_01_dasm(DASM_PARAMS); break; // LDB_S |
| 465 | case 0x02: size = arcompact_handle0c_02_dasm(DASM_PARAMS); break; // LDW_S |
| 466 | case 0x03: size = arcompact_handle0c_03_dasm(DASM_PARAMS); break; // ADD_S |
| 467 | } |
| 468 | return size; |
| 469 | } |
| 470 | |
| 471 | int arcompact_handle0d_dasm(DASM_OPS_16) |
| 472 | { |
| 473 | int size = 2; |
| 474 | UINT8 subinstr = (op & 0x0018) >> 3; |
| 475 | op &= ~0x0018; |
| 476 | |
| 477 | switch (subinstr) |
| 478 | { |
| 479 | case 0x00: size = arcompact_handle0d_00_dasm(DASM_PARAMS); break; // ADD_S |
| 480 | case 0x01: size = arcompact_handle0d_01_dasm(DASM_PARAMS); break; // SUB_S |
| 481 | case 0x02: size = arcompact_handle0d_02_dasm(DASM_PARAMS); break; // ASL_S |
| 482 | case 0x03: size = arcompact_handle0d_03_dasm(DASM_PARAMS); break; // ASR_S |
| 483 | } |
| 484 | return size; |
| 485 | } |
| 486 | |
| 487 | int arcompact_handle0e_dasm(DASM_OPS_16) |
| 488 | { |
| 489 | int size = 2; |
| 490 | UINT8 subinstr = (op & 0x0018) >> 3; |
| 491 | op &= ~0x0018; |
| 492 | |
| 493 | switch (subinstr) |
| 494 | { |
| 495 | case 0x00: size = arcompact_handle0e_00_dasm(DASM_PARAMS); break; // ADD_S |
| 496 | case 0x01: size = arcompact_handle0e_01_dasm(DASM_PARAMS); break; // MOV_S |
| 497 | case 0x02: size = arcompact_handle0e_02_dasm(DASM_PARAMS); break; // CMP_S |
| 498 | case 0x03: size = arcompact_handle0e_03_dasm(DASM_PARAMS); break; // MOV_S |
| 499 | } |
| 500 | return size; |
| 501 | } |
| 502 | |
| 503 | int arcompact_handle0f_dasm(DASM_OPS_16) |
| 504 | { |
| 505 | int size = 2; |
| 506 | // General Register Instructions (16-bit) |
| 507 | // 01111 bbb ccc iiiii |
| 508 | UINT8 subinstr = (op & 0x01f) >> 0; |
| 509 | op &= ~0x001f; |
| 510 | |
| 511 | switch (subinstr) |
| 512 | { |
| 513 | case 0x00: size = arcompact_handle0f_00_dasm(DASM_PARAMS); break; // SOPs |
| 514 | case 0x01: size = arcompact_handle0f_01_dasm(DASM_PARAMS); break; // 0x01 <illegal> |
| 515 | case 0x02: size = arcompact_handle0f_02_dasm(DASM_PARAMS); break; // SUB_S |
| 516 | case 0x03: size = arcompact_handle0f_03_dasm(DASM_PARAMS); break; // 0x03 <illegal> |
| 517 | case 0x04: size = arcompact_handle0f_04_dasm(DASM_PARAMS); break; // AND_S |
| 518 | case 0x05: size = arcompact_handle0f_05_dasm(DASM_PARAMS); break; // OR_S |
| 519 | case 0x06: size = arcompact_handle0f_06_dasm(DASM_PARAMS); break; // BIC_S |
| 520 | case 0x07: size = arcompact_handle0f_07_dasm(DASM_PARAMS); break; // XOR_S |
| 521 | case 0x08: size = arcompact_handle0f_08_dasm(DASM_PARAMS); break; // 0x08 <illegal> |
| 522 | case 0x09: size = arcompact_handle0f_09_dasm(DASM_PARAMS); break; // 0x09 <illegal> |
| 523 | case 0x0a: size = arcompact_handle0f_0a_dasm(DASM_PARAMS); break; // 0x0a <illegal> |
| 524 | case 0x0b: size = arcompact_handle0f_0b_dasm(DASM_PARAMS); break; // TST_S |
| 525 | case 0x0c: size = arcompact_handle0f_0c_dasm(DASM_PARAMS); break; // MUL64_S |
| 526 | case 0x0d: size = arcompact_handle0f_0d_dasm(DASM_PARAMS); break; // SEXB_S |
| 527 | case 0x0e: size = arcompact_handle0f_0e_dasm(DASM_PARAMS); break; // SEXW_S |
| 528 | case 0x0f: size = arcompact_handle0f_0f_dasm(DASM_PARAMS); break; // EXTB_S |
| 529 | case 0x10: size = arcompact_handle0f_10_dasm(DASM_PARAMS); break; // EXTW_S |
| 530 | case 0x11: size = arcompact_handle0f_11_dasm(DASM_PARAMS); break; // ABS_S |
| 531 | case 0x12: size = arcompact_handle0f_12_dasm(DASM_PARAMS); break; // NOT_S |
| 532 | case 0x13: size = arcompact_handle0f_13_dasm(DASM_PARAMS); break; // NEG_S |
| 533 | case 0x14: size = arcompact_handle0f_14_dasm(DASM_PARAMS); break; // ADD1_S |
| 534 | case 0x15: size = arcompact_handle0f_15_dasm(DASM_PARAMS); break; // ADD2_S |
| 535 | case 0x16: size = arcompact_handle0f_16_dasm(DASM_PARAMS); break; // ADD3_S |
| 536 | case 0x17: size = arcompact_handle0f_17_dasm(DASM_PARAMS); break; // 0x17 <illegal> |
| 537 | case 0x18: size = arcompact_handle0f_18_dasm(DASM_PARAMS); break; // ASL_S (multiple) |
| 538 | case 0x19: size = arcompact_handle0f_19_dasm(DASM_PARAMS); break; // LSR_S (multiple) |
| 539 | case 0x1a: size = arcompact_handle0f_1a_dasm(DASM_PARAMS); break; // ASR_S (multiple) |
| 540 | case 0x1b: size = arcompact_handle0f_1b_dasm(DASM_PARAMS); break; // ASL_S (single) |
| 541 | case 0x1c: size = arcompact_handle0f_1c_dasm(DASM_PARAMS); break; // LSR_S (single) |
| 542 | case 0x1d: size = arcompact_handle0f_1d_dasm(DASM_PARAMS); break; // ASR_S (single) |
| 543 | case 0x1e: size = arcompact_handle0f_1e_dasm(DASM_PARAMS); break; // TRAP (not a5?) |
| 544 | case 0x1f: size = arcompact_handle0f_1f_dasm(DASM_PARAMS); break; // BRK_S ( 0x7fff only? ) |
| 545 | |
| 546 | } |
| 547 | return size; |
| 548 | } |
| 549 | |
| 550 | int arcompact_handle0f_00_dasm(DASM_OPS_16) |
| 551 | { |
| 552 | int size = 2; |
| 553 | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 554 | op &= ~0x00e0; |
| 555 | |
| 556 | switch (subinstr) |
| 557 | { |
| 558 | case 0x00: size = arcompact_handle0f_00_00_dasm(DASM_PARAMS); break; // J_S |
| 559 | case 0x01: size = arcompact_handle0f_00_01_dasm(DASM_PARAMS); break; // J_S.D |
| 560 | case 0x02: size = arcompact_handle0f_00_02_dasm(DASM_PARAMS); break; // JL_S |
| 561 | case 0x03: size = arcompact_handle0f_00_03_dasm(DASM_PARAMS); break; // JL_S.D |
| 562 | case 0x04: size = arcompact_handle0f_00_04_dasm(DASM_PARAMS); break; // 0x04 <illegal> |
| 563 | case 0x05: size = arcompact_handle0f_00_05_dasm(DASM_PARAMS); break; // 0x05 <illegal> |
| 564 | case 0x06: size = arcompact_handle0f_00_06_dasm(DASM_PARAMS); break; // SUB_S.NE |
| 565 | case 0x07: size = arcompact_handle0f_00_07_dasm(DASM_PARAMS); break; // ZOPs |
| 566 | |
| 567 | } |
| 568 | |
| 569 | return size; |
| 570 | } |
| 571 | |
| 572 | int arcompact_handle0f_00_07_dasm(DASM_OPS_16) |
| 573 | { |
| 574 | int size = 2; |
| 575 | // General Operations w/o Register |
| 576 | // 01111 iii 111 00000 |
| 577 | UINT8 subinstr3 = (op & 0x0700) >> 8; |
| 578 | op &= ~0x0700; |
| 579 | |
| 580 | switch (subinstr3) |
| 581 | { |
| 582 | case 0x00: size = arcompact_handle0f_00_07_00_dasm(DASM_PARAMS); break; // NOP_S |
| 583 | case 0x01: size = arcompact_handle0f_00_07_01_dasm(DASM_PARAMS); break; // UNIMP_S |
| 584 | case 0x02: size = arcompact_handle0f_00_07_02_dasm(DASM_PARAMS); break; // 0x02 <illegal> |
| 585 | case 0x03: size = arcompact_handle0f_00_07_03_dasm(DASM_PARAMS); break; // 0x03 <illegal> |
| 586 | case 0x04: size = arcompact_handle0f_00_07_04_dasm(DASM_PARAMS); break; // JEQ_S [BLINK] |
| 587 | case 0x05: size = arcompact_handle0f_00_07_05_dasm(DASM_PARAMS); break; // JNE_S [BLINK] |
| 588 | case 0x06: size = arcompact_handle0f_00_07_06_dasm(DASM_PARAMS); break; // J_S [BLINK] |
| 589 | case 0x07: size = arcompact_handle0f_00_07_07_dasm(DASM_PARAMS); break; // J_S.D [BLINK] |
| 590 | |
| 591 | } |
| 592 | return size; |
| 593 | } |
| 594 | |
| 595 | int arcompact_handle17_dasm(DASM_OPS_16) |
| 596 | { |
| 597 | int size = 2; |
| 598 | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 599 | op &= ~0x00e0; |
| 600 | |
| 601 | switch (subinstr) |
| 602 | { |
| 603 | case 0x00: size = arcompact_handle17_00_dasm(DASM_PARAMS); break; // ASL_S |
| 604 | case 0x01: size = arcompact_handle17_01_dasm(DASM_PARAMS); break; // LSR_S |
| 605 | case 0x02: size = arcompact_handle17_02_dasm(DASM_PARAMS); break; // ASR_S |
| 606 | case 0x03: size = arcompact_handle17_03_dasm(DASM_PARAMS); break; // SUB_S |
| 607 | case 0x04: size = arcompact_handle17_04_dasm(DASM_PARAMS); break; // BSET_S |
| 608 | case 0x05: size = arcompact_handle17_05_dasm(DASM_PARAMS); break; // BCLR_S |
| 609 | case 0x06: size = arcompact_handle17_06_dasm(DASM_PARAMS); break; // BMSK_S |
| 610 | case 0x07: size = arcompact_handle17_07_dasm(DASM_PARAMS); break; // BTST_S |
| 611 | } |
| 612 | |
| 613 | return size; |
| 614 | } |
| 615 | |
| 616 | int arcompact_handle18_dasm(DASM_OPS_16) |
| 617 | { |
| 618 | int size = 2; |
| 619 | // Stack Pointer Based Instructions (16-bit) |
| 620 | // 11000 bbb iii uuuuu |
| 621 | UINT8 subinstr = (op & 0x00e0) >> 5; |
| 622 | op &= ~0x00e0; |
| 623 | |
| 624 | switch (subinstr) |
| 625 | { |
| 626 | case 0x00: size = arcompact_handle18_00_dasm(DASM_PARAMS); break; // LD_S (SP) |
| 627 | case 0x01: size = arcompact_handle18_01_dasm(DASM_PARAMS); break; // LDB_S (SP) |
| 628 | case 0x02: size = arcompact_handle18_02_dasm(DASM_PARAMS); break; // ST_S (SP) |
| 629 | case 0x03: size = arcompact_handle18_03_dasm(DASM_PARAMS); break; // STB_S (SP) |
| 630 | case 0x04: size = arcompact_handle18_04_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 631 | case 0x05: size = arcompact_handle18_05_dasm(DASM_PARAMS); break; // subtable 18_05 |
| 632 | case 0x06: size = arcompact_handle18_06_dasm(DASM_PARAMS); break; // subtable 18_06 |
| 633 | case 0x07: size = arcompact_handle18_07_dasm(DASM_PARAMS); break; // subtable 18_07 |
| 634 | } |
| 635 | |
| 636 | return size; |
| 637 | } |
| 638 | |
| 639 | int arcompact_handle18_05_dasm(DASM_OPS_16) |
| 640 | { |
| 641 | int size = 2; |
| 642 | UINT8 subinstr2 = (op & 0x0700) >> 8; |
| 643 | op &= ~0x001f; |
| 644 | |
| 645 | switch (subinstr2) |
| 646 | { |
| 647 | case 0x00: size = arcompact_handle18_05_00_dasm(DASM_PARAMS); break; // ADD_S (SP) |
| 648 | case 0x01: size = arcompact_handle18_05_01_dasm(DASM_PARAMS); break; // SUB_S (SP) |
| 649 | case 0x02: size = arcompact_handle18_05_02_dasm(DASM_PARAMS); break; // <illegal 0x18_05_02> |
| 650 | case 0x03: size = arcompact_handle18_05_03_dasm(DASM_PARAMS); break; // <illegal 0x18_05_03> |
| 651 | case 0x04: size = arcompact_handle18_05_04_dasm(DASM_PARAMS); break; // <illegal 0x18_05_04> |
| 652 | case 0x05: size = arcompact_handle18_05_05_dasm(DASM_PARAMS); break; // <illegal 0x18_05_05> |
| 653 | case 0x06: size = arcompact_handle18_05_06_dasm(DASM_PARAMS); break; // <illegal 0x18_05_06> |
| 654 | case 0x07: size = arcompact_handle18_05_07_dasm(DASM_PARAMS); break; // <illegal 0x18_05_07> |
| 655 | } |
| 656 | |
| 657 | return size; |
| 658 | } |
| 659 | |
| 660 | int arcompact_handle18_06_dasm(DASM_OPS_16) |
| 661 | { |
| 662 | int size = 2; |
| 663 | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 664 | op &= ~0x001f; |
| 665 | |
| 666 | switch (subinstr2) |
| 667 | { |
| 668 | case 0x00: size = arcompact_handle18_06_00_dasm(DASM_PARAMS); break; // <illegal 0x18_06_00> |
| 669 | case 0x01: size = arcompact_handle18_06_01_dasm(DASM_PARAMS); break; // POP_S b |
| 670 | case 0x02: size = arcompact_handle18_06_02_dasm(DASM_PARAMS); break; // <illegal 0x18_06_02> |
| 671 | case 0x03: size = arcompact_handle18_06_03_dasm(DASM_PARAMS); break; // <illegal 0x18_06_03> |
| 672 | case 0x04: size = arcompact_handle18_06_04_dasm(DASM_PARAMS); break; // <illegal 0x18_06_04> |
| 673 | case 0x05: size = arcompact_handle18_06_05_dasm(DASM_PARAMS); break; // <illegal 0x18_06_05> |
| 674 | case 0x06: size = arcompact_handle18_06_06_dasm(DASM_PARAMS); break; // <illegal 0x18_06_06> |
| 675 | case 0x07: size = arcompact_handle18_06_07_dasm(DASM_PARAMS); break; // <illegal 0x18_06_07> |
| 676 | case 0x08: size = arcompact_handle18_06_08_dasm(DASM_PARAMS); break; // <illegal 0x18_06_08> |
| 677 | case 0x09: size = arcompact_handle18_06_09_dasm(DASM_PARAMS); break; // <illegal 0x18_06_09> |
| 678 | case 0x0a: size = arcompact_handle18_06_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0a> |
| 679 | case 0x0b: size = arcompact_handle18_06_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0b> |
| 680 | case 0x0c: size = arcompact_handle18_06_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0c> |
| 681 | case 0x0d: size = arcompact_handle18_06_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0d> |
| 682 | case 0x0e: size = arcompact_handle18_06_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0e> |
| 683 | case 0x0f: size = arcompact_handle18_06_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_0f> |
| 684 | case 0x10: size = arcompact_handle18_06_10_dasm(DASM_PARAMS); break; // <illegal 0x18_06_10> |
| 685 | case 0x11: size = arcompact_handle18_06_11_dasm(DASM_PARAMS); break; // POP_S blink |
| 686 | case 0x12: size = arcompact_handle18_06_12_dasm(DASM_PARAMS); break; // <illegal 0x18_06_12> |
| 687 | case 0x13: size = arcompact_handle18_06_13_dasm(DASM_PARAMS); break; // <illegal 0x18_06_13> |
| 688 | case 0x14: size = arcompact_handle18_06_14_dasm(DASM_PARAMS); break; // <illegal 0x18_06_14> |
| 689 | case 0x15: size = arcompact_handle18_06_15_dasm(DASM_PARAMS); break; // <illegal 0x18_06_15> |
| 690 | case 0x16: size = arcompact_handle18_06_16_dasm(DASM_PARAMS); break; // <illegal 0x18_06_16> |
| 691 | case 0x17: size = arcompact_handle18_06_17_dasm(DASM_PARAMS); break; // <illegal 0x18_06_17> |
| 692 | case 0x18: size = arcompact_handle18_06_18_dasm(DASM_PARAMS); break; // <illegal 0x18_06_18> |
| 693 | case 0x19: size = arcompact_handle18_06_19_dasm(DASM_PARAMS); break; // <illegal 0x18_06_19> |
| 694 | case 0x1a: size = arcompact_handle18_06_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1a> |
| 695 | case 0x1b: size = arcompact_handle18_06_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1b> |
| 696 | case 0x1c: size = arcompact_handle18_06_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1c> |
| 697 | case 0x1d: size = arcompact_handle18_06_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1d> |
| 698 | case 0x1e: size = arcompact_handle18_06_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1e> |
| 699 | case 0x1f: size = arcompact_handle18_06_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_06_1f> |
| 700 | } |
| 701 | |
| 702 | return size; |
| 703 | } |
| 704 | |
| 705 | int arcompact_handle18_07_dasm(DASM_OPS_16) |
| 706 | { |
| 707 | int size = 2; |
| 708 | UINT8 subinstr2 = (op & 0x001f) >> 0; |
| 709 | op &= ~0x001f; |
| 710 | |
| 711 | switch (subinstr2) |
| 712 | { |
| 713 | case 0x00: size = arcompact_handle18_07_00_dasm(DASM_PARAMS); break; // <illegal 0x18_07_00> |
| 714 | case 0x01: size = arcompact_handle18_07_01_dasm(DASM_PARAMS); break; // PUSH_S b |
| 715 | case 0x02: size = arcompact_handle18_07_02_dasm(DASM_PARAMS); break; // <illegal 0x18_07_02> |
| 716 | case 0x03: size = arcompact_handle18_07_03_dasm(DASM_PARAMS); break; // <illegal 0x18_07_03> |
| 717 | case 0x04: size = arcompact_handle18_07_04_dasm(DASM_PARAMS); break; // <illegal 0x18_07_04> |
| 718 | case 0x05: size = arcompact_handle18_07_05_dasm(DASM_PARAMS); break; // <illegal 0x18_07_05> |
| 719 | case 0x06: size = arcompact_handle18_07_06_dasm(DASM_PARAMS); break; // <illegal 0x18_07_06> |
| 720 | case 0x07: size = arcompact_handle18_07_07_dasm(DASM_PARAMS); break; // <illegal 0x18_07_07> |
| 721 | case 0x08: size = arcompact_handle18_07_08_dasm(DASM_PARAMS); break; // <illegal 0x18_07_08> |
| 722 | case 0x09: size = arcompact_handle18_07_09_dasm(DASM_PARAMS); break; // <illegal 0x18_07_09> |
| 723 | case 0x0a: size = arcompact_handle18_07_0a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0a> |
| 724 | case 0x0b: size = arcompact_handle18_07_0b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0b> |
| 725 | case 0x0c: size = arcompact_handle18_07_0c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0c> |
| 726 | case 0x0d: size = arcompact_handle18_07_0d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0d> |
| 727 | case 0x0e: size = arcompact_handle18_07_0e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0e> |
| 728 | case 0x0f: size = arcompact_handle18_07_0f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_0f> |
| 729 | case 0x10: size = arcompact_handle18_07_10_dasm(DASM_PARAMS); break; // <illegal 0x18_07_10> |
| 730 | case 0x11: size = arcompact_handle18_07_11_dasm(DASM_PARAMS); break; // PUSH_S blink |
| 731 | case 0x12: size = arcompact_handle18_07_12_dasm(DASM_PARAMS); break; // <illegal 0x18_07_12> |
| 732 | case 0x13: size = arcompact_handle18_07_13_dasm(DASM_PARAMS); break; // <illegal 0x18_07_13> |
| 733 | case 0x14: size = arcompact_handle18_07_14_dasm(DASM_PARAMS); break; // <illegal 0x18_07_14> |
| 734 | case 0x15: size = arcompact_handle18_07_15_dasm(DASM_PARAMS); break; // <illegal 0x18_07_15> |
| 735 | case 0x16: size = arcompact_handle18_07_16_dasm(DASM_PARAMS); break; // <illegal 0x18_07_16> |
| 736 | case 0x17: size = arcompact_handle18_07_17_dasm(DASM_PARAMS); break; // <illegal 0x18_07_17> |
| 737 | case 0x18: size = arcompact_handle18_07_18_dasm(DASM_PARAMS); break; // <illegal 0x18_07_18> |
| 738 | case 0x19: size = arcompact_handle18_07_19_dasm(DASM_PARAMS); break; // <illegal 0x18_07_19> |
| 739 | case 0x1a: size = arcompact_handle18_07_1a_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1a> |
| 740 | case 0x1b: size = arcompact_handle18_07_1b_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1b> |
| 741 | case 0x1c: size = arcompact_handle18_07_1c_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1c> |
| 742 | case 0x1d: size = arcompact_handle18_07_1d_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1d> |
| 743 | case 0x1e: size = arcompact_handle18_07_1e_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1e> |
| 744 | case 0x1f: size = arcompact_handle18_07_1f_dasm(DASM_PARAMS); break; // <illegal 0x18_07_1f> |
| 745 | } |
| 746 | |
| 747 | return size; |
| 748 | } |
| 749 | |
| 750 | int arcompact_handle19_dasm(DASM_OPS_16) |
| 751 | { |
| 752 | int size = 2; |
| 753 | UINT8 subinstr = (op & 0x0600) >> 9; |
| 754 | op &= ~0x0600; |
| 755 | |
| 756 | switch (subinstr) |
| 757 | { |
| 758 | case 0x00: size = arcompact_handle19_00_dasm(DASM_PARAMS); break; // LD_S (GP) |
| 759 | case 0x01: size = arcompact_handle19_01_dasm(DASM_PARAMS); break; // LDB_S (GP) |
| 760 | case 0x02: size = arcompact_handle19_02_dasm(DASM_PARAMS); break; // LDW_S (GP) |
| 761 | case 0x03: size = arcompact_handle19_03_dasm(DASM_PARAMS); break; // ADD_S (GP) |
| 762 | } |
| 763 | return size; |
| 764 | } |
| 765 | |
| 766 | int arcompact_handle1c_dasm(DASM_OPS_16) |
| 767 | { |
| 768 | int size = 2; |
| 769 | UINT8 subinstr = (op & 0x0080) >> 7; |
| 770 | op &= ~0x0080; |
| 771 | |
| 772 | switch (subinstr) |
| 773 | { |
| 774 | case 0x00: size = arcompact_handle1c_00_dasm(DASM_PARAMS); break; // ADD_S |
| 775 | case 0x01: size = arcompact_handle1c_01_dasm(DASM_PARAMS); break; // CMP_S |
| 776 | } |
| 777 | return size; |
| 778 | } |
| 779 | |
| 780 | int arcompact_handle1d_dasm(DASM_OPS_16) |
| 781 | { |
| 782 | int size = 2; |
| 783 | UINT8 subinstr = (op & 0x0080) >> 7; |
| 784 | op &= ~0x0080; |
| 785 | |
| 786 | switch (subinstr) |
| 787 | { |
| 788 | case 0x00: size = arcompact_handle1d_00_dasm(DASM_PARAMS); break; // BREQ_S |
| 789 | case 0x01: size = arcompact_handle1d_01_dasm(DASM_PARAMS); break; // BRNE_S |
| 790 | } |
| 791 | return size; |
| 792 | } |
| 793 | |
| 794 | int arcompact_handle1e_dasm(DASM_OPS_16) |
| 795 | { |
| 796 | int size = 2; |
| 797 | UINT8 subinstr = (op & 0x0600) >> 9; |
| 798 | op &= ~0x0600; |
| 799 | |
| 800 | switch (subinstr) |
| 801 | { |
| 802 | case 0x00: size = arcompact_handle1e_00_dasm(DASM_PARAMS); break; // B_S |
| 803 | case 0x01: size = arcompact_handle1e_01_dasm(DASM_PARAMS); break; // BEQ_S |
| 804 | case 0x02: size = arcompact_handle1e_02_dasm(DASM_PARAMS); break; // BNE_S |
| 805 | case 0x03: size = arcompact_handle1e_03_dasm(DASM_PARAMS); break; // Bcc_S |
| 806 | } |
| 807 | return size; |
| 808 | } |
| 809 | |
| 810 | int arcompact_handle1e_03_dasm(DASM_OPS_16) |
| 811 | { |
| 812 | |
| 813 | int size = 2; |
| 814 | UINT8 subinstr2 = (op & 0x01c0) >> 6; |
| 815 | op &= ~0x01c0; |
| 816 | |
| 817 | switch (subinstr2) |
| 818 | { |
| 819 | case 0x00: size = arcompact_handle1e_03_00_dasm(DASM_PARAMS); break; // BGT_S |
| 820 | case 0x01: size = arcompact_handle1e_03_01_dasm(DASM_PARAMS); break; // BGE_S |
| 821 | case 0x02: size = arcompact_handle1e_03_02_dasm(DASM_PARAMS); break; // BLT_S |
| 822 | case 0x03: size = arcompact_handle1e_03_03_dasm(DASM_PARAMS); break; // BLE_S |
| 823 | case 0x04: size = arcompact_handle1e_03_04_dasm(DASM_PARAMS); break; // BHI_S |
| 824 | case 0x05: size = arcompact_handle1e_03_05_dasm(DASM_PARAMS); break; // BHS_S |
| 825 | case 0x06: size = arcompact_handle1e_03_06_dasm(DASM_PARAMS); break; // BLO_S |
| 826 | case 0x07: size = arcompact_handle1e_03_07_dasm(DASM_PARAMS); break; // BLS_S |
| 827 | } |
| 828 | return size; |
| 829 | |
| 830 | } |
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
| r0 | r242414 | |
| 1 | /*********************************\ |
| 2 | |
| 3 | ARCompact disassembler |
| 4 | |
| 5 | \*********************************/ |
| 6 | |
| 7 | #include "emu.h" |
| 8 | #include <stdarg.h> |
| 9 | |
| 10 | #include "arcompactdasm_ops.h" |
| 11 | |
| 12 | char *output; |
| 13 | |
| 14 | static void ATTR_PRINTF(1,2) print(const char *fmt, ...) |
| 15 | { |
| 16 | va_list vl; |
| 17 | |
| 18 | va_start(vl, fmt); |
| 19 | vsprintf(output, fmt, vl); |
| 20 | va_end(vl); |
| 21 | } |
| 22 | |
| 23 | |
| 24 | // condition codes (basic ones are the same as arc |
| 25 | static const char *conditions[0x20] = |
| 26 | { |
| 27 | /* 00 */ "AL", // (aka RA - Always) |
| 28 | /* 01 */ "EQ", // (aka Z - Zero |
| 29 | /* 02 */ "NE", // (aka NZ - Non-Zero) |
| 30 | /* 03 */ "PL", // (aka P - Positive) |
| 31 | /* 04 */ "MI", // (aka N - Negative) |
| 32 | /* 05 */ "CS", // (aka C, LO - Carry set / Lower than) (unsigned) |
| 33 | /* 06 */ "CC", // (aka CC, NC, HS - Carry Clear / Higher or Same) (unsigned) |
| 34 | /* 07 */ "VS", // (aka V - Overflow set) |
| 35 | /* 08 */ "VC", // (aka NV - Overflow clear) |
| 36 | /* 09 */ "GT", // ( - Greater than) (signed) |
| 37 | /* 0a */ "GE", // ( - Greater than or Equal) (signed) |
| 38 | /* 0b */ "LT", // ( - Less than) (signed) |
| 39 | /* 0c */ "LE", // ( - Less than or Equal) (signed) |
| 40 | /* 0d */ "HI", // ( - Higher than) (unsigned) |
| 41 | /* 0e */ "LS", // ( - Lower or Same) (unsigned) |
| 42 | /* 0f */ "PNZ",// ( - Positive non-0 value) |
| 43 | /* 10 */ "0x10 Reserved", // possible CPU implementation specifics |
| 44 | /* 11 */ "0x11 Reserved", |
| 45 | /* 12 */ "0x12 Reserved", |
| 46 | /* 13 */ "0x13 Reserved", |
| 47 | /* 14 */ "0x14 Reserved", |
| 48 | /* 15 */ "0x15 Reserved", |
| 49 | /* 16 */ "0x16 Reserved", |
| 50 | /* 17 */ "0x17 Reserved", |
| 51 | /* 18 */ "0x18 Reserved", |
| 52 | /* 19 */ "0x19 Reserved", |
| 53 | /* 1a */ "0x1a Reserved", |
| 54 | /* 1b */ "0x1b Reserved", |
| 55 | /* 1c */ "0x1c Reserved", |
| 56 | /* 1d */ "0x1d Reserved", |
| 57 | /* 1e */ "0x1e Reserved", |
| 58 | /* 1f */ "0x1f Reserved" |
| 59 | }; |
| 60 | |
| 61 | |
| 62 | //#define EXPLICIT_EXTENSIONS |
| 63 | |
| 64 | static const char *datasize[0x4] = |
| 65 | { |
| 66 | #ifdef EXPLICIT_EXTENSIONS |
| 67 | /* 00 */ ".L", // Dword (default) (can use no extension, using .L to be explicit) |
| 68 | #else |
| 69 | /* 00 */ "",// Dword (default) |
| 70 | #endif |
| 71 | /* 01 */ ".B", // Byte |
| 72 | /* 02 */ ".W", // Word |
| 73 | /* 03 */ ".<illegal data size>" |
| 74 | }; |
| 75 | |
| 76 | static const char *dataextend[0x2] = |
| 77 | { |
| 78 | #ifdef EXPLICIT_EXTENSIONS |
| 79 | /* 00 */ ".ZX", // Zero Extend (can use no extension, using .ZX to be explicit) |
| 80 | else |
| 81 | /* 00 */ "", // Zero Extend |
| 82 | #endif |
| 83 | /* 01 */ ".X" // Sign Extend |
| 84 | }; |
| 85 | |
| 86 | static const char *addressmode[0x4] = |
| 87 | { |
| 88 | #ifdef EXPLICIT_EXTENSIONS |
| 89 | /* 00 */ ".AN", // No Writeback (can use no extension, using .AN to be explicit) |
| 90 | #else |
| 91 | /* 00 */ "", // No Writeback |
| 92 | #endif |
| 93 | /* 01 */ ".AW", // Writeback pre memory access |
| 94 | /* 02 */ ".AB", // Writeback post memory access |
| 95 | /* 03 */ ".AS" // scaled |
| 96 | }; |
| 97 | |
| 98 | static const char *cachebit[0x2] = |
| 99 | { |
| 100 | #ifdef EXPLICIT_EXTENSIONS |
| 101 | /* 00 */ ".EN", // Data Cache Enabled (can use no extension, using .EN to be explicit) |
| 102 | #else |
| 103 | /* 00 */ "", // Data Cache Enabled |
| 104 | #endif |
| 105 | /* 01 */ ".DI" // Direct to Memory (Cache Bypass) |
| 106 | }; |
| 107 | |
| 108 | static const char *flagbit[0x2] = |
| 109 | { |
| 110 | #ifdef EXPLICIT_EXTENSIONS |
| 111 | /* 00 */ ".NF", // Don't Set Flags (can use no extension, using .NF to be explicit) |
| 112 | #else |
| 113 | /* 00 */ "", // Don't Set Flags |
| 114 | #endif |
| 115 | /* 01 */ ".F" // Set Flags |
| 116 | }; |
| 117 | |
| 118 | static const char *delaybit[0x2] = |
| 119 | { |
| 120 | /* 00 */ ".ND", // Don't execute opcode in delay slot |
| 121 | /* 01 */ ".D" // Execute Opcode in delay slot |
| 122 | }; |
| 123 | |
| 124 | |
| 125 | static const char *regnames[0x40] = |
| 126 | { |
| 127 | /* 00 */ "r0", |
| 128 | /* 01 */ "r1", |
| 129 | /* 02 */ "r2", |
| 130 | /* 03 */ "r3", |
| 131 | /* 04 */ "r4", |
| 132 | /* 05 */ "r5", |
| 133 | /* 06 */ "r6", |
| 134 | /* 07 */ "r7", |
| 135 | /* 08 */ "r8", |
| 136 | /* 09 */ "r9", |
| 137 | /* 0a */ "r10", |
| 138 | /* 0b */ "r11", |
| 139 | /* 0c */ "r12", |
| 140 | /* 0d */ "r13", |
| 141 | /* 0e */ "r14", |
| 142 | /* 0f */ "r15", |
| 143 | |
| 144 | /* 10 */ "r16", |
| 145 | /* 11 */ "r17", |
| 146 | /* 12 */ "r18", |
| 147 | /* 13 */ "r19", |
| 148 | /* 14 */ "r20", |
| 149 | /* 15 */ "r21", |
| 150 | /* 16 */ "r22", |
| 151 | /* 17 */ "r23", |
| 152 | /* 18 */ "r24", |
| 153 | /* 19 */ "r25", |
| 154 | /* 1a */ "r26(GP)", |
| 155 | /* 1b */ "r27(FP)", |
| 156 | /* 1c */ "r28(SP)", |
| 157 | /* 1d */ "r29(ILINK1)", |
| 158 | /* 1e */ "r30(ILINK2)", |
| 159 | /* 1f */ "r31(BLINK)", |
| 160 | |
| 161 | /* 20 */ "r32(ext)", |
| 162 | /* 21 */ "r33(ext)", |
| 163 | /* 22 */ "r34(ext)", |
| 164 | /* 23 */ "r35(ext)", |
| 165 | /* 24 */ "r36(ext)", |
| 166 | /* 25 */ "r37(ext)", |
| 167 | /* 26 */ "r38(ext)", |
| 168 | /* 27 */ "r39(ext)", |
| 169 | /* 28 */ "r40(ext)", |
| 170 | /* 29 */ "r41(ext)", |
| 171 | /* 2a */ "r42(ext)", |
| 172 | /* 2b */ "r43(ext)", |
| 173 | /* 2c */ "r44(ext)", |
| 174 | /* 2d */ "r45(ext)", |
| 175 | /* 2e */ "r46(ext)", |
| 176 | /* 2f */ "r47(ext)", |
| 177 | |
| 178 | /* 30 */ "r48(ext)", |
| 179 | /* 31 */ "r49(ext)", |
| 180 | /* 32 */ "r50(ext)", |
| 181 | /* 33 */ "r51(ext)", |
| 182 | /* 34 */ "r52(ext)", |
| 183 | /* 35 */ "r53(ext)", |
| 184 | /* 36 */ "r54(ext)", |
| 185 | /* 37 */ "r55(ext)", |
| 186 | /* 38 */ "r56(ext)", |
| 187 | /* 39 */ "r57(ext)", // MLO (result registers for optional multply functions) |
| 188 | /* 3a */ "r58(ext)", // MMID |
| 189 | /* 3b */ "r59(ext)", // MHI |
| 190 | /* 3c */ "r60(LP_COUNT)", |
| 191 | /* 3d */ "r61(reserved)", |
| 192 | /* 3e */ "r62(LIMM)", // use Long Immediate Data instead of register |
| 193 | /* 3f */ "r63(PCL)" |
| 194 | }; |
| 195 | |
| 196 | |
| 197 | |
| 198 | int arcompact_01_01_00_helper(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext) |
| 199 | { |
| 200 | int size = 4; |
| 201 | |
| 202 | // Branch on Compare / Bit Test - Register-Register |
| 203 | // 00001 bbb sssssss 1 S BBB CCCCCC N 0 iiii |
| 204 | INT32 address = (op & 0x00fe0000) >> 17; |
| 205 | address |= ((op & 0x00008000) >> 15) << 7; |
| 206 | if (address & 0x80) address = -(address & 0x7f); |
| 207 | |
| 208 | int c = (op & 0x00000fc0) >> 6; |
| 209 | int b = (op & 0x07000000) >> 24; |
| 210 | b |= ((op & 0x00007000) >> 12) << 3; |
| 211 | int n = (op & 0x00000020) >> 5; op &= ~0x00000020; |
| 212 | |
| 213 | op &= ~0x07007fe0; |
| 214 | |
| 215 | if ((b != LIMM_REG) && (c != LIMM_REG)) |
| 216 | { |
| 217 | print("%s%s (r%d) (r%d) %08x (%08x)", optext, delaybit[n], b, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 218 | } |
| 219 | else |
| 220 | { |
| 221 | UINT32 limm; |
| 222 | GET_LIMM_32; |
| 223 | size = 8; |
| 224 | |
| 225 | if ((b == LIMM_REG) && (c != LIMM_REG)) |
| 226 | { |
| 227 | print("%s%s (%08x) (r%d) %08x (%08x)", optext, delaybit[n], limm, c, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 228 | } |
| 229 | else if ((c == LIMM_REG) && (b != LIMM_REG)) |
| 230 | { |
| 231 | print("%s%s (r%d) (%08x) %08x (%08x)", optext, delaybit[n], b, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 232 | } |
| 233 | else |
| 234 | { |
| 235 | // b and c are LIMM? invalid?? |
| 236 | print("%s%s (%08x) (%08x) (illegal?) %08x (%08x)", optext, delaybit[n], limm, limm, pc + (address * 2) + 4, op & ~0xf8fe800f); |
| 237 | |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | return size; |
| 242 | } |
| 243 | |
| 244 | #define GET_01_01_01_BRANCH_ADDR \ |
| 245 | INT32 address = (op & 0x00fe0000) >> 17; \ |
| 246 | address |= ((op & 0x00008000) >> 15) << 7; \ |
| 247 | if (address & 0x80) address = -(address & 0x7f); \ |
| 248 | op &= ~ 0x00fe800f; |
| 249 | |
| 250 | |
| 251 | #define GROUP_0e_GET_h \ |
| 252 | h = ((op & 0x0007) << 3); \ |
| 253 | h |= ((op & 0x00e0) >> 5); \ |
| 254 | |
| 255 | // this is as messed up as the rest of the 16-bit alignment in LE mode... |
| 256 | |
| 257 | #define GET_LIMM \ |
| 258 | limm = oprom[4] | (oprom[5] << 8); \ |
| 259 | limm |= (oprom[2] << 16) | (oprom[3] << 24); \ |
| 260 | |
| 261 | |
| 262 | /************************************************************************************************************************************ |
| 263 | * * |
| 264 | * individual opcode handlers (disassembly) * |
| 265 | * * |
| 266 | ************************************************************************************************************************************/ |
| 267 | |
| 268 | int arcompact_handle00_00_dasm(DASM_OPS_32) |
| 269 | { |
| 270 | int size = 4; |
| 271 | // Branch Conditionally |
| 272 | // 00000 ssssssssss 0 SSSSSSSSSS N QQQQQ |
| 273 | INT32 address = (op & 0x07fe0000) >> 17; |
| 274 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 275 | if (address & 0x800000) address = -(address & 0x7fffff); |
| 276 | int n = (op & 0x00000020) >> 5; op &= ~0x00000020; |
| 277 | UINT8 condition = op & 0x0000001f; |
| 278 | |
| 279 | output += sprintf( output, "B%s(%s) %08x", delaybit[n], conditions[condition], pc + (address * 2)); |
| 280 | return size; |
| 281 | } |
| 282 | |
| 283 | int arcompact_handle00_01_dasm(DASM_OPS_32) |
| 284 | { |
| 285 | int size = 4; |
| 286 | // Branch Unconditionally Far |
| 287 | // 00000 ssssssssss 1 SSSSSSSSSS N R TTTT |
| 288 | INT32 address = (op & 0x07fe0000) >> 17; |
| 289 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 290 | address |= ((op & 0x0000000f) >> 0) << 20; |
| 291 | if (address & 0x800000) address = -(address & 0x7fffff); |
| 292 | int n = (op & 0x00000020) >> 5; op &= ~0x00000020; |
| 293 | int res = (op & 0x00000010) >> 4; op &= ~0x00000010; |
| 294 | |
| 295 | output += sprintf( output, "B%s %08x", delaybit[n], pc + (address * 2) ); |
| 296 | if (res) output += sprintf(output, "(reserved bit set)"); |
| 297 | |
| 298 | return size; |
| 299 | } |
| 300 | |
| 301 | int arcompact_handle01_00_00dasm(DASM_OPS_32) |
| 302 | { |
| 303 | int size = 4; |
| 304 | |
| 305 | // Branch and Link Conditionally |
| 306 | // 00001 sssssssss 00 SSSSSSSSSS N QQQQQ |
| 307 | INT32 address = (op & 0x07fc0000) >> 17; |
| 308 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 309 | if (address & 0x800000) address = -(address&0x7fffff); |
| 310 | int n = (op & 0x00000020) >> 5; op &= ~0x00000020; |
| 311 | |
| 312 | UINT8 condition = op & 0x0000001f; |
| 313 | |
| 314 | output += sprintf( output, "BL%s(%s) %08x", delaybit[n], conditions[condition], pc + (address *2) ); |
| 315 | return size; |
| 316 | } |
| 317 | |
| 318 | int arcompact_handle01_00_01dasm(DASM_OPS_32) |
| 319 | { |
| 320 | int size = 4; |
| 321 | // Branch and Link Unconditionally Far |
| 322 | // 00001 sssssssss 10 SSSSSSSSSS N R TTTT |
| 323 | INT32 address = (op & 0x07fc0000) >> 17; |
| 324 | address |= ((op & 0x0000ffc0) >> 6) << 10; |
| 325 | address |= ((op & 0x0000000f) >> 0) << 20; |
| 326 | if (address & 0x800000) address = -(address&0x7fffff); |
| 327 | int n = (op & 0x00000020) >> 5; op &= ~0x00000020; |
| 328 | int res = (op & 0x00000010) >> 4; op &= ~0x00000010; |
| 329 | |
| 330 | output += sprintf( output, "BL%s %08x", delaybit[n], pc + (address *2) ); |
| 331 | if (res) output += sprintf(output, "(reserved bit set)"); |
| 332 | |
| 333 | return size; |
| 334 | } |
| 335 | |
| 336 | int arcompact_handle01_01_00_00_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BREQ b - c"); } |
| 337 | int arcompact_handle01_01_00_01_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRNE b - c"); } |
| 338 | int arcompact_handle01_01_00_02_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRLT b - c"); } |
| 339 | int arcompact_handle01_01_00_03_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRGE b - c"); } |
| 340 | int arcompact_handle01_01_00_04_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRLO b - c"); } |
| 341 | int arcompact_handle01_01_00_05_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BRHS b - c"); } |
| 342 | int arcompact_handle01_01_00_0e_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BBIT0 (b & 1<<c) == 0"); } |
| 343 | int arcompact_handle01_01_00_0f_dasm(DASM_OPS_32) { return arcompact_01_01_00_helper( output, pc, op, oprom, "BBIT1 (b & 1<<c) != 0"); } |
| 344 | |
| 345 | |
| 346 | int arcompact_handle01_01_01_00_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BREQ b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 347 | int arcompact_handle01_01_01_01_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRNE b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 348 | int arcompact_handle01_01_01_02_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRLT b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 349 | int arcompact_handle01_01_01_03_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRGE b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 350 | int arcompact_handle01_01_01_04_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRLO b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 351 | int arcompact_handle01_01_01_05_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BRHS b - u6 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 352 | |
| 353 | |
| 354 | int arcompact_handle01_01_01_0e_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BBIT0 (b & 1<<u6) == 0 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 355 | int arcompact_handle01_01_01_0f_dasm(DASM_OPS_32) { GET_01_01_01_BRANCH_ADDR; print("BBIT1 (b & 1<<u6) != 0 (dst %08x) (%08x)", pc + (address * 2) + 4, op); return 4; } |
| 356 | |
| 357 | |
| 358 | int arcompact_handle02_dasm(DASM_OPS_32) |
| 359 | { |
| 360 | // bitpos |
| 361 | // 1111 1111 1111 1111 0000 0000 0000 0000 |
| 362 | // fedc ba98 7654 3210 fedc ba98 7654 3210 |
| 363 | // fields |
| 364 | // 0001 0bbb ssss ssss SBBB DaaZ ZXAA AAAA |
| 365 | int size = 4; |
| 366 | |
| 367 | int A = (op & 0x0000003f) >> 0; //op &= ~0x0000003f; |
| 368 | int X = (op & 0x00000040) >> 6; //op &= ~0x00000040; |
| 369 | int Z = (op & 0x00000180) >> 7; //op &= ~0x00000180; |
| 370 | int a = (op & 0x00000600) >> 9; //op &= ~0x00000600; |
| 371 | int D = (op & 0x00000800) >> 11;// op &= ~0x00000800; |
| 372 | int B = (op & 0x00007000) >> 12;// op &= ~0x00007000; |
| 373 | int S = (op & 0x00008000) >> 15;// op &= ~0x00008000; |
| 374 | int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000; |
| 375 | int b = (op & 0x07000000) >> 24;// op &= ~0x07000000; |
| 376 | |
| 377 | int breg = b | (B << 3); |
| 378 | int sdat = s | (S << 8); // todo - signed |
| 379 | |
| 380 | UINT32 limm = 0; |
| 381 | if (breg == LIMM_REG) |
| 382 | { |
| 383 | GET_LIMM_32; |
| 384 | size = 8; |
| 385 | } |
| 386 | |
| 387 | output += sprintf( output, "LD"); |
| 388 | output += sprintf( output, "%s", datasize[Z]); |
| 389 | output += sprintf( output, "%s", dataextend[X]); |
| 390 | output += sprintf( output, "%s", addressmode[a]); |
| 391 | output += sprintf( output, "%s", cachebit[D]); |
| 392 | output += sprintf( output, " "); |
| 393 | output += sprintf( output, "%s, ", regnames[A]); |
| 394 | output += sprintf( output, "["); |
| 395 | if (breg == LIMM_REG) output += sprintf( output, "(%08x), ", limm); |
| 396 | else output += sprintf( output, "%s, ", regnames[breg]); |
| 397 | output += sprintf( output, "%d", sdat); |
| 398 | output += sprintf( output, "]"); |
| 399 | |
| 400 | return size; |
| 401 | } |
| 402 | |
| 403 | int arcompact_handle03_dasm(DASM_OPS_32) |
| 404 | { |
| 405 | int size = 4; |
| 406 | // bitpos |
| 407 | // 1111 1111 1111 1111 0000 0000 0000 0000 |
| 408 | // fedc ba98 7654 3210 fedc ba98 7654 3210 |
| 409 | // fields |
| 410 | // 0001 1bbb ssss ssss SBBB CCCC CCDa aZZR |
| 411 | int B = (op & 0x00007000) >> 12;// op &= ~0x00007000; |
| 412 | int S = (op & 0x00008000) >> 15;// op &= ~0x00008000; |
| 413 | int s = (op & 0x00ff0000) >> 16;// op &= ~0x00ff0000; |
| 414 | int b = (op & 0x07000000) >> 24;// op &= ~0x07000000; |
| 415 | |
| 416 | int breg = b | (B << 3); |
| 417 | int sdat = s | (S << 8); // todo - signed |
| 418 | |
| 419 | int R = (op & 0x00000001) >> 0; op &= ~0x00000001; |
| 420 | int Z = (op & 0x00000006) >> 1; op &= ~0x00000006; |
| 421 | int a = (op & 0x00000018) >> 3; op &= ~0x00000018; |
| 422 | int D = (op & 0x00000020) >> 5; op &= ~0x00000020; |
| 423 | int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 424 | |
| 425 | UINT32 limm = 0; |
| 426 | if (breg == LIMM_REG) |
| 427 | { |
| 428 | GET_LIMM_32; |
| 429 | size = 8; |
| 430 | } |
| 431 | |
| 432 | |
| 433 | output += sprintf( output, "ST"); |
| 434 | output += sprintf( output, "%s", datasize[Z]); |
| 435 | output += sprintf( output, "%s", addressmode[a]); |
| 436 | output += sprintf( output, "%s", cachebit[D]); |
| 437 | output += sprintf( output, " "); |
| 438 | |
| 439 | output += sprintf( output, "%s, ", regnames[C]); |
| 440 | if (breg == LIMM_REG) output += sprintf( output, "(%08x), ", limm); |
| 441 | else output += sprintf( output, "%s, ", regnames[breg]); |
| 442 | output += sprintf( output, "%d", sdat); |
| 443 | |
| 444 | if (R) output += sprintf( output, "(reserved bit set)"); |
| 445 | |
| 446 | |
| 447 | return size; |
| 448 | } |
| 449 | |
| 450 | |
| 451 | int arcompact_handle04_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext, int ignore_dst, int b_reserved) |
| 452 | { |
| 453 | // PP |
| 454 | // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA |
| 455 | int size = 4; |
| 456 | |
| 457 | int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000; |
| 458 | int b = (op & 0x07000000) >> 24; op &= ~0x07000000; |
| 459 | int B = (op & 0x00007000) >> 12; op &= ~0x00007000; |
| 460 | int breg = b | (B << 3); |
| 461 | int F = (op & 0x00008000) >> 15;op &= ~0x00008000; |
| 462 | |
| 463 | output += sprintf( output, "%s", optext); |
| 464 | output += sprintf( output, "%s", flagbit[F]); |
| 465 | // output += sprintf( output, " p(%d)", p); |
| 466 | |
| 467 | |
| 468 | if (!b_reserved) |
| 469 | { |
| 470 | output += sprintf(output, " %s, ", regnames[breg]); |
| 471 | } |
| 472 | else |
| 473 | { |
| 474 | if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]); |
| 475 | } |
| 476 | |
| 477 | |
| 478 | if (p == 0) |
| 479 | { |
| 480 | // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA |
| 481 | |
| 482 | int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 483 | int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f; |
| 484 | |
| 485 | if (C == LIMM_REG) |
| 486 | { |
| 487 | UINT32 limm; |
| 488 | GET_LIMM_32; |
| 489 | size = 8; |
| 490 | output += sprintf( output, "(%08x) ", limm ); |
| 491 | if (!ignore_dst) output += sprintf( output, "DST(%s)", regnames[A]); |
| 492 | else |
| 493 | { |
| 494 | if (A) output += sprintf(output, "unused(%s)", regnames[A]); |
| 495 | } |
| 496 | } |
| 497 | else |
| 498 | { |
| 499 | output += sprintf( output, "C(%s) ", regnames[C]); |
| 500 | if (!ignore_dst) output += sprintf( output, "DST(%s)", regnames[A]); |
| 501 | else |
| 502 | { |
| 503 | if (A) output += sprintf(output, "unused(%s)", regnames[A]); |
| 504 | } |
| 505 | |
| 506 | } |
| 507 | } |
| 508 | else if (p == 1) |
| 509 | { |
| 510 | // 0010 0bbb 00ii iiii FBBB UUUU UUAA AAAA |
| 511 | int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 512 | int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f; |
| 513 | |
| 514 | output += sprintf( output, "U(%02x) ", U ); |
| 515 | if (!ignore_dst) output += sprintf( output, "DST(%s)", regnames[A]); |
| 516 | else |
| 517 | { |
| 518 | if (A) output += sprintf(output, "unused(%s)", regnames[A]); |
| 519 | } |
| 520 | } |
| 521 | else if (p == 2) |
| 522 | { |
| 523 | int S = (op & 0x00000fff) >> 0; op &= ~0x00000fff; |
| 524 | output += sprintf( output, "S(%02x)", S); |
| 525 | |
| 526 | } |
| 527 | else if (p == 3) |
| 528 | { |
| 529 | int M = (op & 0x00000020) >> 5; op &= ~0x00000020; |
| 530 | int Q = (op & 0x0000001f) >> 0; op &= ~0x0000001f; |
| 531 | |
| 532 | output += sprintf( output, " M(%d)", M); |
| 533 | output += sprintf( output, " Cond<%s> ", conditions[Q]); |
| 534 | |
| 535 | if (M == 0) |
| 536 | { |
| 537 | int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 538 | output += sprintf( output, "C(%s)", regnames[C]); |
| 539 | |
| 540 | } |
| 541 | else if (M == 1) |
| 542 | { |
| 543 | int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 544 | output += sprintf( output, "U(%02x)", U); |
| 545 | |
| 546 | } |
| 547 | |
| 548 | } |
| 549 | |
| 550 | return size; |
| 551 | } |
| 552 | |
| 553 | int arcompact_handle04_00_dasm(DASM_OPS_32) |
| 554 | { |
| 555 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD", 0,0); |
| 556 | } |
| 557 | |
| 558 | int arcompact_handle04_01_dasm(DASM_OPS_32) |
| 559 | { |
| 560 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADC", 0,0); |
| 561 | } |
| 562 | |
| 563 | int arcompact_handle04_02_dasm(DASM_OPS_32) |
| 564 | { |
| 565 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB", 0,0); |
| 566 | } |
| 567 | |
| 568 | int arcompact_handle04_03_dasm(DASM_OPS_32) |
| 569 | { |
| 570 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SBC", 0,0); |
| 571 | } |
| 572 | |
| 573 | int arcompact_handle04_04_dasm(DASM_OPS_32) |
| 574 | { |
| 575 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "AND", 0,0); |
| 576 | } |
| 577 | |
| 578 | int arcompact_handle04_05_dasm(DASM_OPS_32) |
| 579 | { |
| 580 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "OR", 0,0); |
| 581 | } |
| 582 | |
| 583 | int arcompact_handle04_06_dasm(DASM_OPS_32) |
| 584 | { |
| 585 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BIC", 0,0); |
| 586 | } |
| 587 | |
| 588 | int arcompact_handle04_07_dasm(DASM_OPS_32) |
| 589 | { |
| 590 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "XOR", 0,0); |
| 591 | } |
| 592 | |
| 593 | int arcompact_handle04_08_dasm(DASM_OPS_32) |
| 594 | { |
| 595 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MAX", 0,0); |
| 596 | } |
| 597 | |
| 598 | int arcompact_handle04_09_dasm(DASM_OPS_32) |
| 599 | { |
| 600 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MIN", 0,0); |
| 601 | } |
| 602 | |
| 603 | |
| 604 | int arcompact_handle04_0a_dasm(DASM_OPS_32) |
| 605 | { |
| 606 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MOV", 1,0); |
| 607 | } |
| 608 | |
| 609 | int arcompact_handle04_0b_dasm(DASM_OPS_32) |
| 610 | { |
| 611 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "TST", 1,0); |
| 612 | } |
| 613 | |
| 614 | int arcompact_handle04_0c_dasm(DASM_OPS_32) |
| 615 | { |
| 616 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "CMP", 1,0); |
| 617 | } |
| 618 | |
| 619 | int arcompact_handle04_0d_dasm(DASM_OPS_32) |
| 620 | { |
| 621 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RCMP", 1,0); |
| 622 | } |
| 623 | |
| 624 | int arcompact_handle04_0e_dasm(DASM_OPS_32) |
| 625 | { |
| 626 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RSUB", 0,0); |
| 627 | } |
| 628 | |
| 629 | int arcompact_handle04_0f_dasm(DASM_OPS_32) |
| 630 | { |
| 631 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BSET", 0,0); |
| 632 | } |
| 633 | |
| 634 | int arcompact_handle04_10_dasm(DASM_OPS_32) |
| 635 | { |
| 636 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BCLR", 0,0); |
| 637 | } |
| 638 | |
| 639 | int arcompact_handle04_11_dasm(DASM_OPS_32) |
| 640 | { |
| 641 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BTST", 0,0); |
| 642 | } |
| 643 | |
| 644 | int arcompact_handle04_12_dasm(DASM_OPS_32) |
| 645 | { |
| 646 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BXOR", 0,0); |
| 647 | } |
| 648 | |
| 649 | int arcompact_handle04_13_dasm(DASM_OPS_32) |
| 650 | { |
| 651 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BMSK", 0,0); |
| 652 | } |
| 653 | |
| 654 | int arcompact_handle04_14_dasm(DASM_OPS_32) |
| 655 | { |
| 656 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD1", 0,0); |
| 657 | } |
| 658 | |
| 659 | int arcompact_handle04_15_dasm(DASM_OPS_32) |
| 660 | { |
| 661 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD2", 0,0); |
| 662 | } |
| 663 | |
| 664 | int arcompact_handle04_16_dasm(DASM_OPS_32) |
| 665 | { |
| 666 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD3", 0,0); |
| 667 | } |
| 668 | |
| 669 | int arcompact_handle04_17_dasm(DASM_OPS_32) |
| 670 | { |
| 671 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB1", 0,0); |
| 672 | } |
| 673 | |
| 674 | int arcompact_handle04_18_dasm(DASM_OPS_32) |
| 675 | { |
| 676 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB2", 0,0); |
| 677 | } |
| 678 | |
| 679 | int arcompact_handle04_19_dasm(DASM_OPS_32) |
| 680 | { |
| 681 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB3", 0,0); |
| 682 | } |
| 683 | |
| 684 | int arcompact_handle04_1a_dasm(DASM_OPS_32) |
| 685 | { |
| 686 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPY", 0,0); |
| 687 | } // * |
| 688 | |
| 689 | int arcompact_handle04_1b_dasm(DASM_OPS_32) |
| 690 | { |
| 691 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYH", 0,0); |
| 692 | } // * |
| 693 | |
| 694 | int arcompact_handle04_1c_dasm(DASM_OPS_32) |
| 695 | { |
| 696 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYHU", 0,0); |
| 697 | } // * |
| 698 | |
| 699 | int arcompact_handle04_1d_dasm(DASM_OPS_32) |
| 700 | { |
| 701 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYU", 0,0); |
| 702 | } // * |
| 703 | |
| 704 | |
| 705 | |
| 706 | int arcompact_handle04_20_dasm(DASM_OPS_32) |
| 707 | { |
| 708 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J", 1,1); |
| 709 | } |
| 710 | |
| 711 | |
| 712 | |
| 713 | int arcompact_handle04_21_dasm(DASM_OPS_32) |
| 714 | { |
| 715 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "J.D", 1,1); |
| 716 | } |
| 717 | |
| 718 | int arcompact_handle04_22_dasm(DASM_OPS_32) |
| 719 | { |
| 720 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL", 1,1); |
| 721 | } |
| 722 | |
| 723 | int arcompact_handle04_23_dasm(DASM_OPS_32) |
| 724 | { |
| 725 | return arcompact_handle04_helper_dasm(output, pc, op, oprom, "JL.D", 1,1); |
| 726 | } |
| 727 | |
| 728 | |
| 729 | |
| 730 | |
| 731 | int arcompact_handle04_28_dasm(DASM_OPS_32) { print("LPcc (%08x)", op); return 4;} |
| 732 | int arcompact_handle04_29_dasm(DASM_OPS_32) { print("FLAG (%08x)", op); return 4;} |
| 733 | int arcompact_handle04_2a_dasm(DASM_OPS_32) { print("LR (%08x)", op); return 4;} |
| 734 | int arcompact_handle04_2b_dasm(DASM_OPS_32) { print("SR (%08x)", op); return 4;} |
| 735 | |
| 736 | |
| 737 | int arcompact_handle04_2f_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext) |
| 738 | { |
| 739 | // |
| 740 | // 0010 0bbb pp10 1111 FBBB CCCC CCII IIII |
| 741 | int size = 4; |
| 742 | |
| 743 | int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000; |
| 744 | int b = (op & 0x07000000) >> 24; op &= ~0x07000000; |
| 745 | int B = (op & 0x00007000) >> 12; op &= ~0x00007000; |
| 746 | int breg = b | (B << 3); |
| 747 | int F = (op & 0x00008000) >> 15;op &= ~0x00008000; |
| 748 | |
| 749 | output += sprintf( output, "%s", optext); |
| 750 | output += sprintf( output, "%s", flagbit[F]); |
| 751 | // output += sprintf( output, " p(%d)", p); |
| 752 | |
| 753 | |
| 754 | output += sprintf(output, " %s, ", regnames[breg]); |
| 755 | |
| 756 | |
| 757 | if (p == 0) |
| 758 | { |
| 759 | int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 760 | |
| 761 | if (C == LIMM_REG) |
| 762 | { |
| 763 | UINT32 limm; |
| 764 | GET_LIMM_32; |
| 765 | size = 8; |
| 766 | output += sprintf( output, "(%08x) ", limm ); |
| 767 | |
| 768 | } |
| 769 | else |
| 770 | { |
| 771 | output += sprintf( output, "C(%s) ", regnames[C]); |
| 772 | } |
| 773 | } |
| 774 | else if (p == 1) |
| 775 | { |
| 776 | output += sprintf( output, "<04_2f illegal p=01>"); |
| 777 | } |
| 778 | else if (p == 2) |
| 779 | { |
| 780 | output += sprintf( output, "<04_2f illegal p=10>"); |
| 781 | } |
| 782 | else if (p == 3) |
| 783 | { |
| 784 | output += sprintf( output, "<04_2f illegal p=11>"); |
| 785 | } |
| 786 | |
| 787 | return size; |
| 788 | } |
| 789 | |
| 790 | |
| 791 | int arcompact_handle04_2f_00_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "ASL"); } // ASL |
| 792 | int arcompact_handle04_2f_01_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "ASR"); } // ASR |
| 793 | int arcompact_handle04_2f_02_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "LSR"); } // LSR |
| 794 | int arcompact_handle04_2f_03_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "ROR"); } // ROR |
| 795 | int arcompact_handle04_2f_04_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "RCC"); } // RCC |
| 796 | int arcompact_handle04_2f_05_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "SEXB"); } // SEXB |
| 797 | int arcompact_handle04_2f_06_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "SEXW"); } // SEXW |
| 798 | int arcompact_handle04_2f_07_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "EXTB"); } // EXTB |
| 799 | int arcompact_handle04_2f_08_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "EXTW"); } // EXTW |
| 800 | int arcompact_handle04_2f_09_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "ABS"); } // ABS |
| 801 | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "NOT"); } // NOT |
| 802 | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "RCL"); } // RLC |
| 803 | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32) { return arcompact_handle04_2f_helper_dasm(output, pc, op, oprom, "EX"); } // EX |
| 804 | |
| 805 | |
| 806 | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32) { print("SLEEP (%08x)", op); return 4;} |
| 807 | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32) { print("SWI / TRAP0 (%08x)", op); return 4;} |
| 808 | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32) { print("SYNC (%08x)", op); return 4;} |
| 809 | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32) { print("RTIE (%08x)", op); return 4;} |
| 810 | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32) { print("BRK (%08x)", op); return 4;} |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | // format on these is.. |
| 817 | |
| 818 | // 0010 0bbb aa11 0ZZX DBBB CCCC CCAA AAAA |
| 819 | // note, bits 11 0ZZX are part of the sub-opcode # already - this is a special encoding |
| 820 | int arcompact_handle04_3x_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, int dsize, int extend) |
| 821 | { |
| 822 | int size = 4; |
| 823 | output += sprintf(output, "LD"); |
| 824 | output += sprintf(output, "%s", datasize[dsize]); |
| 825 | output += sprintf(output, "%s", dataextend[extend]); |
| 826 | |
| 827 | int mode = (op & 0x00c00000) >> 22; op &= ~0x00c00000; |
| 828 | int b = (op & 0x07000000) >> 24; op &= ~0x07000000; |
| 829 | int B = (op & 0x00007000) >> 12; op &= ~0x00007000; |
| 830 | int breg = b | (B << 3); |
| 831 | int D = (op & 0x00008000) >> 15;op &= ~0x00008000; |
| 832 | int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; |
| 833 | int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f; |
| 834 | |
| 835 | output += sprintf(output, "%s", addressmode[mode]); |
| 836 | output += sprintf(output, "%s", cachebit[D]); |
| 837 | |
| 838 | output += sprintf( output, "DST(%s)", regnames[A]); |
| 839 | output += sprintf( output, "SRC1(%s)", regnames[breg]); |
| 840 | output += sprintf( output, "SRC2(%s)", regnames[C]); |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | return size; |
| 846 | |
| 847 | |
| 848 | |
| 849 | } |
| 850 | |
| 851 | int arcompact_handle04_30_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,0,0); } |
| 852 | // ZZ value of 0x0 with X of 1 is illegal |
| 853 | int arcompact_handle04_31_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,0,1); } |
| 854 | int arcompact_handle04_32_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,1,0); } |
| 855 | int arcompact_handle04_33_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,1,1); } |
| 856 | int arcompact_handle04_34_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,2,0); } |
| 857 | int arcompact_handle04_35_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,2,1); } |
| 858 | // ZZ value of 0x3 is illegal |
| 859 | int arcompact_handle04_36_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,3,0); } |
| 860 | int arcompact_handle04_37_dasm(DASM_OPS_32) { return arcompact_handle04_3x_helper_dasm(output,pc,op,oprom,3,1); } |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 | |
| 866 | |
| 867 | int arcompact_handle05_00_dasm(DASM_OPS_32) { print("ASL a <- b asl c (%08x)", op); return 4;} |
| 868 | int arcompact_handle05_01_dasm(DASM_OPS_32) { print("LSR a <- b lsr c (%08x)", op); return 4;} |
| 869 | int arcompact_handle05_02_dasm(DASM_OPS_32) { print("ASR a <- b asr c (%08x)", op); return 4;} |
| 870 | int arcompact_handle05_03_dasm(DASM_OPS_32) { print("ROR a <- b ror c (%08x)", op); return 4;} |
| 871 | int arcompact_handle05_04_dasm(DASM_OPS_32) { print("MUL64 mulres <- b * c (%08x)", op); return 4;} |
| 872 | int arcompact_handle05_05_dasm(DASM_OPS_32) { print("MULU64 mulres <- b * c (%08x)", op); return 4;} |
| 873 | int arcompact_handle05_06_dasm(DASM_OPS_32) { print("ADDS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 874 | int arcompact_handle05_07_dasm(DASM_OPS_32) { print("SUBS a <- sat32 (b + c) (%08x)", op); return 4;} |
| 875 | int arcompact_handle05_08_dasm(DASM_OPS_32) { print("DIVAW (%08x)", op); return 4;} |
| 876 | |
| 877 | |
| 878 | |
| 879 | int arcompact_handle05_0a_dasm(DASM_OPS_32) { print("ASLS a <- sat32 (b << c) (%08x)", op); return 4;} |
| 880 | int arcompact_handle05_0b_dasm(DASM_OPS_32) { print("ASRS a ,- sat32 (b >> c) (%08x)", op); return 4;} |
| 881 | |
| 882 | int arcompact_handle05_28_dasm(DASM_OPS_32) { print("ADDSDW (%08x)", op); return 4;} |
| 883 | int arcompact_handle05_29_dasm(DASM_OPS_32) { print("SUBSDW (%08x)", op); return 4;} |
| 884 | |
| 885 | |
| 886 | int arcompact_handle05_2f_dasm(DASM_OPS_32) { print("SOP (another table) (%08x)", op); return 4;} |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | int arcompact_handle06_dasm(DASM_OPS_32) |
| 892 | { |
| 893 | print("op a,b,c (06 ARC ext) (%08x)", op ); |
| 894 | return 4; |
| 895 | } |
| 896 | |
| 897 | int arcompact_handle07_dasm(DASM_OPS_32) |
| 898 | { |
| 899 | print("op a,b,c (07 User ext) (%08x)", op ); |
| 900 | return 4; |
| 901 | } |
| 902 | |
| 903 | int arcompact_handle08_dasm(DASM_OPS_32) |
| 904 | { |
| 905 | print("op a,b,c (08 User ext) (%08x)", op ); |
| 906 | return 4; |
| 907 | } |
| 908 | |
| 909 | int arcompact_handle09_dasm(DASM_OPS_32) |
| 910 | { |
| 911 | print("op a,b,c (09 Market ext) (%08x)", op ); |
| 912 | return 4; |
| 913 | } |
| 914 | |
| 915 | int arcompact_handle0a_dasm(DASM_OPS_32) |
| 916 | { |
| 917 | print("op a,b,c (0a Market ext) (%08x)", op ); |
| 918 | return 4; |
| 919 | } |
| 920 | |
| 921 | int arcompact_handle0b_dasm(DASM_OPS_32) |
| 922 | { |
| 923 | print("op a,b,c (0b Market ext) (%08x)", op ); |
| 924 | return 4; |
| 925 | } |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | int arcompact_handle0c_00_dasm(DASM_OPS_16) |
| 933 | { |
| 934 | int size = 2; |
| 935 | print("LD_S a <- m[b + c].long (%04x)", op); |
| 936 | return size; |
| 937 | } |
| 938 | |
| 939 | int arcompact_handle0c_01_dasm(DASM_OPS_16) |
| 940 | { |
| 941 | int size = 2; |
| 942 | print("LDB_S a <- m[b + c].byte (%04x)", op); |
| 943 | return size; |
| 944 | } |
| 945 | |
| 946 | int arcompact_handle0c_02_dasm(DASM_OPS_16) |
| 947 | { |
| 948 | int size = 2; |
| 949 | print("LDW_S a <- m[b + c].word (%04x)", op); |
| 950 | return size; |
| 951 | } |
| 952 | |
| 953 | int arcompact_handle0c_03_dasm(DASM_OPS_16) |
| 954 | { |
| 955 | int size = 2; |
| 956 | print("ADD_S a <- b + c (%04x)", op); |
| 957 | return size; |
| 958 | } |
| 959 | |
| 960 | |
| 961 | |
| 962 | int arcompact_handle0d_00_dasm(DASM_OPS_16) |
| 963 | { |
| 964 | int size = 2; |
| 965 | print("ADD_S c <- b + u3 (%04x)", op); |
| 966 | return size; |
| 967 | } |
| 968 | |
| 969 | int arcompact_handle0d_01_dasm(DASM_OPS_16) |
| 970 | { |
| 971 | int size = 2; |
| 972 | print("SUB_S c <- b - u3 (%04x)", op); |
| 973 | return size; |
| 974 | } |
| 975 | |
| 976 | int arcompact_handle0d_02_dasm(DASM_OPS_16) |
| 977 | { |
| 978 | int size = 2; |
| 979 | print("ASL_S c <- b asl u3 (%04x)", op); |
| 980 | return size; |
| 981 | } |
| 982 | |
| 983 | int arcompact_handle0d_03_dasm(DASM_OPS_16) |
| 984 | { |
| 985 | int size = 2; |
| 986 | print("ASL_S c <- b asr u3 (%04x)", op); |
| 987 | return size; |
| 988 | } |
| 989 | |
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 | int arcompact_handle0e_00_dasm(DASM_OPS_16) |
| 996 | { |
| 997 | int h; |
| 998 | int size = 2; |
| 999 | |
| 1000 | GROUP_0e_GET_h; |
| 1001 | |
| 1002 | if (h == LIMM_REG) |
| 1003 | { |
| 1004 | UINT32 limm; |
| 1005 | GET_LIMM; |
| 1006 | size = 6; |
| 1007 | print("ADD_S b <- b + (%08x) (%04x)", limm, op); |
| 1008 | } |
| 1009 | else |
| 1010 | { |
| 1011 | |
| 1012 | print("ADD_S b <- b + (r%d) (%04x)", h, op); |
| 1013 | } |
| 1014 | |
| 1015 | return size; |
| 1016 | } |
| 1017 | |
| 1018 | int arcompact_handle0e_01_dasm(DASM_OPS_16) |
| 1019 | { |
| 1020 | int h; |
| 1021 | int size = 2; |
| 1022 | GROUP_0e_GET_h; |
| 1023 | |
| 1024 | if (h == LIMM_REG) |
| 1025 | { |
| 1026 | UINT32 limm; |
| 1027 | GET_LIMM; |
| 1028 | size = 6; |
| 1029 | print("MOV_S b <- (%08x) (%04x)", limm, op); |
| 1030 | } |
| 1031 | else |
| 1032 | { |
| 1033 | print("MOV_S b <- (r%d) (%04x)", h, op); |
| 1034 | } |
| 1035 | return size; |
| 1036 | } |
| 1037 | |
| 1038 | int arcompact_handle0e_02_dasm(DASM_OPS_16) |
| 1039 | { |
| 1040 | int h; |
| 1041 | int size = 2; |
| 1042 | GROUP_0e_GET_h; |
| 1043 | |
| 1044 | if (h == LIMM_REG) |
| 1045 | { |
| 1046 | UINT32 limm; |
| 1047 | GET_LIMM; |
| 1048 | size = 6; |
| 1049 | print("CMP_S b - (%08x) (%04x)", limm, op); |
| 1050 | } |
| 1051 | else |
| 1052 | { |
| 1053 | print("CMP_S b - (r%d) (%04x)", h, op); |
| 1054 | } |
| 1055 | return size; |
| 1056 | } |
| 1057 | |
| 1058 | int arcompact_handle0e_03_dasm(DASM_OPS_16) |
| 1059 | { |
| 1060 | int h; |
| 1061 | int size = 2; |
| 1062 | GROUP_0e_GET_h; |
| 1063 | |
| 1064 | if (h == LIMM_REG) |
| 1065 | { |
| 1066 | UINT32 limm; |
| 1067 | GET_LIMM; |
| 1068 | size = 6; |
| 1069 | print("MOV_S (%08x) <- b (%04x)", limm, op); |
| 1070 | } |
| 1071 | else |
| 1072 | { |
| 1073 | print("MOV_S (r%d) <- b (%04x)", h, op); |
| 1074 | } |
| 1075 | |
| 1076 | return size; |
| 1077 | } |
| 1078 | |
| 1079 | |
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | int arcompact_handle0f_00_00_dasm(DASM_OPS_16) { print("J_S pc <- b (%08x)", op); return 2;} |
| 1084 | int arcompact_handle0f_00_01_dasm(DASM_OPS_16) { print("J_S.D pc <- b (%08x)", op); return 2;} |
| 1085 | int arcompact_handle0f_00_02_dasm(DASM_OPS_16) { print("JL_S blink <- pc; pc <- b (%08x)", op); return 2;} |
| 1086 | int arcompact_handle0f_00_03_dasm(DASM_OPS_16) { print("L_S.D blink <- pc; pc <- b( %08x)", op); return 2;} |
| 1087 | int arcompact_handle0f_00_06_dasm(DASM_OPS_16) { print("SUB_S.NE if (f.Z==0) b <- b - b (%08x)", op); return 2;} |
| 1088 | |
| 1089 | |
| 1090 | |
| 1091 | |
| 1092 | |
| 1093 | int arcompact_handle0f_00_07_00_dasm(DASM_OPS_16) { print("NOP_S (%08x)", op); return 2;} |
| 1094 | int arcompact_handle0f_00_07_01_dasm(DASM_OPS_16) { print("UNIMP_S (%08x)", op); return 2;} // Unimplemented Instruction (how does this differ from illegal ops?) |
| 1095 | |
| 1096 | |
| 1097 | |
| 1098 | int arcompact_handle0f_00_07_04_dasm(DASM_OPS_16) { print("JEQ_S [blink] (%08x)", op); return 2;} |
| 1099 | int arcompact_handle0f_00_07_05_dasm(DASM_OPS_16) { print("JNE_S [blink] (%08x)", op); return 2;} |
| 1100 | int arcompact_handle0f_00_07_06_dasm(DASM_OPS_16) { print("J_S [blink] (%08x)", op); return 2;} |
| 1101 | int arcompact_handle0f_00_07_07_dasm(DASM_OPS_16) { print("J_S.D [blink] (%08x)", op); return 2;} |
| 1102 | |
| 1103 | |
| 1104 | int arcompact_handle0f_02_dasm(DASM_OPS_16) { print("SUB_S b <- b - c (%08x)", op); return 2;} |
| 1105 | |
| 1106 | |
| 1107 | int arcompact_handle0f_04_dasm(DASM_OPS_16) { print("AND_S b <- b and c (%08x)", op); return 2;} |
| 1108 | int arcompact_handle0f_05_dasm(DASM_OPS_16) { print("OR_S b <- b or c (%08x)", op); return 2;} |
| 1109 | int arcompact_handle0f_06_dasm(DASM_OPS_16) { print("BIC_S b <- b & !c (%08x)", op); return 2;} |
| 1110 | int arcompact_handle0f_07_dasm(DASM_OPS_16) { print("XOR_S b <- b ^ c (%08x)", op); return 2;} |
| 1111 | |
| 1112 | |
| 1113 | int arcompact_handle0f_0b_dasm(DASM_OPS_16) { print("TST_S b & c (%08x)", op); return 2;} |
| 1114 | int arcompact_handle0f_0c_dasm(DASM_OPS_16) { print("MUL64_S mulres <- b * c (%08x)", op); return 2;} |
| 1115 | int arcompact_handle0f_0d_dasm(DASM_OPS_16) { print("SEXB_S b <- sexb(c) (%08x)", op); return 2;} |
| 1116 | int arcompact_handle0f_0e_dasm(DASM_OPS_16) { print("SEXW_S b <- sexw(c) (%08x)", op); return 2;} |
| 1117 | int arcompact_handle0f_0f_dasm(DASM_OPS_16) { print("EXTB_S b <- extb(c) (%08x)", op); return 2;} |
| 1118 | int arcompact_handle0f_10_dasm(DASM_OPS_16) { print("EXTW_S b <- extw(c) (%08x)", op); return 2;} |
| 1119 | int arcompact_handle0f_11_dasm(DASM_OPS_16) { print("ABS_S b <- abs(c) (%08x)", op); return 2;} |
| 1120 | int arcompact_handle0f_12_dasm(DASM_OPS_16) { print("NOT_S b <- !(c) (%08x)", op); return 2;} |
| 1121 | int arcompact_handle0f_13_dasm(DASM_OPS_16) { print("NEG_S b <- neg(c) (%08x)", op); return 2;} |
| 1122 | int arcompact_handle0f_14_dasm(DASM_OPS_16) { print("ADD1_S b <- b + (c << 1) (%08x)", op); return 2;} |
| 1123 | int arcompact_handle0f_15_dasm(DASM_OPS_16) { print("ADD2_S b <- b + (c << 2) (%08x)", op); return 2;} |
| 1124 | int arcompact_handle0f_16_dasm(DASM_OPS_16) { print("ADD3_S b <- b + (c << 3) (%08x)", op); return 2;} |
| 1125 | |
| 1126 | |
| 1127 | int arcompact_handle0f_18_dasm(DASM_OPS_16) { print("ASL_S b <- b asl c (%08x)", op); return 2;} |
| 1128 | int arcompact_handle0f_19_dasm(DASM_OPS_16) { print("LSR_S b <- b lsr c (%08x)", op); return 2;} |
| 1129 | int arcompact_handle0f_1a_dasm(DASM_OPS_16) { print("ASR_S b <- b asr c (%08x)", op); return 2;} |
| 1130 | int arcompact_handle0f_1b_dasm(DASM_OPS_16) { print("ASL_S b <- c + c (%08x)", op); return 2;} |
| 1131 | int arcompact_handle0f_1c_dasm(DASM_OPS_16) { print("ASR_S b <- c asr 1 (%08x)", op); return 2;} |
| 1132 | int arcompact_handle0f_1d_dasm(DASM_OPS_16) { print("LSR_S b <- c lsr 1(%08x)", op); return 2;} |
| 1133 | int arcompact_handle0f_1e_dasm(DASM_OPS_16) { print("TRAP_S (%08x)", op); return 2;} |
| 1134 | int arcompact_handle0f_1f_dasm(DASM_OPS_16) { print("BRK_S (%08x)", op); return 2;} |
| 1135 | |
| 1136 | |
| 1137 | int arcompact_handle10_dasm(DASM_OPS_16) |
| 1138 | { |
| 1139 | print("LD_S (%04x)", op); |
| 1140 | return 2; |
| 1141 | } |
| 1142 | |
| 1143 | int arcompact_handle11_dasm(DASM_OPS_16) |
| 1144 | { |
| 1145 | print("LDB_S (%04x)", op); |
| 1146 | return 2; |
| 1147 | } |
| 1148 | |
| 1149 | int arcompact_handle12_dasm(DASM_OPS_16) |
| 1150 | { |
| 1151 | print("LDW_S (%04x)", op); |
| 1152 | return 2; |
| 1153 | } |
| 1154 | |
| 1155 | int arcompact_handle13_dasm(DASM_OPS_16) |
| 1156 | { |
| 1157 | print("LSW_S.X (%04x)", op); |
| 1158 | return 2; |
| 1159 | } |
| 1160 | |
| 1161 | int arcompact_handle14_dasm(DASM_OPS_16) |
| 1162 | { |
| 1163 | print("ST_S (%04x)", op); |
| 1164 | return 2; |
| 1165 | } |
| 1166 | |
| 1167 | int arcompact_handle15_dasm(DASM_OPS_16) |
| 1168 | { |
| 1169 | print("STB_S (%04x)", op); |
| 1170 | return 2; |
| 1171 | } |
| 1172 | |
| 1173 | int arcompact_handle16_dasm(DASM_OPS_16) |
| 1174 | { |
| 1175 | print("STW_S (%04x)", op); |
| 1176 | return 2; |
| 1177 | } |
| 1178 | |
| 1179 | |
| 1180 | int arcompact_handle17_00_dasm(DASM_OPS_16) |
| 1181 | { |
| 1182 | int size = 2; |
| 1183 | print("ASL_S b <- b asl u5 (%04x)", op); |
| 1184 | return size; |
| 1185 | } |
| 1186 | |
| 1187 | int arcompact_handle17_01_dasm(DASM_OPS_16) |
| 1188 | { |
| 1189 | int size = 2; |
| 1190 | print("LSR_S b <- b lsr u5 (%04x)", op); |
| 1191 | return size; |
| 1192 | } |
| 1193 | |
| 1194 | int arcompact_handle17_02_dasm(DASM_OPS_16) |
| 1195 | { |
| 1196 | int size = 2; |
| 1197 | print("ASR_S b <- b asr u5 (%04x)", op); |
| 1198 | return size; |
| 1199 | } |
| 1200 | |
| 1201 | int arcompact_handle17_03_dasm(DASM_OPS_16) |
| 1202 | { |
| 1203 | int size = 2; |
| 1204 | print("SUB_S b <- b - u5 (%04x)", op); |
| 1205 | return size; |
| 1206 | } |
| 1207 | |
| 1208 | int arcompact_handle17_04_dasm(DASM_OPS_16) |
| 1209 | { |
| 1210 | int size = 2; |
| 1211 | print("BSET_S b <- b | (1 << u5) (%04x)", op); |
| 1212 | return size; |
| 1213 | } |
| 1214 | |
| 1215 | int arcompact_handle17_05_dasm(DASM_OPS_16) |
| 1216 | { |
| 1217 | int size = 2; |
| 1218 | print("BCLR_S b <- b & !(1 << u5) (%04x)", op); |
| 1219 | return size; |
| 1220 | } |
| 1221 | |
| 1222 | int arcompact_handle17_06_dasm(DASM_OPS_16) |
| 1223 | { |
| 1224 | int size = 2; |
| 1225 | print("BMSK_S (%04x)", op); |
| 1226 | return size; |
| 1227 | } |
| 1228 | |
| 1229 | int arcompact_handle17_07_dasm(DASM_OPS_16) |
| 1230 | { |
| 1231 | int size = 2; |
| 1232 | print("BTST_S (%04x)", op); |
| 1233 | return size; |
| 1234 | } |
| 1235 | |
| 1236 | |
| 1237 | // op bits remaining for 0x18_xx subgroups 0x071f |
| 1238 | |
| 1239 | int arcompact_handle18_00_dasm(DASM_OPS_16) |
| 1240 | { |
| 1241 | print("LD_S (SP) (%04x)", op); |
| 1242 | return 2; |
| 1243 | } |
| 1244 | |
| 1245 | int arcompact_handle18_01_dasm(DASM_OPS_16) |
| 1246 | { |
| 1247 | print("LDB_S (SP) (%04x)", op); |
| 1248 | return 2; |
| 1249 | } |
| 1250 | |
| 1251 | int arcompact_handle18_02_dasm(DASM_OPS_16) |
| 1252 | { |
| 1253 | print("ST_S (SP) (%04x)", op); |
| 1254 | return 2; |
| 1255 | } |
| 1256 | |
| 1257 | int arcompact_handle18_03_dasm(DASM_OPS_16) |
| 1258 | { |
| 1259 | print("STB_S (SP) (%04x)", op); |
| 1260 | return 2; |
| 1261 | } |
| 1262 | |
| 1263 | int arcompact_handle18_04_dasm(DASM_OPS_16) |
| 1264 | { |
| 1265 | print("ADD_S (SP) (%04x)", op); |
| 1266 | return 2; |
| 1267 | } |
| 1268 | |
| 1269 | // op bits remaining for 0x18_05_xx subgroups 0x001f |
| 1270 | int arcompact_handle18_05_00_dasm(DASM_OPS_16) |
| 1271 | { |
| 1272 | int u = op & 0x001f; |
| 1273 | op &= ~0x001f; // all bits now used |
| 1274 | |
| 1275 | print("ADD_S %02x (SP)", u); |
| 1276 | return 2; |
| 1277 | |
| 1278 | } |
| 1279 | |
| 1280 | int arcompact_handle18_05_01_dasm(DASM_OPS_16) |
| 1281 | { |
| 1282 | int u = op & 0x001f; |
| 1283 | op &= ~0x001f; // all bits now used |
| 1284 | |
| 1285 | print("SUB_S %02x (SP)", u); |
| 1286 | return 2; |
| 1287 | } |
| 1288 | |
| 1289 | // op bits remaining for 0x18_06_xx subgroups 0x0700 |
| 1290 | int arcompact_handle18_06_01_dasm(DASM_OPS_16) |
| 1291 | { |
| 1292 | int b = (op & 0x0700) >> 8; |
| 1293 | op &= ~0x0700; // all bits now used |
| 1294 | |
| 1295 | print("POP_S [%02x]", b); |
| 1296 | |
| 1297 | return 2; |
| 1298 | } |
| 1299 | |
| 1300 | int arcompact_handle18_06_11_dasm(DASM_OPS_16) |
| 1301 | { |
| 1302 | int res = (op & 0x0700) >> 8; |
| 1303 | op &= ~0x0700; // all bits now used |
| 1304 | |
| 1305 | if (res) |
| 1306 | print("POP_S [BLINK] (Reserved Bits set %04x)", op); |
| 1307 | else |
| 1308 | print("POP_S [BLINK]"); |
| 1309 | |
| 1310 | return 2; |
| 1311 | } |
| 1312 | |
| 1313 | // op bits remaining for 0x18_07_xx subgroups 0x0700 |
| 1314 | int arcompact_handle18_07_01_dasm(DASM_OPS_16) |
| 1315 | { |
| 1316 | int b = (op & 0x0700) >> 8; |
| 1317 | op &= ~0x0700; // all bits now used |
| 1318 | |
| 1319 | print("PUSH_S [%02x]", b); |
| 1320 | |
| 1321 | return 2; |
| 1322 | } |
| 1323 | |
| 1324 | |
| 1325 | int arcompact_handle18_07_11_dasm(DASM_OPS_16) |
| 1326 | { |
| 1327 | int res = (op & 0x0700) >> 8; |
| 1328 | op &= ~0x0700; // all bits now used |
| 1329 | |
| 1330 | if (res) |
| 1331 | print("PUSH_S [BLINK] (Reserved Bits set %04x)", op); |
| 1332 | else |
| 1333 | print("PUSH_S [BLINK]"); |
| 1334 | |
| 1335 | return 2; |
| 1336 | } |
| 1337 | |
| 1338 | int arcompact_handle19_00_dasm(DASM_OPS_16) { print("LD_S r0 <- m[GP + s11].long (%04x)", op); return 2;} |
| 1339 | int arcompact_handle19_01_dasm(DASM_OPS_16) { print("LDB_S r0 <- m[GP + s9].byte (%04x)", op); return 2;} |
| 1340 | int arcompact_handle19_02_dasm(DASM_OPS_16) { print("LDW_S r0 <- m[GP + s10].word (%04x)", op); return 2;} |
| 1341 | int arcompact_handle19_03_dasm(DASM_OPS_16) { print("ADD_S r0 <- GP + s11 (%04x)", op); return 2;} |
| 1342 | |
| 1343 | int arcompact_handle1a_dasm(DASM_OPS_16) |
| 1344 | { |
| 1345 | print("PCL Instr (%04x)", op); |
| 1346 | return 2; |
| 1347 | } |
| 1348 | |
| 1349 | int arcompact_handle1b_dasm(DASM_OPS_16) |
| 1350 | { |
| 1351 | print("MOV_S (%04x)", op); |
| 1352 | return 2; |
| 1353 | } |
| 1354 | |
| 1355 | int arcompact_handle1c_00_dasm(DASM_OPS_16) { print("ADD_S b <- b + u7 (%04x)", op); return 2;} |
| 1356 | int arcompact_handle1c_01_dasm(DASM_OPS_16) { print("CMP_S b - u7 (%04x)", op); return 2;} |
| 1357 | |
| 1358 | |
| 1359 | int arcompact_handle1d_00_dasm(DASM_OPS_16) { print("BREQ_S (%04x)", op); return 2;} |
| 1360 | int arcompact_handle1d_01_dasm(DASM_OPS_16) { print("BRNE_S (%04x)", op); return 2;} |
| 1361 | |
| 1362 | |
| 1363 | int arcompact_handle1e_00_dasm(DASM_OPS_16) { print("B_S (%04x)", op); return 2;} |
| 1364 | int arcompact_handle1e_01_dasm(DASM_OPS_16) { print("BEQ_S (%04x)", op); return 2;} |
| 1365 | int arcompact_handle1e_02_dasm(DASM_OPS_16) { print("BNE_S (%04x)", op); return 2;} |
| 1366 | |
| 1367 | int arcompact_handle1e_03_00_dasm(DASM_OPS_16) { print("BGT_S (%04x)", op); return 2;} |
| 1368 | int arcompact_handle1e_03_01_dasm(DASM_OPS_16) { print("BGE_S (%04x)", op); return 2;} |
| 1369 | int arcompact_handle1e_03_02_dasm(DASM_OPS_16) { print("BLT_S (%04x)", op); return 2;} |
| 1370 | int arcompact_handle1e_03_03_dasm(DASM_OPS_16) { print("BLE_S (%04x)", op); return 2;} |
| 1371 | int arcompact_handle1e_03_04_dasm(DASM_OPS_16) { print("BHI_S (%04x)", op); return 2;} |
| 1372 | int arcompact_handle1e_03_05_dasm(DASM_OPS_16) { print("BHS_S (%04x)", op); return 2;} |
| 1373 | int arcompact_handle1e_03_06_dasm(DASM_OPS_16) { print("BLO_S (%04x)", op); return 2;} |
| 1374 | int arcompact_handle1e_03_07_dasm(DASM_OPS_16) { print("BLS_S (%04x)", op); return 2;} |
| 1375 | |
| 1376 | int arcompact_handle1f_dasm(DASM_OPS_16) |
| 1377 | { |
| 1378 | print("BL_S (%04x)", op); |
| 1379 | return 2; |
| 1380 | } |
| 1381 | |
| 1382 | /************************************************************************************************************************************ |
| 1383 | * * |
| 1384 | * illegal opcode handlers (disassembly) * |
| 1385 | * * |
| 1386 | ************************************************************************************************************************************/ |
| 1387 | |
| 1388 | int arcompact_handle01_01_00_06_dasm(DASM_OPS_32) { print("<illegal 01_01_00_06> (%08x)", op); return 4; } |
| 1389 | int arcompact_handle01_01_00_07_dasm(DASM_OPS_32) { print("<illegal 01_01_00_07> (%08x)", op); return 4; } |
| 1390 | int arcompact_handle01_01_00_08_dasm(DASM_OPS_32) { print("<illegal 01_01_00_08> (%08x)", op); return 4; } |
| 1391 | int arcompact_handle01_01_00_09_dasm(DASM_OPS_32) { print("<illegal 01_01_00_09> (%08x)", op); return 4; } |
| 1392 | int arcompact_handle01_01_00_0a_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0a> (%08x)", op); return 4; } |
| 1393 | int arcompact_handle01_01_00_0b_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0b> (%08x)", op); return 4; } |
| 1394 | int arcompact_handle01_01_00_0c_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0c> (%08x)", op); return 4; } |
| 1395 | int arcompact_handle01_01_00_0d_dasm(DASM_OPS_32) { print("<illegal 01_01_00_0d> (%08x)", op); return 4; } |
| 1396 | |
| 1397 | int arcompact_handle01_01_01_06_dasm(DASM_OPS_32) { print("<illegal 01_01_01_06> (%08x)", op); return 4; } |
| 1398 | int arcompact_handle01_01_01_07_dasm(DASM_OPS_32) { print("<illegal 01_01_01_07> (%08x)", op); return 4; } |
| 1399 | int arcompact_handle01_01_01_08_dasm(DASM_OPS_32) { print("<illegal 01_01_01_08> (%08x)", op); return 4; } |
| 1400 | int arcompact_handle01_01_01_09_dasm(DASM_OPS_32) { print("<illegal 01_01_01_09> (%08x)", op); return 4; } |
| 1401 | int arcompact_handle01_01_01_0a_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0a> (%08x)", op); return 4; } |
| 1402 | int arcompact_handle01_01_01_0b_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0b> (%08x)", op); return 4; } |
| 1403 | int arcompact_handle01_01_01_0c_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0c> (%08x)", op); return 4; } |
| 1404 | int arcompact_handle01_01_01_0d_dasm(DASM_OPS_32) { print("<illegal 01_01_01_0d> (%08x)", op); return 4; } |
| 1405 | |
| 1406 | |
| 1407 | int arcompact_handle04_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_1e> (%08x)", op); return 4;} |
| 1408 | int arcompact_handle04_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_1f> (%08x)", op); return 4;} |
| 1409 | |
| 1410 | int arcompact_handle04_24_dasm(DASM_OPS_32) { print("<illegal 0x04_24> (%08x)", op); return 4;} |
| 1411 | int arcompact_handle04_25_dasm(DASM_OPS_32) { print("<illegal 0x04_25> (%08x)", op); return 4;} |
| 1412 | int arcompact_handle04_26_dasm(DASM_OPS_32) { print("<illegal 0x04_26> (%08x)", op); return 4;} |
| 1413 | int arcompact_handle04_27_dasm(DASM_OPS_32) { print("<illegal 0x04_27> (%08x)", op); return 4;} |
| 1414 | |
| 1415 | int arcompact_handle04_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2c> (%08x)", op); return 4;} |
| 1416 | int arcompact_handle04_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2d> (%08x)", op); return 4;} |
| 1417 | int arcompact_handle04_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2e> (%08x)", op); return 4;} |
| 1418 | |
| 1419 | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0d> (%08x)", op); return 4;} |
| 1420 | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0e> (%08x)", op); return 4;} |
| 1421 | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_0f> (%08x)", op); return 4;} |
| 1422 | int arcompact_handle04_2f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_10> (%08x)", op); return 4;} |
| 1423 | int arcompact_handle04_2f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_11> (%08x)", op); return 4;} |
| 1424 | int arcompact_handle04_2f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_12> (%08x)", op); return 4;} |
| 1425 | int arcompact_handle04_2f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_13> (%08x)", op); return 4;} |
| 1426 | int arcompact_handle04_2f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_14> (%08x)", op); return 4;} |
| 1427 | int arcompact_handle04_2f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_15> (%08x)", op); return 4;} |
| 1428 | int arcompact_handle04_2f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_16> (%08x)", op); return 4;} |
| 1429 | int arcompact_handle04_2f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_17> (%08x)", op); return 4;} |
| 1430 | int arcompact_handle04_2f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_18> (%08x)", op); return 4;} |
| 1431 | int arcompact_handle04_2f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_19> (%08x)", op); return 4;} |
| 1432 | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1a> (%08x)", op); return 4;} |
| 1433 | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1b> (%08x)", op); return 4;} |
| 1434 | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1c> (%08x)", op); return 4;} |
| 1435 | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1d> (%08x)", op); return 4;} |
| 1436 | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1e> (%08x)", op); return 4;} |
| 1437 | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_1f> (%08x)", op); return 4;} |
| 1438 | int arcompact_handle04_2f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_20> (%08x)", op); return 4;} |
| 1439 | int arcompact_handle04_2f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_21> (%08x)", op); return 4;} |
| 1440 | int arcompact_handle04_2f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_22> (%08x)", op); return 4;} |
| 1441 | int arcompact_handle04_2f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_23> (%08x)", op); return 4;} |
| 1442 | int arcompact_handle04_2f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_24> (%08x)", op); return 4;} |
| 1443 | int arcompact_handle04_2f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_25> (%08x)", op); return 4;} |
| 1444 | int arcompact_handle04_2f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_26> (%08x)", op); return 4;} |
| 1445 | int arcompact_handle04_2f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_27> (%08x)", op); return 4;} |
| 1446 | int arcompact_handle04_2f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_28> (%08x)", op); return 4;} |
| 1447 | int arcompact_handle04_2f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_29> (%08x)", op); return 4;} |
| 1448 | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2a> (%08x)", op); return 4;} |
| 1449 | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2b> (%08x)", op); return 4;} |
| 1450 | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2c> (%08x)", op); return 4;} |
| 1451 | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2d> (%08x)", op); return 4;} |
| 1452 | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2e> (%08x)", op); return 4;} |
| 1453 | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_2f> (%08x)", op); return 4;} |
| 1454 | int arcompact_handle04_2f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_30> (%08x)", op); return 4;} |
| 1455 | int arcompact_handle04_2f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_31> (%08x)", op); return 4;} |
| 1456 | int arcompact_handle04_2f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_32> (%08x)", op); return 4;} |
| 1457 | int arcompact_handle04_2f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_33> (%08x)", op); return 4;} |
| 1458 | int arcompact_handle04_2f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_34> (%08x)", op); return 4;} |
| 1459 | int arcompact_handle04_2f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_35> (%08x)", op); return 4;} |
| 1460 | int arcompact_handle04_2f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_36> (%08x)", op); return 4;} |
| 1461 | int arcompact_handle04_2f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_37> (%08x)", op); return 4;} |
| 1462 | int arcompact_handle04_2f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_38> (%08x)", op); return 4;} |
| 1463 | int arcompact_handle04_2f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_39> (%08x)", op); return 4;} |
| 1464 | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3a> (%08x)", op); return 4;} |
| 1465 | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3b> (%08x)", op); return 4;} |
| 1466 | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3c> (%08x)", op); return 4;} |
| 1467 | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3d> (%08x)", op); return 4;} |
| 1468 | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3e> (%08x)", op); return 4;} |
| 1469 | |
| 1470 | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_00> (%08x)", op); return 4;} |
| 1471 | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_06> (%08x)", op); return 4;} |
| 1472 | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_07> (%08x)", op); return 4;} |
| 1473 | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_08> (%08x)", op); return 4;} |
| 1474 | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_09> (%08x)", op); return 4;} |
| 1475 | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0a> (%08x)", op); return 4;} |
| 1476 | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0b> (%08x)", op); return 4;} |
| 1477 | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0c> (%08x)", op); return 4;} |
| 1478 | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0d> (%08x)", op); return 4;} |
| 1479 | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0e> (%08x)", op); return 4;} |
| 1480 | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_0f> (%08x)", op); return 4;} |
| 1481 | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_10> (%08x)", op); return 4;} |
| 1482 | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_11> (%08x)", op); return 4;} |
| 1483 | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_12> (%08x)", op); return 4;} |
| 1484 | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_13> (%08x)", op); return 4;} |
| 1485 | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_14> (%08x)", op); return 4;} |
| 1486 | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_15> (%08x)", op); return 4;} |
| 1487 | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_16> (%08x)", op); return 4;} |
| 1488 | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_17> (%08x)", op); return 4;} |
| 1489 | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_18> (%08x)", op); return 4;} |
| 1490 | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_19> (%08x)", op); return 4;} |
| 1491 | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1a> (%08x)", op); return 4;} |
| 1492 | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1b> (%08x)", op); return 4;} |
| 1493 | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1c> (%08x)", op); return 4;} |
| 1494 | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1d> (%08x)", op); return 4;} |
| 1495 | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1e> (%08x)", op); return 4;} |
| 1496 | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_1f> (%08x)", op); return 4;} |
| 1497 | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_20> (%08x)", op); return 4;} |
| 1498 | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_21> (%08x)", op); return 4;} |
| 1499 | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_22> (%08x)", op); return 4;} |
| 1500 | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_23> (%08x)", op); return 4;} |
| 1501 | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_24> (%08x)", op); return 4;} |
| 1502 | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_25> (%08x)", op); return 4;} |
| 1503 | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_26> (%08x)", op); return 4;} |
| 1504 | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_27> (%08x)", op); return 4;} |
| 1505 | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_28> (%08x)", op); return 4;} |
| 1506 | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_29> (%08x)", op); return 4;} |
| 1507 | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2a> (%08x)", op); return 4;} |
| 1508 | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2b> (%08x)", op); return 4;} |
| 1509 | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2c> (%08x)", op); return 4;} |
| 1510 | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2d> (%08x)", op); return 4;} |
| 1511 | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2e> (%08x)", op); return 4;} |
| 1512 | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_2f> (%08x)", op); return 4;} |
| 1513 | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_30> (%08x)", op); return 4;} |
| 1514 | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_31> (%08x)", op); return 4;} |
| 1515 | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_32> (%08x)", op); return 4;} |
| 1516 | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_33> (%08x)", op); return 4;} |
| 1517 | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_34> (%08x)", op); return 4;} |
| 1518 | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_35> (%08x)", op); return 4;} |
| 1519 | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_36> (%08x)", op); return 4;} |
| 1520 | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_37> (%08x)", op); return 4;} |
| 1521 | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_38> (%08x)", op); return 4;} |
| 1522 | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_39> (%08x)", op); return 4;} |
| 1523 | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3a> (%08x)", op); return 4;} |
| 1524 | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3b> (%08x)", op); return 4;} |
| 1525 | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3c> (%08x)", op); return 4;} |
| 1526 | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3d> (%08x)", op); return 4;} |
| 1527 | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3e> (%08x)", op); return 4;} |
| 1528 | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_2f_3f_3f> (%08x)", op); return 4;} |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | int arcompact_handle04_38_dasm(DASM_OPS_32) { print("<illegal 0x04_38> (%08x)", op); return 4;} |
| 1534 | int arcompact_handle04_39_dasm(DASM_OPS_32) { print("<illegal 0x04_39> (%08x)", op); return 4;} |
| 1535 | int arcompact_handle04_3a_dasm(DASM_OPS_32) { print("<illegal 0x04_3a> (%08x)", op); return 4;} |
| 1536 | int arcompact_handle04_3b_dasm(DASM_OPS_32) { print("<illegal 0x04_3b> (%08x)", op); return 4;} |
| 1537 | int arcompact_handle04_3c_dasm(DASM_OPS_32) { print("<illegal 0x04_3c> (%08x)", op); return 4;} |
| 1538 | int arcompact_handle04_3d_dasm(DASM_OPS_32) { print("<illegal 0x04_3d> (%08x)", op); return 4;} |
| 1539 | int arcompact_handle04_3e_dasm(DASM_OPS_32) { print("<illegal 0x04_3e> (%08x)", op); return 4;} |
| 1540 | int arcompact_handle04_3f_dasm(DASM_OPS_32) { print("<illegal 0x04_3f> (%08x)", op); return 4;} |
| 1541 | |
| 1542 | |
| 1543 | int arcompact_handle05_09_dasm(DASM_OPS_32) { print("<illegal 0x05_09> (%08x)", op); return 4;} |
| 1544 | int arcompact_handle05_0c_dasm(DASM_OPS_32) { print("<illegal 0x05_0c> (%08x)", op); return 4;} |
| 1545 | int arcompact_handle05_0d_dasm(DASM_OPS_32) { print("<illegal 0x05_0d> (%08x)", op); return 4;} |
| 1546 | int arcompact_handle05_0e_dasm(DASM_OPS_32) { print("<illegal 0x05_0e> (%08x)", op); return 4;} |
| 1547 | int arcompact_handle05_0f_dasm(DASM_OPS_32) { print("<illegal 0x05_0f> (%08x)", op); return 4;} |
| 1548 | int arcompact_handle05_10_dasm(DASM_OPS_32) { print("<illegal 0x05_10> (%08x)", op); return 4;} |
| 1549 | int arcompact_handle05_11_dasm(DASM_OPS_32) { print("<illegal 0x05_11> (%08x)", op); return 4;} |
| 1550 | int arcompact_handle05_12_dasm(DASM_OPS_32) { print("<illegal 0x05_12> (%08x)", op); return 4;} |
| 1551 | int arcompact_handle05_13_dasm(DASM_OPS_32) { print("<illegal 0x05_13> (%08x)", op); return 4;} |
| 1552 | int arcompact_handle05_14_dasm(DASM_OPS_32) { print("<illegal 0x05_14> (%08x)", op); return 4;} |
| 1553 | int arcompact_handle05_15_dasm(DASM_OPS_32) { print("<illegal 0x05_15> (%08x)", op); return 4;} |
| 1554 | int arcompact_handle05_16_dasm(DASM_OPS_32) { print("<illegal 0x05_16> (%08x)", op); return 4;} |
| 1555 | int arcompact_handle05_17_dasm(DASM_OPS_32) { print("<illegal 0x05_17> (%08x)", op); return 4;} |
| 1556 | int arcompact_handle05_18_dasm(DASM_OPS_32) { print("<illegal 0x05_18> (%08x)", op); return 4;} |
| 1557 | int arcompact_handle05_19_dasm(DASM_OPS_32) { print("<illegal 0x05_19> (%08x)", op); return 4;} |
| 1558 | int arcompact_handle05_1a_dasm(DASM_OPS_32) { print("<illegal 0x05_1a> (%08x)", op); return 4;} |
| 1559 | int arcompact_handle05_1b_dasm(DASM_OPS_32) { print("<illegal 0x05_1b> (%08x)", op); return 4;} |
| 1560 | int arcompact_handle05_1c_dasm(DASM_OPS_32) { print("<illegal 0x05_1c> (%08x)", op); return 4;} |
| 1561 | int arcompact_handle05_1d_dasm(DASM_OPS_32) { print("<illegal 0x05_1d> (%08x)", op); return 4;} |
| 1562 | int arcompact_handle05_1e_dasm(DASM_OPS_32) { print("<illegal 0x05_1e> (%08x)", op); return 4;} |
| 1563 | int arcompact_handle05_1f_dasm(DASM_OPS_32) { print("<illegal 0x05_1f> (%08x)", op); return 4;} |
| 1564 | int arcompact_handle05_20_dasm(DASM_OPS_32) { print("<illegal 0x05_20> (%08x)", op); return 4;} |
| 1565 | int arcompact_handle05_21_dasm(DASM_OPS_32) { print("<illegal 0x05_21> (%08x)", op); return 4;} |
| 1566 | int arcompact_handle05_22_dasm(DASM_OPS_32) { print("<illegal 0x05_22> (%08x)", op); return 4;} |
| 1567 | int arcompact_handle05_23_dasm(DASM_OPS_32) { print("<illegal 0x05_23> (%08x)", op); return 4;} |
| 1568 | int arcompact_handle05_24_dasm(DASM_OPS_32) { print("<illegal 0x05_24> (%08x)", op); return 4;} |
| 1569 | int arcompact_handle05_25_dasm(DASM_OPS_32) { print("<illegal 0x05_25> (%08x)", op); return 4;} |
| 1570 | int arcompact_handle05_26_dasm(DASM_OPS_32) { print("<illegal 0x05_26> (%08x)", op); return 4;} |
| 1571 | int arcompact_handle05_27_dasm(DASM_OPS_32) { print("<illegal 0x05_27> (%08x)", op); return 4;} |
| 1572 | |
| 1573 | int arcompact_handle05_2a_dasm(DASM_OPS_32) { print("<illegal 0x05_2a> (%08x)", op); return 4;} |
| 1574 | int arcompact_handle05_2b_dasm(DASM_OPS_32) { print("<illegal 0x05_2b> (%08x)", op); return 4;} |
| 1575 | int arcompact_handle05_2c_dasm(DASM_OPS_32) { print("<illegal 0x05_2c> (%08x)", op); return 4;} |
| 1576 | int arcompact_handle05_2d_dasm(DASM_OPS_32) { print("<illegal 0x05_2d> (%08x)", op); return 4;} |
| 1577 | int arcompact_handle05_2e_dasm(DASM_OPS_32) { print("<illegal 0x05_2e> (%08x)", op); return 4;} |
| 1578 | |
| 1579 | int arcompact_handle05_30_dasm(DASM_OPS_32) { print("<illegal 0x05_30> (%08x)", op); return 4;} |
| 1580 | int arcompact_handle05_31_dasm(DASM_OPS_32) { print("<illegal 0x05_31> (%08x)", op); return 4;} |
| 1581 | int arcompact_handle05_32_dasm(DASM_OPS_32) { print("<illegal 0x05_32> (%08x)", op); return 4;} |
| 1582 | int arcompact_handle05_33_dasm(DASM_OPS_32) { print("<illegal 0x05_33> (%08x)", op); return 4;} |
| 1583 | int arcompact_handle05_34_dasm(DASM_OPS_32) { print("<illegal 0x05_34> (%08x)", op); return 4;} |
| 1584 | int arcompact_handle05_35_dasm(DASM_OPS_32) { print("<illegal 0x05_35> (%08x)", op); return 4;} |
| 1585 | int arcompact_handle05_36_dasm(DASM_OPS_32) { print("<illegal 0x05_36> (%08x)", op); return 4;} |
| 1586 | int arcompact_handle05_37_dasm(DASM_OPS_32) { print("<illegal 0x05_37> (%08x)", op); return 4;} |
| 1587 | int arcompact_handle05_38_dasm(DASM_OPS_32) { print("<illegal 0x05_38> (%08x)", op); return 4;} |
| 1588 | int arcompact_handle05_39_dasm(DASM_OPS_32) { print("<illegal 0x05_39> (%08x)", op); return 4;} |
| 1589 | int arcompact_handle05_3a_dasm(DASM_OPS_32) { print("<illegal 0x05_3a> (%08x)", op); return 4;} |
| 1590 | int arcompact_handle05_3b_dasm(DASM_OPS_32) { print("<illegal 0x05_3b> (%08x)", op); return 4;} |
| 1591 | int arcompact_handle05_3c_dasm(DASM_OPS_32) { print("<illegal 0x05_3c> (%08x)", op); return 4;} |
| 1592 | int arcompact_handle05_3d_dasm(DASM_OPS_32) { print("<illegal 0x05_3d> (%08x)", op); return 4;} |
| 1593 | int arcompact_handle05_3e_dasm(DASM_OPS_32) { print("<illegal 0x05_3e> (%08x)", op); return 4;} |
| 1594 | int arcompact_handle05_3f_dasm(DASM_OPS_32) { print("<illegal 0x05_3f> (%08x)", op); return 4;} |
| 1595 | |
| 1596 | int arcompact_handle0f_00_04_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 1597 | int arcompact_handle0f_00_05_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 1598 | int arcompact_handle0f_00_07_02_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_07_02> (%08x)", op); return 2;} |
| 1599 | int arcompact_handle0f_00_07_03_dasm(DASM_OPS_16) { print("<illegal 0x0f_00_07_03> (%08x)", op); return 2;} |
| 1600 | int arcompact_handle0f_01_dasm(DASM_OPS_16) { print("<illegal 0x0f_01> (%08x)", op); return 2;} |
| 1601 | int arcompact_handle0f_03_dasm(DASM_OPS_16) { print("<illegal 0x0f_03> (%08x)", op); return 2;} |
| 1602 | int arcompact_handle0f_08_dasm(DASM_OPS_16) { print("<illegal 0x0f_08> (%08x)", op); return 2;} |
| 1603 | int arcompact_handle0f_09_dasm(DASM_OPS_16) { print("<illegal 0x0f_09> (%08x)", op); return 2;} |
| 1604 | int arcompact_handle0f_0a_dasm(DASM_OPS_16) { print("<illegal 0x0f_0a> (%08x)", op); return 2;} |
| 1605 | int arcompact_handle0f_17_dasm(DASM_OPS_16) { print("<illegal 0x0f_17> (%08x)", op); return 2;} |
| 1606 | |
| 1607 | int arcompact_handle18_05_02_dasm(DASM_OPS_16) { print("<illegal 0x18_05_02> (%04x)", op); return 2;} |
| 1608 | int arcompact_handle18_05_03_dasm(DASM_OPS_16) { print("<illegal 0x18_05_03> (%04x)", op); return 2;} |
| 1609 | int arcompact_handle18_05_04_dasm(DASM_OPS_16) { print("<illegal 0x18_05_04> (%04x)", op); return 2;} |
| 1610 | int arcompact_handle18_05_05_dasm(DASM_OPS_16) { print("<illegal 0x18_05_05> (%04x)", op); return 2;} |
| 1611 | int arcompact_handle18_05_06_dasm(DASM_OPS_16) { print("<illegal 0x18_05_06> (%04x)", op); return 2;} |
| 1612 | int arcompact_handle18_05_07_dasm(DASM_OPS_16) { print("<illegal 0x18_05_07> (%04x)", op); return 2;} |
| 1613 | int arcompact_handle18_06_00_dasm(DASM_OPS_16) { print("<illegal 0x18_06_00> (%04x)", op); return 2;} |
| 1614 | int arcompact_handle18_06_02_dasm(DASM_OPS_16) { print("<illegal 0x18_06_02> (%04x)", op); return 2;} |
| 1615 | int arcompact_handle18_06_03_dasm(DASM_OPS_16) { print("<illegal 0x18_06_03> (%04x)", op); return 2;} |
| 1616 | int arcompact_handle18_06_04_dasm(DASM_OPS_16) { print("<illegal 0x18_06_04> (%04x)", op); return 2;} |
| 1617 | int arcompact_handle18_06_05_dasm(DASM_OPS_16) { print("<illegal 0x18_06_05> (%04x)", op); return 2;} |
| 1618 | int arcompact_handle18_06_06_dasm(DASM_OPS_16) { print("<illegal 0x18_06_06> (%04x)", op); return 2;} |
| 1619 | int arcompact_handle18_06_07_dasm(DASM_OPS_16) { print("<illegal 0x18_06_07> (%04x)", op); return 2;} |
| 1620 | int arcompact_handle18_06_08_dasm(DASM_OPS_16) { print("<illegal 0x18_06_08> (%04x)", op); return 2;} |
| 1621 | int arcompact_handle18_06_09_dasm(DASM_OPS_16) { print("<illegal 0x18_06_09> (%04x)", op); return 2;} |
| 1622 | int arcompact_handle18_06_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0a> (%04x)", op); return 2;} |
| 1623 | int arcompact_handle18_06_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0b> (%04x)", op); return 2;} |
| 1624 | int arcompact_handle18_06_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0c> (%04x)", op); return 2;} |
| 1625 | int arcompact_handle18_06_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0d> (%04x)", op); return 2;} |
| 1626 | int arcompact_handle18_06_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0e> (%04x)", op); return 2;} |
| 1627 | int arcompact_handle18_06_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_0f> (%04x)", op); return 2;} |
| 1628 | int arcompact_handle18_06_10_dasm(DASM_OPS_16) { print("<illegal 0x18_06_10> (%04x)", op); return 2;} |
| 1629 | int arcompact_handle18_06_12_dasm(DASM_OPS_16) { print("<illegal 0x18_06_12> (%04x)", op); return 2;} |
| 1630 | int arcompact_handle18_06_13_dasm(DASM_OPS_16) { print("<illegal 0x18_06_13> (%04x)", op); return 2;} |
| 1631 | int arcompact_handle18_06_14_dasm(DASM_OPS_16) { print("<illegal 0x18_06_14> (%04x)", op); return 2;} |
| 1632 | int arcompact_handle18_06_15_dasm(DASM_OPS_16) { print("<illegal 0x18_06_15> (%04x)", op); return 2;} |
| 1633 | int arcompact_handle18_06_16_dasm(DASM_OPS_16) { print("<illegal 0x18_06_16> (%04x)", op); return 2;} |
| 1634 | int arcompact_handle18_06_17_dasm(DASM_OPS_16) { print("<illegal 0x18_06_17> (%04x)", op); return 2;} |
| 1635 | int arcompact_handle18_06_18_dasm(DASM_OPS_16) { print("<illegal 0x18_06_18> (%04x)", op); return 2;} |
| 1636 | int arcompact_handle18_06_19_dasm(DASM_OPS_16) { print("<illegal 0x18_06_19> (%04x)", op); return 2;} |
| 1637 | int arcompact_handle18_06_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1a> (%04x)", op); return 2;} |
| 1638 | int arcompact_handle18_06_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1b> (%04x)", op); return 2;} |
| 1639 | int arcompact_handle18_06_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1c> (%04x)", op); return 2;} |
| 1640 | int arcompact_handle18_06_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1d> (%04x)", op); return 2;} |
| 1641 | int arcompact_handle18_06_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1e> (%04x)", op); return 2;} |
| 1642 | int arcompact_handle18_06_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_06_1f> (%04x)", op); return 2;} |
| 1643 | int arcompact_handle18_07_00_dasm(DASM_OPS_16) { print("<illegal 0x18_07_00> (%04x)", op); return 2;} |
| 1644 | int arcompact_handle18_07_02_dasm(DASM_OPS_16) { print("<illegal 0x18_07_02> (%04x)", op); return 2;} |
| 1645 | int arcompact_handle18_07_03_dasm(DASM_OPS_16) { print("<illegal 0x18_07_03> (%04x)", op); return 2;} |
| 1646 | int arcompact_handle18_07_04_dasm(DASM_OPS_16) { print("<illegal 0x18_07_04> (%04x)", op); return 2;} |
| 1647 | int arcompact_handle18_07_05_dasm(DASM_OPS_16) { print("<illegal 0x18_07_05> (%04x)", op); return 2;} |
| 1648 | int arcompact_handle18_07_06_dasm(DASM_OPS_16) { print("<illegal 0x18_07_06> (%04x)", op); return 2;} |
| 1649 | int arcompact_handle18_07_07_dasm(DASM_OPS_16) { print("<illegal 0x18_07_07> (%04x)", op); return 2;} |
| 1650 | int arcompact_handle18_07_08_dasm(DASM_OPS_16) { print("<illegal 0x18_07_08> (%04x)", op); return 2;} |
| 1651 | int arcompact_handle18_07_09_dasm(DASM_OPS_16) { print("<illegal 0x18_07_09> (%04x)", op); return 2;} |
| 1652 | int arcompact_handle18_07_0a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0a> (%04x)", op); return 2;} |
| 1653 | int arcompact_handle18_07_0b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0b> (%04x)", op); return 2;} |
| 1654 | int arcompact_handle18_07_0c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0c> (%04x)", op); return 2;} |
| 1655 | int arcompact_handle18_07_0d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0d> (%04x)", op); return 2;} |
| 1656 | int arcompact_handle18_07_0e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0e> (%04x)", op); return 2;} |
| 1657 | int arcompact_handle18_07_0f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_0f> (%04x)", op); return 2;} |
| 1658 | int arcompact_handle18_07_10_dasm(DASM_OPS_16) { print("<illegal 0x18_07_10> (%04x)", op); return 2;} |
| 1659 | int arcompact_handle18_07_12_dasm(DASM_OPS_16) { print("<illegal 0x18_07_12> (%04x)", op); return 2;} |
| 1660 | int arcompact_handle18_07_13_dasm(DASM_OPS_16) { print("<illegal 0x18_07_13> (%04x)", op); return 2;} |
| 1661 | int arcompact_handle18_07_14_dasm(DASM_OPS_16) { print("<illegal 0x18_07_14> (%04x)", op); return 2;} |
| 1662 | int arcompact_handle18_07_15_dasm(DASM_OPS_16) { print("<illegal 0x18_07_15> (%04x)", op); return 2;} |
| 1663 | int arcompact_handle18_07_16_dasm(DASM_OPS_16) { print("<illegal 0x18_07_16> (%04x)", op); return 2;} |
| 1664 | int arcompact_handle18_07_17_dasm(DASM_OPS_16) { print("<illegal 0x18_07_17> (%04x)", op); return 2;} |
| 1665 | int arcompact_handle18_07_18_dasm(DASM_OPS_16) { print("<illegal 0x18_07_18> (%04x)", op); return 2;} |
| 1666 | int arcompact_handle18_07_19_dasm(DASM_OPS_16) { print("<illegal 0x18_07_19> (%04x)", op); return 2;} |
| 1667 | int arcompact_handle18_07_1a_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1a> (%04x)", op); return 2;} |
| 1668 | int arcompact_handle18_07_1b_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1b> (%04x)", op); return 2;} |
| 1669 | int arcompact_handle18_07_1c_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1c> (%04x)", op); return 2;} |
| 1670 | int arcompact_handle18_07_1d_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1d> (%04x)", op); return 2;} |
| 1671 | int arcompact_handle18_07_1e_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1e> (%04x)", op); return 2;} |
| 1672 | int arcompact_handle18_07_1f_dasm(DASM_OPS_16) { print("<illegal 0x18_07_1f> (%04x)", op); return 2;} |
| 1673 | |
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.h
| r0 | r242414 | |
| 1 | |
| 2 | /************************************************************************************************************************************ |
| 3 | * * |
| 4 | * individual opcode handlers (disassembly) * |
| 5 | * * |
| 6 | ************************************************************************************************************************************/ |
| 7 | |
| 8 | #define DASM_OPS_16 char *output, offs_t pc, UINT16 op, const UINT8* oprom |
| 9 | #define DASM_OPS_32 char *output, offs_t pc, UINT32 op, const UINT8* oprom |
| 10 | #define DASM_PARAMS output, pc, op, oprom |
| 11 | |
| 12 | #define LIMM_REG 62 |
| 13 | |
| 14 | #define GET_LIMM_32 \ |
| 15 | limm = oprom[6] | (oprom[7] << 8); \ |
| 16 | limm |= (oprom[4] << 16) | (oprom[5] << 24); \ |
| 17 | |
| 18 | |
| 19 | int arcompact_handle00_00_dasm(DASM_OPS_32); |
| 20 | int arcompact_handle00_01_dasm(DASM_OPS_32); |
| 21 | int arcompact_handle01_00_00dasm(DASM_OPS_32); |
| 22 | int arcompact_handle01_00_01dasm(DASM_OPS_32); |
| 23 | int arcompact_handle01_01_00_00_dasm(DASM_OPS_32); |
| 24 | int arcompact_handle01_01_00_01_dasm(DASM_OPS_32); |
| 25 | int arcompact_handle01_01_00_02_dasm(DASM_OPS_32); |
| 26 | int arcompact_handle01_01_00_03_dasm(DASM_OPS_32); |
| 27 | int arcompact_handle01_01_00_04_dasm(DASM_OPS_32); |
| 28 | int arcompact_handle01_01_00_05_dasm(DASM_OPS_32); |
| 29 | int arcompact_handle01_01_00_0e_dasm(DASM_OPS_32); |
| 30 | int arcompact_handle01_01_00_0f_dasm(DASM_OPS_32); |
| 31 | int arcompact_handle01_01_01_00_dasm(DASM_OPS_32); |
| 32 | int arcompact_handle01_01_01_01_dasm(DASM_OPS_32); |
| 33 | int arcompact_handle01_01_01_02_dasm(DASM_OPS_32); |
| 34 | int arcompact_handle01_01_01_03_dasm(DASM_OPS_32); |
| 35 | int arcompact_handle01_01_01_04_dasm(DASM_OPS_32); |
| 36 | int arcompact_handle01_01_01_05_dasm(DASM_OPS_32); |
| 37 | int arcompact_handle01_01_01_0e_dasm(DASM_OPS_32); |
| 38 | int arcompact_handle01_01_01_0f_dasm(DASM_OPS_32); |
| 39 | int arcompact_handle02_dasm(DASM_OPS_32); |
| 40 | int arcompact_handle03_dasm(DASM_OPS_32); |
| 41 | int arcompact_handle04_00_dasm(DASM_OPS_32); |
| 42 | int arcompact_handle04_01_dasm(DASM_OPS_32); |
| 43 | int arcompact_handle04_02_dasm(DASM_OPS_32); |
| 44 | int arcompact_handle04_03_dasm(DASM_OPS_32); |
| 45 | int arcompact_handle04_04_dasm(DASM_OPS_32); |
| 46 | int arcompact_handle04_05_dasm(DASM_OPS_32); |
| 47 | int arcompact_handle04_06_dasm(DASM_OPS_32); |
| 48 | int arcompact_handle04_07_dasm(DASM_OPS_32); |
| 49 | int arcompact_handle04_08_dasm(DASM_OPS_32); |
| 50 | int arcompact_handle04_09_dasm(DASM_OPS_32); |
| 51 | int arcompact_handle04_0a_dasm(DASM_OPS_32); |
| 52 | int arcompact_handle04_0b_dasm(DASM_OPS_32); |
| 53 | int arcompact_handle04_0c_dasm(DASM_OPS_32); |
| 54 | int arcompact_handle04_0d_dasm(DASM_OPS_32); |
| 55 | int arcompact_handle04_0e_dasm(DASM_OPS_32); |
| 56 | int arcompact_handle04_0f_dasm(DASM_OPS_32); |
| 57 | int arcompact_handle04_10_dasm(DASM_OPS_32); |
| 58 | int arcompact_handle04_11_dasm(DASM_OPS_32); |
| 59 | int arcompact_handle04_12_dasm(DASM_OPS_32); |
| 60 | int arcompact_handle04_13_dasm(DASM_OPS_32); |
| 61 | int arcompact_handle04_14_dasm(DASM_OPS_32); |
| 62 | int arcompact_handle04_15_dasm(DASM_OPS_32); |
| 63 | int arcompact_handle04_16_dasm(DASM_OPS_32); |
| 64 | int arcompact_handle04_17_dasm(DASM_OPS_32); |
| 65 | int arcompact_handle04_18_dasm(DASM_OPS_32); |
| 66 | int arcompact_handle04_19_dasm(DASM_OPS_32); |
| 67 | int arcompact_handle04_1a_dasm(DASM_OPS_32); |
| 68 | int arcompact_handle04_1b_dasm(DASM_OPS_32); |
| 69 | int arcompact_handle04_1c_dasm(DASM_OPS_32); |
| 70 | int arcompact_handle04_1d_dasm(DASM_OPS_32); |
| 71 | int arcompact_handle04_20_dasm(DASM_OPS_32); |
| 72 | int arcompact_handle04_21_dasm(DASM_OPS_32); |
| 73 | int arcompact_handle04_22_dasm(DASM_OPS_32); |
| 74 | int arcompact_handle04_23_dasm(DASM_OPS_32); |
| 75 | int arcompact_handle04_28_dasm(DASM_OPS_32); |
| 76 | int arcompact_handle04_29_dasm(DASM_OPS_32); |
| 77 | int arcompact_handle04_2a_dasm(DASM_OPS_32); |
| 78 | int arcompact_handle04_2b_dasm(DASM_OPS_32); |
| 79 | int arcompact_handle04_2f_00_dasm(DASM_OPS_32); |
| 80 | int arcompact_handle04_2f_01_dasm(DASM_OPS_32); |
| 81 | int arcompact_handle04_2f_02_dasm(DASM_OPS_32); |
| 82 | int arcompact_handle04_2f_03_dasm(DASM_OPS_32); |
| 83 | int arcompact_handle04_2f_04_dasm(DASM_OPS_32); |
| 84 | int arcompact_handle04_2f_05_dasm(DASM_OPS_32); |
| 85 | int arcompact_handle04_2f_06_dasm(DASM_OPS_32); |
| 86 | int arcompact_handle04_2f_07_dasm(DASM_OPS_32); |
| 87 | int arcompact_handle04_2f_08_dasm(DASM_OPS_32); |
| 88 | int arcompact_handle04_2f_09_dasm(DASM_OPS_32); |
| 89 | int arcompact_handle04_2f_0a_dasm(DASM_OPS_32); |
| 90 | int arcompact_handle04_2f_0b_dasm(DASM_OPS_32); |
| 91 | int arcompact_handle04_2f_0c_dasm(DASM_OPS_32); |
| 92 | int arcompact_handle04_2f_3f_01_dasm(DASM_OPS_32); |
| 93 | int arcompact_handle04_2f_3f_02_dasm(DASM_OPS_32); |
| 94 | int arcompact_handle04_2f_3f_03_dasm(DASM_OPS_32); |
| 95 | int arcompact_handle04_2f_3f_04_dasm(DASM_OPS_32); |
| 96 | int arcompact_handle04_2f_3f_05_dasm(DASM_OPS_32); |
| 97 | int arcompact_handle04_30_dasm(DASM_OPS_32); |
| 98 | int arcompact_handle04_31_dasm(DASM_OPS_32); |
| 99 | int arcompact_handle04_32_dasm(DASM_OPS_32); |
| 100 | int arcompact_handle04_33_dasm(DASM_OPS_32); |
| 101 | int arcompact_handle04_34_dasm(DASM_OPS_32); |
| 102 | int arcompact_handle04_35_dasm(DASM_OPS_32); |
| 103 | int arcompact_handle04_36_dasm(DASM_OPS_32); |
| 104 | int arcompact_handle04_37_dasm(DASM_OPS_32); |
| 105 | int arcompact_handle05_00_dasm(DASM_OPS_32); |
| 106 | int arcompact_handle05_01_dasm(DASM_OPS_32); |
| 107 | int arcompact_handle05_02_dasm(DASM_OPS_32); |
| 108 | int arcompact_handle05_03_dasm(DASM_OPS_32); |
| 109 | int arcompact_handle05_04_dasm(DASM_OPS_32); |
| 110 | int arcompact_handle05_05_dasm(DASM_OPS_32); |
| 111 | int arcompact_handle05_06_dasm(DASM_OPS_32); |
| 112 | int arcompact_handle05_07_dasm(DASM_OPS_32); |
| 113 | int arcompact_handle05_08_dasm(DASM_OPS_32); |
| 114 | int arcompact_handle05_0a_dasm(DASM_OPS_32); |
| 115 | int arcompact_handle05_0b_dasm(DASM_OPS_32); |
| 116 | int arcompact_handle05_28_dasm(DASM_OPS_32); |
| 117 | int arcompact_handle05_29_dasm(DASM_OPS_32); |
| 118 | int arcompact_handle05_2f_dasm(DASM_OPS_32); |
| 119 | int arcompact_handle06_dasm(DASM_OPS_32); |
| 120 | int arcompact_handle07_dasm(DASM_OPS_32); |
| 121 | int arcompact_handle08_dasm(DASM_OPS_32); |
| 122 | int arcompact_handle09_dasm(DASM_OPS_32); |
| 123 | int arcompact_handle0a_dasm(DASM_OPS_32); |
| 124 | int arcompact_handle0b_dasm(DASM_OPS_32); |
| 125 | |
| 126 | int arcompact_handle0c_00_dasm(DASM_OPS_16); |
| 127 | int arcompact_handle0c_01_dasm(DASM_OPS_16); |
| 128 | int arcompact_handle0c_02_dasm(DASM_OPS_16); |
| 129 | int arcompact_handle0c_03_dasm(DASM_OPS_16); |
| 130 | int arcompact_handle0d_00_dasm(DASM_OPS_16); |
| 131 | int arcompact_handle0d_01_dasm(DASM_OPS_16); |
| 132 | int arcompact_handle0d_02_dasm(DASM_OPS_16); |
| 133 | int arcompact_handle0d_03_dasm(DASM_OPS_16); |
| 134 | int arcompact_handle0e_00_dasm(DASM_OPS_16); |
| 135 | int arcompact_handle0e_01_dasm(DASM_OPS_16); |
| 136 | int arcompact_handle0e_02_dasm(DASM_OPS_16); |
| 137 | int arcompact_handle0e_03_dasm(DASM_OPS_16); |
| 138 | int arcompact_handle0f_00_00_dasm(DASM_OPS_16); |
| 139 | int arcompact_handle0f_00_01_dasm(DASM_OPS_16); |
| 140 | int arcompact_handle0f_00_02_dasm(DASM_OPS_16); |
| 141 | int arcompact_handle0f_00_03_dasm(DASM_OPS_16); |
| 142 | int arcompact_handle0f_00_06_dasm(DASM_OPS_16); |
| 143 | int arcompact_handle0f_00_07_00_dasm(DASM_OPS_16); |
| 144 | int arcompact_handle0f_00_07_01_dasm(DASM_OPS_16); |
| 145 | int arcompact_handle0f_00_07_04_dasm(DASM_OPS_16); |
| 146 | int arcompact_handle0f_00_07_05_dasm(DASM_OPS_16); |
| 147 | int arcompact_handle0f_00_07_06_dasm(DASM_OPS_16); |
| 148 | int arcompact_handle0f_00_07_07_dasm(DASM_OPS_16); |
| 149 | int arcompact_handle0f_02_dasm(DASM_OPS_16); |
| 150 | int arcompact_handle0f_04_dasm(DASM_OPS_16); |
| 151 | int arcompact_handle0f_05_dasm(DASM_OPS_16); |
| 152 | int arcompact_handle0f_06_dasm(DASM_OPS_16); |
| 153 | int arcompact_handle0f_07_dasm(DASM_OPS_16); |
| 154 | int arcompact_handle0f_0b_dasm(DASM_OPS_16); |
| 155 | int arcompact_handle0f_0c_dasm(DASM_OPS_16); |
| 156 | int arcompact_handle0f_0d_dasm(DASM_OPS_16); |
| 157 | int arcompact_handle0f_0e_dasm(DASM_OPS_16); |
| 158 | int arcompact_handle0f_0f_dasm(DASM_OPS_16); |
| 159 | int arcompact_handle0f_10_dasm(DASM_OPS_16); |
| 160 | int arcompact_handle0f_11_dasm(DASM_OPS_16); |
| 161 | int arcompact_handle0f_12_dasm(DASM_OPS_16); |
| 162 | int arcompact_handle0f_13_dasm(DASM_OPS_16); |
| 163 | int arcompact_handle0f_14_dasm(DASM_OPS_16); |
| 164 | int arcompact_handle0f_15_dasm(DASM_OPS_16); |
| 165 | int arcompact_handle0f_16_dasm(DASM_OPS_16); |
| 166 | int arcompact_handle0f_18_dasm(DASM_OPS_16); |
| 167 | int arcompact_handle0f_19_dasm(DASM_OPS_16); |
| 168 | int arcompact_handle0f_1a_dasm(DASM_OPS_16); |
| 169 | int arcompact_handle0f_1b_dasm(DASM_OPS_16); |
| 170 | int arcompact_handle0f_1c_dasm(DASM_OPS_16); |
| 171 | int arcompact_handle0f_1d_dasm(DASM_OPS_16); |
| 172 | int arcompact_handle0f_1e_dasm(DASM_OPS_16); |
| 173 | int arcompact_handle0f_1f_dasm(DASM_OPS_16); |
| 174 | int arcompact_handle10_dasm(DASM_OPS_16); |
| 175 | int arcompact_handle11_dasm(DASM_OPS_16); |
| 176 | int arcompact_handle12_dasm(DASM_OPS_16); |
| 177 | int arcompact_handle13_dasm(DASM_OPS_16); |
| 178 | int arcompact_handle14_dasm(DASM_OPS_16); |
| 179 | int arcompact_handle15_dasm(DASM_OPS_16); |
| 180 | int arcompact_handle16_dasm(DASM_OPS_16); |
| 181 | int arcompact_handle17_00_dasm(DASM_OPS_16); |
| 182 | int arcompact_handle17_01_dasm(DASM_OPS_16); |
| 183 | int arcompact_handle17_02_dasm(DASM_OPS_16); |
| 184 | int arcompact_handle17_03_dasm(DASM_OPS_16); |
| 185 | int arcompact_handle17_04_dasm(DASM_OPS_16); |
| 186 | int arcompact_handle17_05_dasm(DASM_OPS_16); |
| 187 | int arcompact_handle17_06_dasm(DASM_OPS_16); |
| 188 | int arcompact_handle17_07_dasm(DASM_OPS_16); |
| 189 | int arcompact_handle18_00_dasm(DASM_OPS_16); |
| 190 | int arcompact_handle18_01_dasm(DASM_OPS_16); |
| 191 | int arcompact_handle18_02_dasm(DASM_OPS_16); |
| 192 | int arcompact_handle18_03_dasm(DASM_OPS_16); |
| 193 | int arcompact_handle18_04_dasm(DASM_OPS_16); |
| 194 | int arcompact_handle18_05_00_dasm(DASM_OPS_16); |
| 195 | int arcompact_handle18_05_01_dasm(DASM_OPS_16); |
| 196 | int arcompact_handle18_06_01_dasm(DASM_OPS_16); |
| 197 | int arcompact_handle18_06_11_dasm(DASM_OPS_16); |
| 198 | int arcompact_handle18_07_01_dasm(DASM_OPS_16); |
| 199 | int arcompact_handle18_07_11_dasm(DASM_OPS_16); |
| 200 | int arcompact_handle19_00_dasm(DASM_OPS_16); |
| 201 | int arcompact_handle19_01_dasm(DASM_OPS_16); |
| 202 | int arcompact_handle19_02_dasm(DASM_OPS_16); |
| 203 | int arcompact_handle19_03_dasm(DASM_OPS_16); |
| 204 | int arcompact_handle1a_dasm(DASM_OPS_16); |
| 205 | int arcompact_handle1b_dasm(DASM_OPS_16); |
| 206 | int arcompact_handle1c_00_dasm(DASM_OPS_16); |
| 207 | int arcompact_handle1c_01_dasm(DASM_OPS_16); |
| 208 | int arcompact_handle1d_00_dasm(DASM_OPS_16); |
| 209 | int arcompact_handle1d_01_dasm(DASM_OPS_16); |
| 210 | int arcompact_handle1e_00_dasm(DASM_OPS_16); |
| 211 | int arcompact_handle1e_01_dasm(DASM_OPS_16); |
| 212 | int arcompact_handle1e_02_dasm(DASM_OPS_16); |
| 213 | int arcompact_handle1e_03_00_dasm(DASM_OPS_16); |
| 214 | int arcompact_handle1e_03_01_dasm(DASM_OPS_16); |
| 215 | int arcompact_handle1e_03_02_dasm(DASM_OPS_16); |
| 216 | int arcompact_handle1e_03_03_dasm(DASM_OPS_16); |
| 217 | int arcompact_handle1e_03_04_dasm(DASM_OPS_16); |
| 218 | int arcompact_handle1e_03_05_dasm(DASM_OPS_16); |
| 219 | int arcompact_handle1e_03_06_dasm(DASM_OPS_16); |
| 220 | int arcompact_handle1e_03_07_dasm(DASM_OPS_16); |
| 221 | int arcompact_handle1f_dasm(DASM_OPS_16); |
| 222 | |
| 223 | /************************************************************************************************************************************ |
| 224 | * * |
| 225 | * illegal opcode handlers (disassembly) * |
| 226 | * * |
| 227 | ************************************************************************************************************************************/ |
| 228 | |
| 229 | int arcompact_handle01_01_00_06_dasm(DASM_OPS_32); //("<illegal 01_01_00_06> (%08x)", op); return 4; } |
| 230 | int arcompact_handle01_01_00_07_dasm(DASM_OPS_32); //("<illegal 01_01_00_07> (%08x)", op); return 4; } |
| 231 | int arcompact_handle01_01_00_08_dasm(DASM_OPS_32); //("<illegal 01_01_00_08> (%08x)", op); return 4; } |
| 232 | int arcompact_handle01_01_00_09_dasm(DASM_OPS_32); //("<illegal 01_01_00_09> (%08x)", op); return 4; } |
| 233 | int arcompact_handle01_01_00_0a_dasm(DASM_OPS_32); //("<illegal 01_01_00_0a> (%08x)", op); return 4; } |
| 234 | int arcompact_handle01_01_00_0b_dasm(DASM_OPS_32); //("<illegal 01_01_00_0b> (%08x)", op); return 4; } |
| 235 | int arcompact_handle01_01_00_0c_dasm(DASM_OPS_32); //("<illegal 01_01_00_0c> (%08x)", op); return 4; } |
| 236 | int arcompact_handle01_01_00_0d_dasm(DASM_OPS_32); //("<illegal 01_01_00_0d> (%08x)", op); return 4; } |
| 237 | |
| 238 | int arcompact_handle01_01_01_06_dasm(DASM_OPS_32); //("<illegal 01_01_01_06> (%08x)", op); return 4; } |
| 239 | int arcompact_handle01_01_01_07_dasm(DASM_OPS_32); //("<illegal 01_01_01_07> (%08x)", op); return 4; } |
| 240 | int arcompact_handle01_01_01_08_dasm(DASM_OPS_32); //("<illegal 01_01_01_08> (%08x)", op); return 4; } |
| 241 | int arcompact_handle01_01_01_09_dasm(DASM_OPS_32); //("<illegal 01_01_01_09> (%08x)", op); return 4; } |
| 242 | int arcompact_handle01_01_01_0a_dasm(DASM_OPS_32); //("<illegal 01_01_01_0a> (%08x)", op); return 4; } |
| 243 | int arcompact_handle01_01_01_0b_dasm(DASM_OPS_32); //("<illegal 01_01_01_0b> (%08x)", op); return 4; } |
| 244 | int arcompact_handle01_01_01_0c_dasm(DASM_OPS_32); //("<illegal 01_01_01_0c> (%08x)", op); return 4; } |
| 245 | int arcompact_handle01_01_01_0d_dasm(DASM_OPS_32); //("<illegal 01_01_01_0d> (%08x)", op); return 4; } |
| 246 | |
| 247 | |
| 248 | int arcompact_handle04_1e_dasm(DASM_OPS_32); //("<illegal 0x04_1e> (%08x)", op); return 4;} |
| 249 | int arcompact_handle04_1f_dasm(DASM_OPS_32); //("<illegal 0x04_1f> (%08x)", op); return 4;} |
| 250 | |
| 251 | int arcompact_handle04_24_dasm(DASM_OPS_32); //("<illegal 0x04_24> (%08x)", op); return 4;} |
| 252 | int arcompact_handle04_25_dasm(DASM_OPS_32); //("<illegal 0x04_25> (%08x)", op); return 4;} |
| 253 | int arcompact_handle04_26_dasm(DASM_OPS_32); //("<illegal 0x04_26> (%08x)", op); return 4;} |
| 254 | int arcompact_handle04_27_dasm(DASM_OPS_32); //("<illegal 0x04_27> (%08x)", op); return 4;} |
| 255 | |
| 256 | int arcompact_handle04_2c_dasm(DASM_OPS_32); //("<illegal 0x04_2c> (%08x)", op); return 4;} |
| 257 | int arcompact_handle04_2d_dasm(DASM_OPS_32); //("<illegal 0x04_2d> (%08x)", op); return 4;} |
| 258 | int arcompact_handle04_2e_dasm(DASM_OPS_32); //("<illegal 0x04_2e> (%08x)", op); return 4;} |
| 259 | |
| 260 | int arcompact_handle04_2f_0d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_0d> (%08x)", op); return 4;} |
| 261 | int arcompact_handle04_2f_0e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_0e> (%08x)", op); return 4;} |
| 262 | int arcompact_handle04_2f_0f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_0f> (%08x)", op); return 4;} |
| 263 | int arcompact_handle04_2f_10_dasm(DASM_OPS_32); //("<illegal 0x04_2f_10> (%08x)", op); return 4;} |
| 264 | int arcompact_handle04_2f_11_dasm(DASM_OPS_32); //("<illegal 0x04_2f_11> (%08x)", op); return 4;} |
| 265 | int arcompact_handle04_2f_12_dasm(DASM_OPS_32); //("<illegal 0x04_2f_12> (%08x)", op); return 4;} |
| 266 | int arcompact_handle04_2f_13_dasm(DASM_OPS_32); //("<illegal 0x04_2f_13> (%08x)", op); return 4;} |
| 267 | int arcompact_handle04_2f_14_dasm(DASM_OPS_32); //("<illegal 0x04_2f_14> (%08x)", op); return 4;} |
| 268 | int arcompact_handle04_2f_15_dasm(DASM_OPS_32); //("<illegal 0x04_2f_15> (%08x)", op); return 4;} |
| 269 | int arcompact_handle04_2f_16_dasm(DASM_OPS_32); //("<illegal 0x04_2f_16> (%08x)", op); return 4;} |
| 270 | int arcompact_handle04_2f_17_dasm(DASM_OPS_32); //("<illegal 0x04_2f_17> (%08x)", op); return 4;} |
| 271 | int arcompact_handle04_2f_18_dasm(DASM_OPS_32); //("<illegal 0x04_2f_18> (%08x)", op); return 4;} |
| 272 | int arcompact_handle04_2f_19_dasm(DASM_OPS_32); //("<illegal 0x04_2f_19> (%08x)", op); return 4;} |
| 273 | int arcompact_handle04_2f_1a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1a> (%08x)", op); return 4;} |
| 274 | int arcompact_handle04_2f_1b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1b> (%08x)", op); return 4;} |
| 275 | int arcompact_handle04_2f_1c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1c> (%08x)", op); return 4;} |
| 276 | int arcompact_handle04_2f_1d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1d> (%08x)", op); return 4;} |
| 277 | int arcompact_handle04_2f_1e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1e> (%08x)", op); return 4;} |
| 278 | int arcompact_handle04_2f_1f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_1f> (%08x)", op); return 4;} |
| 279 | int arcompact_handle04_2f_20_dasm(DASM_OPS_32); //("<illegal 0x04_2f_20> (%08x)", op); return 4;} |
| 280 | int arcompact_handle04_2f_21_dasm(DASM_OPS_32); //("<illegal 0x04_2f_21> (%08x)", op); return 4;} |
| 281 | int arcompact_handle04_2f_22_dasm(DASM_OPS_32); //("<illegal 0x04_2f_22> (%08x)", op); return 4;} |
| 282 | int arcompact_handle04_2f_23_dasm(DASM_OPS_32); //("<illegal 0x04_2f_23> (%08x)", op); return 4;} |
| 283 | int arcompact_handle04_2f_24_dasm(DASM_OPS_32); //("<illegal 0x04_2f_24> (%08x)", op); return 4;} |
| 284 | int arcompact_handle04_2f_25_dasm(DASM_OPS_32); //("<illegal 0x04_2f_25> (%08x)", op); return 4;} |
| 285 | int arcompact_handle04_2f_26_dasm(DASM_OPS_32); //("<illegal 0x04_2f_26> (%08x)", op); return 4;} |
| 286 | int arcompact_handle04_2f_27_dasm(DASM_OPS_32); //("<illegal 0x04_2f_27> (%08x)", op); return 4;} |
| 287 | int arcompact_handle04_2f_28_dasm(DASM_OPS_32); //("<illegal 0x04_2f_28> (%08x)", op); return 4;} |
| 288 | int arcompact_handle04_2f_29_dasm(DASM_OPS_32); //("<illegal 0x04_2f_29> (%08x)", op); return 4;} |
| 289 | int arcompact_handle04_2f_2a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2a> (%08x)", op); return 4;} |
| 290 | int arcompact_handle04_2f_2b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2b> (%08x)", op); return 4;} |
| 291 | int arcompact_handle04_2f_2c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2c> (%08x)", op); return 4;} |
| 292 | int arcompact_handle04_2f_2d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2d> (%08x)", op); return 4;} |
| 293 | int arcompact_handle04_2f_2e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2e> (%08x)", op); return 4;} |
| 294 | int arcompact_handle04_2f_2f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_2f> (%08x)", op); return 4;} |
| 295 | int arcompact_handle04_2f_30_dasm(DASM_OPS_32); //("<illegal 0x04_2f_30> (%08x)", op); return 4;} |
| 296 | int arcompact_handle04_2f_31_dasm(DASM_OPS_32); //("<illegal 0x04_2f_31> (%08x)", op); return 4;} |
| 297 | int arcompact_handle04_2f_32_dasm(DASM_OPS_32); //("<illegal 0x04_2f_32> (%08x)", op); return 4;} |
| 298 | int arcompact_handle04_2f_33_dasm(DASM_OPS_32); //("<illegal 0x04_2f_33> (%08x)", op); return 4;} |
| 299 | int arcompact_handle04_2f_34_dasm(DASM_OPS_32); //("<illegal 0x04_2f_34> (%08x)", op); return 4;} |
| 300 | int arcompact_handle04_2f_35_dasm(DASM_OPS_32); //("<illegal 0x04_2f_35> (%08x)", op); return 4;} |
| 301 | int arcompact_handle04_2f_36_dasm(DASM_OPS_32); //("<illegal 0x04_2f_36> (%08x)", op); return 4;} |
| 302 | int arcompact_handle04_2f_37_dasm(DASM_OPS_32); //("<illegal 0x04_2f_37> (%08x)", op); return 4;} |
| 303 | int arcompact_handle04_2f_38_dasm(DASM_OPS_32); //("<illegal 0x04_2f_38> (%08x)", op); return 4;} |
| 304 | int arcompact_handle04_2f_39_dasm(DASM_OPS_32); //("<illegal 0x04_2f_39> (%08x)", op); return 4;} |
| 305 | int arcompact_handle04_2f_3a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3a> (%08x)", op); return 4;} |
| 306 | int arcompact_handle04_2f_3b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3b> (%08x)", op); return 4;} |
| 307 | int arcompact_handle04_2f_3c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3c> (%08x)", op); return 4;} |
| 308 | int arcompact_handle04_2f_3d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3d> (%08x)", op); return 4;} |
| 309 | int arcompact_handle04_2f_3e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3e> (%08x)", op); return 4;} |
| 310 | |
| 311 | int arcompact_handle04_2f_3f_00_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_00> (%08x)", op); return 4;} |
| 312 | int arcompact_handle04_2f_3f_06_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_06> (%08x)", op); return 4;} |
| 313 | int arcompact_handle04_2f_3f_07_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_07> (%08x)", op); return 4;} |
| 314 | int arcompact_handle04_2f_3f_08_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_08> (%08x)", op); return 4;} |
| 315 | int arcompact_handle04_2f_3f_09_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_09> (%08x)", op); return 4;} |
| 316 | int arcompact_handle04_2f_3f_0a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0a> (%08x)", op); return 4;} |
| 317 | int arcompact_handle04_2f_3f_0b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0b> (%08x)", op); return 4;} |
| 318 | int arcompact_handle04_2f_3f_0c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0c> (%08x)", op); return 4;} |
| 319 | int arcompact_handle04_2f_3f_0d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0d> (%08x)", op); return 4;} |
| 320 | int arcompact_handle04_2f_3f_0e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0e> (%08x)", op); return 4;} |
| 321 | int arcompact_handle04_2f_3f_0f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_0f> (%08x)", op); return 4;} |
| 322 | int arcompact_handle04_2f_3f_10_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_10> (%08x)", op); return 4;} |
| 323 | int arcompact_handle04_2f_3f_11_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_11> (%08x)", op); return 4;} |
| 324 | int arcompact_handle04_2f_3f_12_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_12> (%08x)", op); return 4;} |
| 325 | int arcompact_handle04_2f_3f_13_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_13> (%08x)", op); return 4;} |
| 326 | int arcompact_handle04_2f_3f_14_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_14> (%08x)", op); return 4;} |
| 327 | int arcompact_handle04_2f_3f_15_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_15> (%08x)", op); return 4;} |
| 328 | int arcompact_handle04_2f_3f_16_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_16> (%08x)", op); return 4;} |
| 329 | int arcompact_handle04_2f_3f_17_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_17> (%08x)", op); return 4;} |
| 330 | int arcompact_handle04_2f_3f_18_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_18> (%08x)", op); return 4;} |
| 331 | int arcompact_handle04_2f_3f_19_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_19> (%08x)", op); return 4;} |
| 332 | int arcompact_handle04_2f_3f_1a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1a> (%08x)", op); return 4;} |
| 333 | int arcompact_handle04_2f_3f_1b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1b> (%08x)", op); return 4;} |
| 334 | int arcompact_handle04_2f_3f_1c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1c> (%08x)", op); return 4;} |
| 335 | int arcompact_handle04_2f_3f_1d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1d> (%08x)", op); return 4;} |
| 336 | int arcompact_handle04_2f_3f_1e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1e> (%08x)", op); return 4;} |
| 337 | int arcompact_handle04_2f_3f_1f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_1f> (%08x)", op); return 4;} |
| 338 | int arcompact_handle04_2f_3f_20_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_20> (%08x)", op); return 4;} |
| 339 | int arcompact_handle04_2f_3f_21_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_21> (%08x)", op); return 4;} |
| 340 | int arcompact_handle04_2f_3f_22_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_22> (%08x)", op); return 4;} |
| 341 | int arcompact_handle04_2f_3f_23_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_23> (%08x)", op); return 4;} |
| 342 | int arcompact_handle04_2f_3f_24_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_24> (%08x)", op); return 4;} |
| 343 | int arcompact_handle04_2f_3f_25_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_25> (%08x)", op); return 4;} |
| 344 | int arcompact_handle04_2f_3f_26_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_26> (%08x)", op); return 4;} |
| 345 | int arcompact_handle04_2f_3f_27_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_27> (%08x)", op); return 4;} |
| 346 | int arcompact_handle04_2f_3f_28_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_28> (%08x)", op); return 4;} |
| 347 | int arcompact_handle04_2f_3f_29_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_29> (%08x)", op); return 4;} |
| 348 | int arcompact_handle04_2f_3f_2a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2a> (%08x)", op); return 4;} |
| 349 | int arcompact_handle04_2f_3f_2b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2b> (%08x)", op); return 4;} |
| 350 | int arcompact_handle04_2f_3f_2c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2c> (%08x)", op); return 4;} |
| 351 | int arcompact_handle04_2f_3f_2d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2d> (%08x)", op); return 4;} |
| 352 | int arcompact_handle04_2f_3f_2e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2e> (%08x)", op); return 4;} |
| 353 | int arcompact_handle04_2f_3f_2f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_2f> (%08x)", op); return 4;} |
| 354 | int arcompact_handle04_2f_3f_30_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_30> (%08x)", op); return 4;} |
| 355 | int arcompact_handle04_2f_3f_31_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_31> (%08x)", op); return 4;} |
| 356 | int arcompact_handle04_2f_3f_32_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_32> (%08x)", op); return 4;} |
| 357 | int arcompact_handle04_2f_3f_33_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_33> (%08x)", op); return 4;} |
| 358 | int arcompact_handle04_2f_3f_34_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_34> (%08x)", op); return 4;} |
| 359 | int arcompact_handle04_2f_3f_35_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_35> (%08x)", op); return 4;} |
| 360 | int arcompact_handle04_2f_3f_36_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_36> (%08x)", op); return 4;} |
| 361 | int arcompact_handle04_2f_3f_37_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_37> (%08x)", op); return 4;} |
| 362 | int arcompact_handle04_2f_3f_38_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_38> (%08x)", op); return 4;} |
| 363 | int arcompact_handle04_2f_3f_39_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_39> (%08x)", op); return 4;} |
| 364 | int arcompact_handle04_2f_3f_3a_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3a> (%08x)", op); return 4;} |
| 365 | int arcompact_handle04_2f_3f_3b_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3b> (%08x)", op); return 4;} |
| 366 | int arcompact_handle04_2f_3f_3c_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3c> (%08x)", op); return 4;} |
| 367 | int arcompact_handle04_2f_3f_3d_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3d> (%08x)", op); return 4;} |
| 368 | int arcompact_handle04_2f_3f_3e_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3e> (%08x)", op); return 4;} |
| 369 | int arcompact_handle04_2f_3f_3f_dasm(DASM_OPS_32); //("<illegal 0x04_2f_3f_3f> (%08x)", op); return 4;} |
| 370 | |
| 371 | int arcompact_handle04_38_dasm(DASM_OPS_32); //("<illegal 0x04_38> (%08x)", op); return 4;} |
| 372 | int arcompact_handle04_39_dasm(DASM_OPS_32); //("<illegal 0x04_39> (%08x)", op); return 4;} |
| 373 | int arcompact_handle04_3a_dasm(DASM_OPS_32); //("<illegal 0x04_3a> (%08x)", op); return 4;} |
| 374 | int arcompact_handle04_3b_dasm(DASM_OPS_32); //("<illegal 0x04_3b> (%08x)", op); return 4;} |
| 375 | int arcompact_handle04_3c_dasm(DASM_OPS_32); //("<illegal 0x04_3c> (%08x)", op); return 4;} |
| 376 | int arcompact_handle04_3d_dasm(DASM_OPS_32); //("<illegal 0x04_3d> (%08x)", op); return 4;} |
| 377 | int arcompact_handle04_3e_dasm(DASM_OPS_32); //("<illegal 0x04_3e> (%08x)", op); return 4;} |
| 378 | int arcompact_handle04_3f_dasm(DASM_OPS_32); //("<illegal 0x04_3f> (%08x)", op); return 4;} |
| 379 | |
| 380 | int arcompact_handle05_09_dasm(DASM_OPS_32); //("<illegal 0x05_09> (%08x)", op); return 4;} |
| 381 | int arcompact_handle05_0c_dasm(DASM_OPS_32); //("<illegal 0x05_0c> (%08x)", op); return 4;} |
| 382 | int arcompact_handle05_0d_dasm(DASM_OPS_32); //("<illegal 0x05_0d> (%08x)", op); return 4;} |
| 383 | int arcompact_handle05_0e_dasm(DASM_OPS_32); //("<illegal 0x05_0e> (%08x)", op); return 4;} |
| 384 | int arcompact_handle05_0f_dasm(DASM_OPS_32); //("<illegal 0x05_0f> (%08x)", op); return 4;} |
| 385 | int arcompact_handle05_10_dasm(DASM_OPS_32); //("<illegal 0x05_10> (%08x)", op); return 4;} |
| 386 | int arcompact_handle05_11_dasm(DASM_OPS_32); //("<illegal 0x05_11> (%08x)", op); return 4;} |
| 387 | int arcompact_handle05_12_dasm(DASM_OPS_32); //("<illegal 0x05_12> (%08x)", op); return 4;} |
| 388 | int arcompact_handle05_13_dasm(DASM_OPS_32); //("<illegal 0x05_13> (%08x)", op); return 4;} |
| 389 | int arcompact_handle05_14_dasm(DASM_OPS_32); //("<illegal 0x05_14> (%08x)", op); return 4;} |
| 390 | int arcompact_handle05_15_dasm(DASM_OPS_32); //("<illegal 0x05_15> (%08x)", op); return 4;} |
| 391 | int arcompact_handle05_16_dasm(DASM_OPS_32); //("<illegal 0x05_16> (%08x)", op); return 4;} |
| 392 | int arcompact_handle05_17_dasm(DASM_OPS_32); //("<illegal 0x05_17> (%08x)", op); return 4;} |
| 393 | int arcompact_handle05_18_dasm(DASM_OPS_32); //("<illegal 0x05_18> (%08x)", op); return 4;} |
| 394 | int arcompact_handle05_19_dasm(DASM_OPS_32); //("<illegal 0x05_19> (%08x)", op); return 4;} |
| 395 | int arcompact_handle05_1a_dasm(DASM_OPS_32); //("<illegal 0x05_1a> (%08x)", op); return 4;} |
| 396 | int arcompact_handle05_1b_dasm(DASM_OPS_32); //("<illegal 0x05_1b> (%08x)", op); return 4;} |
| 397 | int arcompact_handle05_1c_dasm(DASM_OPS_32); //("<illegal 0x05_1c> (%08x)", op); return 4;} |
| 398 | int arcompact_handle05_1d_dasm(DASM_OPS_32); //("<illegal 0x05_1d> (%08x)", op); return 4;} |
| 399 | int arcompact_handle05_1e_dasm(DASM_OPS_32); //("<illegal 0x05_1e> (%08x)", op); return 4;} |
| 400 | int arcompact_handle05_1f_dasm(DASM_OPS_32); //("<illegal 0x05_1f> (%08x)", op); return 4;} |
| 401 | int arcompact_handle05_20_dasm(DASM_OPS_32); //("<illegal 0x05_20> (%08x)", op); return 4;} |
| 402 | int arcompact_handle05_21_dasm(DASM_OPS_32); //("<illegal 0x05_21> (%08x)", op); return 4;} |
| 403 | int arcompact_handle05_22_dasm(DASM_OPS_32); //("<illegal 0x05_22> (%08x)", op); return 4;} |
| 404 | int arcompact_handle05_23_dasm(DASM_OPS_32); //("<illegal 0x05_23> (%08x)", op); return 4;} |
| 405 | int arcompact_handle05_24_dasm(DASM_OPS_32); //("<illegal 0x05_24> (%08x)", op); return 4;} |
| 406 | int arcompact_handle05_25_dasm(DASM_OPS_32); //("<illegal 0x05_25> (%08x)", op); return 4;} |
| 407 | int arcompact_handle05_26_dasm(DASM_OPS_32); //("<illegal 0x05_26> (%08x)", op); return 4;} |
| 408 | int arcompact_handle05_27_dasm(DASM_OPS_32); //("<illegal 0x05_27> (%08x)", op); return 4;} |
| 409 | |
| 410 | int arcompact_handle05_2a_dasm(DASM_OPS_32); //("<illegal 0x05_2a> (%08x)", op); return 4;} |
| 411 | int arcompact_handle05_2b_dasm(DASM_OPS_32); //("<illegal 0x05_2b> (%08x)", op); return 4;} |
| 412 | int arcompact_handle05_2c_dasm(DASM_OPS_32); //("<illegal 0x05_2c> (%08x)", op); return 4;} |
| 413 | int arcompact_handle05_2d_dasm(DASM_OPS_32); //("<illegal 0x05_2d> (%08x)", op); return 4;} |
| 414 | int arcompact_handle05_2e_dasm(DASM_OPS_32); //("<illegal 0x05_2e> (%08x)", op); return 4;} |
| 415 | |
| 416 | int arcompact_handle05_30_dasm(DASM_OPS_32); //("<illegal 0x05_30> (%08x)", op); return 4;} |
| 417 | int arcompact_handle05_31_dasm(DASM_OPS_32); //("<illegal 0x05_31> (%08x)", op); return 4;} |
| 418 | int arcompact_handle05_32_dasm(DASM_OPS_32); //("<illegal 0x05_32> (%08x)", op); return 4;} |
| 419 | int arcompact_handle05_33_dasm(DASM_OPS_32); //("<illegal 0x05_33> (%08x)", op); return 4;} |
| 420 | int arcompact_handle05_34_dasm(DASM_OPS_32); //("<illegal 0x05_34> (%08x)", op); return 4;} |
| 421 | int arcompact_handle05_35_dasm(DASM_OPS_32); //("<illegal 0x05_35> (%08x)", op); return 4;} |
| 422 | int arcompact_handle05_36_dasm(DASM_OPS_32); //("<illegal 0x05_36> (%08x)", op); return 4;} |
| 423 | int arcompact_handle05_37_dasm(DASM_OPS_32); //("<illegal 0x05_37> (%08x)", op); return 4;} |
| 424 | int arcompact_handle05_38_dasm(DASM_OPS_32); //("<illegal 0x05_38> (%08x)", op); return 4;} |
| 425 | int arcompact_handle05_39_dasm(DASM_OPS_32); //("<illegal 0x05_39> (%08x)", op); return 4;} |
| 426 | int arcompact_handle05_3a_dasm(DASM_OPS_32); //("<illegal 0x05_3a> (%08x)", op); return 4;} |
| 427 | int arcompact_handle05_3b_dasm(DASM_OPS_32); //("<illegal 0x05_3b> (%08x)", op); return 4;} |
| 428 | int arcompact_handle05_3c_dasm(DASM_OPS_32); //("<illegal 0x05_3c> (%08x)", op); return 4;} |
| 429 | int arcompact_handle05_3d_dasm(DASM_OPS_32); //("<illegal 0x05_3d> (%08x)", op); return 4;} |
| 430 | int arcompact_handle05_3e_dasm(DASM_OPS_32); //("<illegal 0x05_3e> (%08x)", op); return 4;} |
| 431 | int arcompact_handle05_3f_dasm(DASM_OPS_32); //("<illegal 0x05_3f> (%08x)", op); return 4;} |
| 432 | |
| 433 | int arcompact_handle0f_00_04_dasm(DASM_OPS_16); //("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 434 | int arcompact_handle0f_00_05_dasm(DASM_OPS_16); //("<illegal 0x0f_00_00> (%08x)", op); return 2;} |
| 435 | int arcompact_handle0f_00_07_02_dasm(DASM_OPS_16); //("<illegal 0x0f_00_07_02> (%08x)", op); return 2;} |
| 436 | int arcompact_handle0f_00_07_03_dasm(DASM_OPS_16); //("<illegal 0x0f_00_07_03> (%08x)", op); return 2;} |
| 437 | int arcompact_handle0f_01_dasm(DASM_OPS_16); //("<illegal 0x0f_01> (%08x)", op); return 2;} |
| 438 | int arcompact_handle0f_03_dasm(DASM_OPS_16); //("<illegal 0x0f_03> (%08x)", op); return 2;} |
| 439 | int arcompact_handle0f_08_dasm(DASM_OPS_16); //("<illegal 0x0f_08> (%08x)", op); return 2;} |
| 440 | int arcompact_handle0f_09_dasm(DASM_OPS_16); //("<illegal 0x0f_09> (%08x)", op); return 2;} |
| 441 | int arcompact_handle0f_0a_dasm(DASM_OPS_16); //("<illegal 0x0f_0a> (%08x)", op); return 2;} |
| 442 | int arcompact_handle0f_17_dasm(DASM_OPS_16); //("<illegal 0x0f_17> (%08x)", op); return 2;} |
| 443 | |
| 444 | int arcompact_handle18_05_02_dasm(DASM_OPS_16); //("<illegal 0x18_05_02> (%04x)", op); return 2;} |
| 445 | int arcompact_handle18_05_03_dasm(DASM_OPS_16); //("<illegal 0x18_05_03> (%04x)", op); return 2;} |
| 446 | int arcompact_handle18_05_04_dasm(DASM_OPS_16); //("<illegal 0x18_05_04> (%04x)", op); return 2;} |
| 447 | int arcompact_handle18_05_05_dasm(DASM_OPS_16); //("<illegal 0x18_05_05> (%04x)", op); return 2;} |
| 448 | int arcompact_handle18_05_06_dasm(DASM_OPS_16); //("<illegal 0x18_05_06> (%04x)", op); return 2;} |
| 449 | int arcompact_handle18_05_07_dasm(DASM_OPS_16); //("<illegal 0x18_05_07> (%04x)", op); return 2;} |
| 450 | int arcompact_handle18_06_00_dasm(DASM_OPS_16); //("<illegal 0x18_06_00> (%04x)", op); return 2;} |
| 451 | int arcompact_handle18_06_02_dasm(DASM_OPS_16); //("<illegal 0x18_06_02> (%04x)", op); return 2;} |
| 452 | int arcompact_handle18_06_03_dasm(DASM_OPS_16); //("<illegal 0x18_06_03> (%04x)", op); return 2;} |
| 453 | int arcompact_handle18_06_04_dasm(DASM_OPS_16); //("<illegal 0x18_06_04> (%04x)", op); return 2;} |
| 454 | int arcompact_handle18_06_05_dasm(DASM_OPS_16); //("<illegal 0x18_06_05> (%04x)", op); return 2;} |
| 455 | int arcompact_handle18_06_06_dasm(DASM_OPS_16); //("<illegal 0x18_06_06> (%04x)", op); return 2;} |
| 456 | int arcompact_handle18_06_07_dasm(DASM_OPS_16); //("<illegal 0x18_06_07> (%04x)", op); return 2;} |
| 457 | int arcompact_handle18_06_08_dasm(DASM_OPS_16); //("<illegal 0x18_06_08> (%04x)", op); return 2;} |
| 458 | int arcompact_handle18_06_09_dasm(DASM_OPS_16); //("<illegal 0x18_06_09> (%04x)", op); return 2;} |
| 459 | int arcompact_handle18_06_0a_dasm(DASM_OPS_16); //("<illegal 0x18_06_0a> (%04x)", op); return 2;} |
| 460 | int arcompact_handle18_06_0b_dasm(DASM_OPS_16); //("<illegal 0x18_06_0b> (%04x)", op); return 2;} |
| 461 | int arcompact_handle18_06_0c_dasm(DASM_OPS_16); //("<illegal 0x18_06_0c> (%04x)", op); return 2;} |
| 462 | int arcompact_handle18_06_0d_dasm(DASM_OPS_16); //("<illegal 0x18_06_0d> (%04x)", op); return 2;} |
| 463 | int arcompact_handle18_06_0e_dasm(DASM_OPS_16); //("<illegal 0x18_06_0e> (%04x)", op); return 2;} |
| 464 | int arcompact_handle18_06_0f_dasm(DASM_OPS_16); //("<illegal 0x18_06_0f> (%04x)", op); return 2;} |
| 465 | int arcompact_handle18_06_10_dasm(DASM_OPS_16); //("<illegal 0x18_06_10> (%04x)", op); return 2;} |
| 466 | int arcompact_handle18_06_12_dasm(DASM_OPS_16); //("<illegal 0x18_06_12> (%04x)", op); return 2;} |
| 467 | int arcompact_handle18_06_13_dasm(DASM_OPS_16); //("<illegal 0x18_06_13> (%04x)", op); return 2;} |
| 468 | int arcompact_handle18_06_14_dasm(DASM_OPS_16); //("<illegal 0x18_06_14> (%04x)", op); return 2;} |
| 469 | int arcompact_handle18_06_15_dasm(DASM_OPS_16); //("<illegal 0x18_06_15> (%04x)", op); return 2;} |
| 470 | int arcompact_handle18_06_16_dasm(DASM_OPS_16); //("<illegal 0x18_06_16> (%04x)", op); return 2;} |
| 471 | int arcompact_handle18_06_17_dasm(DASM_OPS_16); //("<illegal 0x18_06_17> (%04x)", op); return 2;} |
| 472 | int arcompact_handle18_06_18_dasm(DASM_OPS_16); //("<illegal 0x18_06_18> (%04x)", op); return 2;} |
| 473 | int arcompact_handle18_06_19_dasm(DASM_OPS_16); //("<illegal 0x18_06_19> (%04x)", op); return 2;} |
| 474 | int arcompact_handle18_06_1a_dasm(DASM_OPS_16); //("<illegal 0x18_06_1a> (%04x)", op); return 2;} |
| 475 | int arcompact_handle18_06_1b_dasm(DASM_OPS_16); //("<illegal 0x18_06_1b> (%04x)", op); return 2;} |
| 476 | int arcompact_handle18_06_1c_dasm(DASM_OPS_16); //("<illegal 0x18_06_1c> (%04x)", op); return 2;} |
| 477 | int arcompact_handle18_06_1d_dasm(DASM_OPS_16); //("<illegal 0x18_06_1d> (%04x)", op); return 2;} |
| 478 | int arcompact_handle18_06_1e_dasm(DASM_OPS_16); //("<illegal 0x18_06_1e> (%04x)", op); return 2;} |
| 479 | int arcompact_handle18_06_1f_dasm(DASM_OPS_16); //("<illegal 0x18_06_1f> (%04x)", op); return 2;} |
| 480 | int arcompact_handle18_07_00_dasm(DASM_OPS_16); //("<illegal 0x18_07_00> (%04x)", op); return 2;} |
| 481 | int arcompact_handle18_07_02_dasm(DASM_OPS_16); //("<illegal 0x18_07_02> (%04x)", op); return 2;} |
| 482 | int arcompact_handle18_07_03_dasm(DASM_OPS_16); //("<illegal 0x18_07_03> (%04x)", op); return 2;} |
| 483 | int arcompact_handle18_07_04_dasm(DASM_OPS_16); //("<illegal 0x18_07_04> (%04x)", op); return 2;} |
| 484 | int arcompact_handle18_07_05_dasm(DASM_OPS_16); //("<illegal 0x18_07_05> (%04x)", op); return 2;} |
| 485 | int arcompact_handle18_07_06_dasm(DASM_OPS_16); //("<illegal 0x18_07_06> (%04x)", op); return 2;} |
| 486 | int arcompact_handle18_07_07_dasm(DASM_OPS_16); //("<illegal 0x18_07_07> (%04x)", op); return 2;} |
| 487 | int arcompact_handle18_07_08_dasm(DASM_OPS_16); //("<illegal 0x18_07_08> (%04x)", op); return 2;} |
| 488 | int arcompact_handle18_07_09_dasm(DASM_OPS_16); //("<illegal 0x18_07_09> (%04x)", op); return 2;} |
| 489 | int arcompact_handle18_07_0a_dasm(DASM_OPS_16); //("<illegal 0x18_07_0a> (%04x)", op); return 2;} |
| 490 | int arcompact_handle18_07_0b_dasm(DASM_OPS_16); //("<illegal 0x18_07_0b> (%04x)", op); return 2;} |
| 491 | int arcompact_handle18_07_0c_dasm(DASM_OPS_16); //("<illegal 0x18_07_0c> (%04x)", op); return 2;} |
| 492 | int arcompact_handle18_07_0d_dasm(DASM_OPS_16); //("<illegal 0x18_07_0d> (%04x)", op); return 2;} |
| 493 | int arcompact_handle18_07_0e_dasm(DASM_OPS_16); //("<illegal 0x18_07_0e> (%04x)", op); return 2;} |
| 494 | int arcompact_handle18_07_0f_dasm(DASM_OPS_16); //("<illegal 0x18_07_0f> (%04x)", op); return 2;} |
| 495 | int arcompact_handle18_07_10_dasm(DASM_OPS_16); //("<illegal 0x18_07_10> (%04x)", op); return 2;} |
| 496 | int arcompact_handle18_07_12_dasm(DASM_OPS_16); //("<illegal 0x18_07_12> (%04x)", op); return 2;} |
| 497 | int arcompact_handle18_07_13_dasm(DASM_OPS_16); //("<illegal 0x18_07_13> (%04x)", op); return 2;} |
| 498 | int arcompact_handle18_07_14_dasm(DASM_OPS_16); //("<illegal 0x18_07_14> (%04x)", op); return 2;} |
| 499 | int arcompact_handle18_07_15_dasm(DASM_OPS_16); //("<illegal 0x18_07_15> (%04x)", op); return 2;} |
| 500 | int arcompact_handle18_07_16_dasm(DASM_OPS_16); //("<illegal 0x18_07_16> (%04x)", op); return 2;} |
| 501 | int arcompact_handle18_07_17_dasm(DASM_OPS_16); //("<illegal 0x18_07_17> (%04x)", op); return 2;} |
| 502 | int arcompact_handle18_07_18_dasm(DASM_OPS_16); //("<illegal 0x18_07_18> (%04x)", op); return 2;} |
| 503 | int arcompact_handle18_07_19_dasm(DASM_OPS_16); //("<illegal 0x18_07_19> (%04x)", op); return 2;} |
| 504 | int arcompact_handle18_07_1a_dasm(DASM_OPS_16); //("<illegal 0x18_07_1a> (%04x)", op); return 2;} |
| 505 | int arcompact_handle18_07_1b_dasm(DASM_OPS_16); //("<illegal 0x18_07_1b> (%04x)", op); return 2;} |
| 506 | int arcompact_handle18_07_1c_dasm(DASM_OPS_16); //("<illegal 0x18_07_1c> (%04x)", op); return 2;} |
| 507 | int arcompact_handle18_07_1d_dasm(DASM_OPS_16); //("<illegal 0x18_07_1d> (%04x)", op); return 2;} |
| 508 | int arcompact_handle18_07_1e_dasm(DASM_OPS_16); //("<illegal 0x18_07_1e> (%04x)", op); return 2;} |
| 509 | int arcompact_handle18_07_1f_dasm(DASM_OPS_16); //("<illegal 0x18_07_1f> (%04x)", op); return 2;} |
| 510 | |
trunk/src/mame/drivers/hikaru.c
| r242413 | r242414 | |
| 11 | 11 | and this system is said to be one of the most expensive arcade boards developed by Sega. |
| 12 | 12 | The games on this system include.... |
| 13 | 13 | Air Trix (C) Sega, 2001 |
| 14 | | !Brave Fire Fighters (C) Sega, 1999 |
| 14 | Brave Fire Fighters (C) Sega, 1999 |
| 15 | 15 | *Cyber Troopers Virtual On 4 (C) Sega, 2001 |
| 16 | | Nascar Racing (C) Sega, 2000 |
| 17 | | Planet Harriers (C) Sega, 2001 |
| 18 | | !Star Wars Racer Arcade (C) Sega, 2000 |
| 16 | Nascar Racing (C) Sega, 2000 |
| 17 | Planet Harriers (C) Sega, 2001 |
| 18 | Star Wars Racer Arcade (C) Sega, 2000 |
| 19 | 19 | |
| 20 | 20 | ! - denotes secured but not fully dumped yet |
| 21 | 21 | * - denotes not dumped yet. |
| r242413 | r242414 | |
| 519 | 519 | |
| 520 | 520 | #define HIKARU_BIOS \ |
| 521 | 521 | ROM_SYSTEM_BIOS( 0, "bios0", "epr23400a" ) \ |
| 522 | | ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr23400a.ic94", 0x000000, 0x200000, CRC(2aa906a7) SHA1(098c9909b123ed6c338ac874f2ee90e3b2da4c02) ) \ |
| 522 | ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-23400a.ic94", 0x000000, 0x200000, CRC(2aa906a7) SHA1(098c9909b123ed6c338ac874f2ee90e3b2da4c02) ) \ |
| 523 | 523 | ROM_SYSTEM_BIOS( 1, "bios1", "epr23400" ) \ |
| 524 | 524 | ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-23400.ic94", 0x000000, 0x200000, CRC(3d557104) SHA1(d39879f5a1acbd54ad8ee4fbd412f870c9ff4aa5) ) \ |
| 525 | 525 | ROM_SYSTEM_BIOS( 2, "bios2", "epr21904" ) \ |
| r242413 | r242414 | |
| 542 | 542 | HIKARU_BIOS |
| 543 | 543 | |
| 544 | 544 | ROM_REGION( 0x800000, "user1", 0) |
| 545 | | ROM_LOAD32_WORD("epr23601a.ic29", 0x0000000, 0x0400000, CRC(cd3ccc05) SHA1(49de32d3588511f37486aff900773453739d706d) ) |
| 546 | | ROM_LOAD32_WORD("epr23602a.ic30", 0x0000002, 0x0400000, CRC(24f1bca9) SHA1(719dc4e003c1d13fcbb39604c156c89042c47dfd) ) |
| 545 | ROM_LOAD32_WORD( "epr-23601a.ic29", 0x0000000, 0x0400000, CRC(cd3ccc05) SHA1(49de32d3588511f37486aff900773453739d706d) ) |
| 546 | ROM_LOAD32_WORD( "epr-23602a.ic30", 0x0000002, 0x0400000, CRC(24f1bca9) SHA1(719dc4e003c1d13fcbb39604c156c89042c47dfd) ) |
| 547 | 547 | /* ic31 unpopulated */ |
| 548 | 548 | /* ic32 unpopulated */ |
| 549 | 549 | /* ic33 unpopulated */ |
| r242413 | r242414 | |
| 553 | 553 | |
| 554 | 554 | /* ROM board using 128M TSOP48 MASKROMs */ |
| 555 | 555 | ROM_REGION( 0x10000000, "user2", 0) |
| 556 | | ROM_LOAD("mpr-23573.ic37" , 0x0000000, 0x1000000, CRC(e22a0734) SHA1(fc06d5972d285d09473874aaeb1efed2d19c8f36) ) |
| 557 | | ROM_LOAD("mpr-23577.ic38" , 0x1000000, 0x1000000, CRC(d007680d) SHA1(a795057c40b1851adb0e19e5dfb39e16206215bf) ) |
| 558 | | ROM_LOAD("mpr-23574.ic41" , 0x2000000, 0x1000000, CRC(a77034a5) SHA1(e6e8e2f747e7a972144436103741acfd7030fe84) ) |
| 559 | | ROM_LOAD("mpr-23578.ic42" , 0x3000000, 0x1000000, CRC(db612dd6) SHA1(e6813a1e16099094d67347027e058be582750ad7) ) |
| 560 | | ROM_LOAD("mpr-23575.ic45" , 0x4000000, 0x1000000, CRC(fe660f06) SHA1(73916f67d852df719fd65b1ed0f8b977c0c33390) ) |
| 561 | | ROM_LOAD("mpr-23579.ic46" , 0x5000000, 0x1000000, CRC(55e656d2) SHA1(5d0b26807cf915ab0ae5cc3a7c9dd6bec43da7b2) ) |
| 562 | | ROM_LOAD("mpr-23576.ic49" , 0x6000000, 0x1000000, CRC(c01e0329) SHA1(df1a3c83f338925d69912af56f675197e14e1793) ) |
| 563 | | ROM_LOAD("mpr-23580.ic50" , 0x7000000, 0x1000000, CRC(d260f39c) SHA1(e5cdf399defaaa7dbcee62f7ab64b898c28d8f7d) ) |
| 556 | ROM_LOAD32_WORD( "mpr-23573.ic37" , 0x0000000, 0x1000000, CRC(e22a0734) SHA1(fc06d5972d285d09473874aaeb1efed2d19c8f36) ) |
| 557 | ROM_LOAD32_WORD( "mpr-23577.ic38" , 0x0000002, 0x1000000, CRC(d007680d) SHA1(a795057c40b1851adb0e19e5dfb39e16206215bf) ) |
| 558 | ROM_LOAD32_WORD( "mpr-23574.ic41" , 0x2000000, 0x1000000, CRC(a77034a5) SHA1(e6e8e2f747e7a972144436103741acfd7030fe84) ) |
| 559 | ROM_LOAD32_WORD( "mpr-23578.ic42" , 0x2000002, 0x1000000, CRC(db612dd6) SHA1(e6813a1e16099094d67347027e058be582750ad7) ) |
| 560 | ROM_LOAD32_WORD( "mpr-23575.ic45" , 0x4000000, 0x1000000, CRC(fe660f06) SHA1(73916f67d852df719fd65b1ed0f8b977c0c33390) ) |
| 561 | ROM_LOAD32_WORD( "mpr-23579.ic46" , 0x4000002, 0x1000000, CRC(55e656d2) SHA1(5d0b26807cf915ab0ae5cc3a7c9dd6bec43da7b2) ) |
| 562 | ROM_LOAD32_WORD( "mpr-23576.ic49" , 0x6000000, 0x1000000, CRC(c01e0329) SHA1(df1a3c83f338925d69912af56f675197e14e1793) ) |
| 563 | ROM_LOAD32_WORD( "mpr-23580.ic50" , 0x6000002, 0x1000000, CRC(d260f39c) SHA1(e5cdf399defaaa7dbcee62f7ab64b898c28d8f7d) ) |
| 564 | 564 | /* ic53 unpopulated */ |
| 565 | 565 | /* ic54 unpopulated */ |
| 566 | 566 | /* ic57 unpopulated */ |
| r242413 | r242414 | |
| 569 | 569 | /* ic62 unpopulated */ |
| 570 | 570 | /* ic65 unpopulated */ |
| 571 | 571 | /* ic66 unpopulated */ |
| 572 | |
| 573 | // 315-5881 security IC key |
| 574 | ROM_REGION( 4, "rom_key", 0 ) |
| 575 | ROM_LOAD( "airtrix-key.bin", 0, 4, CRC(bebdc179) SHA1(327ea299934ef78f3c88329fc624dc3771877453) ) |
| 572 | 576 | ROM_END |
| 573 | 577 | |
| 574 | 578 | |
| r242413 | r242414 | |
| 577 | 581 | HIKARU_BIOS |
| 578 | 582 | |
| 579 | 583 | ROM_REGION( 0x2000000, "user1", 0) |
| 580 | | ROM_LOAD32_WORD("epr23565a.ic29", 0x0000000, 0x0400000, CRC(ca9af8a7) SHA1(e7d6badc03ec5833ee89e49dd389ee19b45da29c) ) |
| 581 | | ROM_LOAD32_WORD("epr23566a.ic30", 0x0000002, 0x0400000, CRC(aad0057c) SHA1(c18c0f1797432c74dc21bcd806cb5760916e4936) ) |
| 582 | | ROM_LOAD32_WORD("epr23567.ic31", 0x0800000, 0x0400000, CRC(f0e3dcdc) SHA1(422978a13e39f439da54e43a65dcad1a5b1f2f27) ) |
| 583 | | ROM_LOAD32_WORD("epr23568.ic32", 0x0800002, 0x0400000, CRC(6eee734c) SHA1(0941761b1690ad4eeac0bf682459992c6f38a930) ) |
| 584 | | ROM_LOAD32_WORD("epr23569.ic33", 0x1000000, 0x0400000, CRC(867c7064) SHA1(5cf0d88a1c739ba69b33f1ba3a0e5544331f63f3) ) |
| 585 | | ROM_LOAD32_WORD("epr23570.ic34", 0x1000002, 0x0400000, CRC(556ff58b) SHA1(7eb527aee823d037d1045d850427efa42d5da787) ) |
| 586 | | ROM_LOAD32_WORD("epr23571.ic35", 0x1800000, 0x0400000, CRC(5a75fa92) SHA1(b5e0c8c995ecc954b74d5eb36f3ae2a732a5986b) ) |
| 587 | | ROM_LOAD32_WORD("epr23572.ic36", 0x1800002, 0x0400000, CRC(46054067) SHA1(449800bdc2c40c76aed9bc5e7e8831d8f03ef286) ) |
| 584 | ROM_LOAD32_WORD("epr-23565a.ic29", 0x0000000, 0x0400000, CRC(ca9af8a7) SHA1(e7d6badc03ec5833ee89e49dd389ee19b45da29c) ) |
| 585 | ROM_LOAD32_WORD("epr-23566a.ic30", 0x0000002, 0x0400000, CRC(aad0057c) SHA1(c18c0f1797432c74dc21bcd806cb5760916e4936) ) |
| 586 | ROM_LOAD32_WORD("epr-23567.ic31", 0x0800000, 0x0400000, CRC(f0e3dcdc) SHA1(422978a13e39f439da54e43a65dcad1a5b1f2f27) ) |
| 587 | ROM_LOAD32_WORD("epr-23568.ic32", 0x0800002, 0x0400000, CRC(6eee734c) SHA1(0941761b1690ad4eeac0bf682459992c6f38a930) ) |
| 588 | ROM_LOAD32_WORD("epr-23569.ic33", 0x1000000, 0x0400000, CRC(867c7064) SHA1(5cf0d88a1c739ba69b33f1ba3a0e5544331f63f3) ) |
| 589 | ROM_LOAD32_WORD("epr-23570.ic34", 0x1000002, 0x0400000, CRC(556ff58b) SHA1(7eb527aee823d037d1045d850427efa42d5da787) ) |
| 590 | ROM_LOAD32_WORD("epr-23571.ic35", 0x1800000, 0x0400000, CRC(5a75fa92) SHA1(b5e0c8c995ecc954b74d5eb36f3ae2a732a5986b) ) |
| 591 | ROM_LOAD32_WORD("epr-23572.ic36", 0x1800002, 0x0400000, CRC(46054067) SHA1(449800bdc2c40c76aed9bc5e7e8831d8f03ef286) ) |
| 588 | 592 | |
| 589 | 593 | /* ROM board using 128M TSOP48 MASKROMs */ |
| 590 | 594 | ROM_REGION( 0x10000000, "user2", 0) |
| 591 | | ROM_LOAD( "mpr-23549.ic37", 0x0000000, 0x1000000, CRC(ed764200) SHA1(ad840a40347345f72a443f284b1bb0ae2b37f7ac) ) |
| 592 | | ROM_LOAD( "mpr-23553.ic38", 0x1000000, 0x1000000, CRC(5e70ae78) SHA1(2ae6bdb5aa1434bb60b2b9bca7af12d6476cd35f) ) |
| 593 | | ROM_LOAD( "mpr-23550.ic41", 0x2000000, 0x1000000, CRC(841b4d3b) SHA1(d442078b6b4926e6e32b911d88a4408d20a8f0df) ) |
| 594 | | ROM_LOAD( "mpr-23554.ic42", 0x3000000, 0x1000000, CRC(5cce99de) SHA1(c39330e4bcfb4cec8b0b59ab184fad5093188765) ) |
| 595 | | ROM_LOAD( "mpr-23551.ic45", 0x4000000, 0x1000000, CRC(71f61d04) SHA1(6f24f82ddc5aaf9bbb41b8baddbcb855f1d37a16) ) |
| 596 | | ROM_LOAD( "mpr-23555.ic46", 0x5000000, 0x1000000, CRC(582e5453) SHA1(cf9fb8b52a169446b98630d67cdce745de917edc) ) |
| 597 | | ROM_LOAD( "mpr-23552.ic49", 0x6000000, 0x1000000, CRC(32487181) SHA1(a885747428c280f77dd861bf802d953da133ef59) ) |
| 598 | | ROM_LOAD( "mpr-23556.ic50", 0x7000000, 0x1000000, CRC(45002955) SHA1(85a27c86692ca79fc4e51a64af63a5e970b86cfa) ) |
| 599 | | ROM_LOAD( "mpr-23557.ic53", 0x8000000, 0x1000000, CRC(c20dff1b) SHA1(d90d3d85f4fddf39c109502c8f9e9f25a7fc43d1) ) |
| 600 | | ROM_LOAD( "mpr-23561.ic54", 0x9000000, 0x1000000, CRC(01237844) SHA1(7a8c6bfdea1d4db5e9f6850fdf1a03d703df3958) ) |
| 601 | | ROM_LOAD( "mpr-23558.ic57", 0xa000000, 0x1000000, CRC(e93cc8d7) SHA1(05fc23b8382daaca7ccd1ca80e7c5e93cbf2b6b1) ) |
| 602 | | ROM_LOAD( "mpr-23562.ic58", 0xb000000, 0x1000000, CRC(85e0816c) SHA1(28106404d1eef4c85dd425d3535a53c5d71e47a0) ) |
| 603 | | ROM_LOAD( "mpr-23559.ic61", 0xc000000, 0x1000000, CRC(1a7f2ba0) SHA1(e2a20138f21297f5313f5368ef9992da8fa23937) ) |
| 604 | | ROM_LOAD( "mpr-23563.ic62", 0xd000000, 0x1000000, CRC(e3dc328b) SHA1(d04ccc4025442c98b96f84c1b300671f3687ec6c) ) |
| 605 | | ROM_LOAD( "mpr-23560.ic65", 0xe000000, 0x1000000, CRC(24bb7072) SHA1(dad5135c89d292e4a1f96bd0ad28be6a17154be0) ) |
| 606 | | ROM_LOAD( "mpr-23564.ic66", 0xf000000, 0x1000000, CRC(255724b6) SHA1(1b382fad165831de3f2e39352c031146759dfc69) ) |
| 595 | ROM_LOAD32_WORD( "mpr-23549.ic37", 0x0000000, 0x1000000, CRC(ed764200) SHA1(ad840a40347345f72a443f284b1bb0ae2b37f7ac) ) |
| 596 | ROM_LOAD32_WORD( "mpr-23553.ic38", 0x0000002, 0x1000000, CRC(5e70ae78) SHA1(2ae6bdb5aa1434bb60b2b9bca7af12d6476cd35f) ) |
| 597 | ROM_LOAD32_WORD( "mpr-23550.ic41", 0x2000000, 0x1000000, CRC(841b4d3b) SHA1(d442078b6b4926e6e32b911d88a4408d20a8f0df) ) |
| 598 | ROM_LOAD32_WORD( "mpr-23554.ic42", 0x2000002, 0x1000000, CRC(5cce99de) SHA1(c39330e4bcfb4cec8b0b59ab184fad5093188765) ) |
| 599 | ROM_LOAD32_WORD( "mpr-23551.ic45", 0x4000000, 0x1000000, CRC(71f61d04) SHA1(6f24f82ddc5aaf9bbb41b8baddbcb855f1d37a16) ) |
| 600 | ROM_LOAD32_WORD( "mpr-23555.ic46", 0x4000002, 0x1000000, CRC(582e5453) SHA1(cf9fb8b52a169446b98630d67cdce745de917edc) ) |
| 601 | ROM_LOAD32_WORD( "mpr-23552.ic49", 0x6000000, 0x1000000, CRC(32487181) SHA1(a885747428c280f77dd861bf802d953da133ef59) ) |
| 602 | ROM_LOAD32_WORD( "mpr-23556.ic50", 0x6000002, 0x1000000, CRC(45002955) SHA1(85a27c86692ca79fc4e51a64af63a5e970b86cfa) ) |
| 603 | ROM_LOAD32_WORD( "mpr-23557.ic53", 0x8000000, 0x1000000, CRC(c20dff1b) SHA1(d90d3d85f4fddf39c109502c8f9e9f25a7fc43d1) ) |
| 604 | ROM_LOAD32_WORD( "mpr-23561.ic54", 0x8000002, 0x1000000, CRC(01237844) SHA1(7a8c6bfdea1d4db5e9f6850fdf1a03d703df3958) ) |
| 605 | ROM_LOAD32_WORD( "mpr-23558.ic57", 0xa000000, 0x1000000, CRC(e93cc8d7) SHA1(05fc23b8382daaca7ccd1ca80e7c5e93cbf2b6b1) ) |
| 606 | ROM_LOAD32_WORD( "mpr-23562.ic58", 0xa000002, 0x1000000, CRC(85e0816c) SHA1(28106404d1eef4c85dd425d3535a53c5d71e47a0) ) |
| 607 | ROM_LOAD32_WORD( "mpr-23559.ic61", 0xc000000, 0x1000000, CRC(1a7f2ba0) SHA1(e2a20138f21297f5313f5368ef9992da8fa23937) ) |
| 608 | ROM_LOAD32_WORD( "mpr-23563.ic62", 0xc000002, 0x1000000, CRC(e3dc328b) SHA1(d04ccc4025442c98b96f84c1b300671f3687ec6c) ) |
| 609 | ROM_LOAD32_WORD( "mpr-23560.ic65", 0xe000000, 0x1000000, CRC(24bb7072) SHA1(dad5135c89d292e4a1f96bd0ad28be6a17154be0) ) |
| 610 | ROM_LOAD32_WORD( "mpr-23564.ic66", 0xe000002, 0x1000000, CRC(255724b6) SHA1(1b382fad165831de3f2e39352c031146759dfc69) ) |
| 611 | |
| 612 | // 315-5881 security IC key |
| 613 | ROM_REGION( 4, "rom_key", 0 ) |
| 614 | ROM_LOAD( "pharrier-key.bin", 0, 4, CRC(1697d591) SHA1(8ad4c93f63e2e379795e820d3edbdd990f8ca7e1) ) |
| 607 | 615 | ROM_END |
| 608 | 616 | |
| 609 | 617 | ROM_START( podrace ) |
| r242413 | r242414 | |
| 622 | 630 | |
| 623 | 631 | /* ROM board using 64M SOP44 MASKROM */ |
| 624 | 632 | ROM_REGION( 0x10000000, "user2", 0) |
| 625 | | ROM_LOAD("mpr-23086.ic37" , 0x0000000, 0x0800000, CRC(ef6f20f1) SHA1(11fb66bf71223b4c6650d3adaea21e8709b8d67b)) |
| 626 | | ROM_LOAD("mpr-23087.ic38" , 0x0800000, 0x0800000, CRC(54389822) SHA1(6357f0aa77ef0a5a08a751e085fa026d26ba47d1)) |
| 627 | | ROM_LOAD("mpr-23088.ic39" , 0x1000000, 0x0800000, CRC(9f1a382e) SHA1(b846c3a091d04e49cc1e731237c9326ccac39a64)) |
| 628 | | ROM_LOAD("mpr-23089.ic40" , 0x1800000, 0x0800000, CRC(6aae64fc) SHA1(392b6fba25d20bb41fd72be3a3a9ce95b2374065)) |
| 629 | | ROM_LOAD("mpr-23090.ic41" , 0x2000000, 0x0800000, CRC(ba857872) SHA1(c07ff7955d3d07f2a60d9761b4bd692c0a9c9353)) |
| 630 | | ROM_LOAD("mpr-23091.ic42" , 0x2800000, 0x0800000, CRC(66a73e27) SHA1(c4e7d190a80499225a78b7f788c2abc7ec4ebdca)) |
| 631 | | ROM_LOAD("mpr-23092.ic43" , 0x3000000, 0x0800000, CRC(4f20a0f5) SHA1(0580feba6a6dd01a21d09ec2503ccf77030f8d2a)) |
| 632 | | ROM_LOAD("mpr-23093.ic44" , 0x3800000, 0x0800000, CRC(e74d7d64) SHA1(c28e44319bf08aedd9aed625a12834ec76f1e5e0)) |
| 633 | | ROM_LOAD("mpr-23094.ic45" , 0x4000000, 0x0800000, CRC(90f04c14) SHA1(b55846ea1edd920fd527e3257b13fea8df1f713f)) |
| 634 | | ROM_LOAD("mpr-23095.ic46" , 0x4800000, 0x0800000, CRC(cc67cb5b) SHA1(85e99ec22d1c65139685a94f1ba0c52a0eb33a2e)) |
| 635 | | ROM_LOAD("mpr-23096.ic47" , 0x5000000, 0x0800000, CRC(799ab79e) SHA1(c0ac85ad7f4cf46ff162f1ec2e85a3f22817de5e)) |
| 636 | | ROM_LOAD("mpr-23097.ic48" , 0x5800000, 0x0800000, CRC(f68439de) SHA1(475d0f22e78e3c86431b742e37cbfd764ca8acee)) |
| 637 | | ROM_LOAD("mpr-23098.ic49" , 0x6000000, 0x0800000, CRC(a1e2009c) SHA1(c6a600d47fd2a96d28c637631862150e6f303c3d)) |
| 638 | | ROM_LOAD("mpr-23099.ic50" , 0x6800000, 0x0800000, CRC(ce36f642) SHA1(6cb2e69095efc7969255ebc637e2597c56442751)) |
| 639 | | ROM_LOAD("mpr-23100.ic51" , 0x7000000, 0x0800000, CRC(0f966653) SHA1(1544af662188ea734e0a2e559e05e5f782fb292d)) |
| 640 | | ROM_LOAD("mpr-23101.ic52" , 0x7800000, 0x0800000, CRC(2640fbaa) SHA1(59e9bd143734c71968beb9953122680d3350e69c)) |
| 641 | | ROM_LOAD("mpr-23102.ic53" , 0x8000000, 0x0800000, CRC(080c5bcb) SHA1(0cf54348420ae9866edd64422cb82464990f1f2f)) |
| 642 | | ROM_LOAD("mpr-23103.ic54" , 0x8800000, 0x0800000, CRC(19c7758f) SHA1(fed7f45dd91e1cb6bba7d8e80ed17dca27d92e43)) |
| 643 | | ROM_LOAD("mpr-23104.ic55" , 0x9000000, 0x0800000, CRC(4ca74216) SHA1(0e65971359ba0e2b4fc032a26d1c10d8efadc205)) |
| 644 | | ROM_LOAD("mpr-23105.ic56" , 0x9800000, 0x0800000, CRC(e2dd35ba) SHA1(2213e3195a49532a177086de8134ce8b753fc7ce)) |
| 645 | | ROM_LOAD("mpr-23106.ic57" , 0xa000000, 0x0800000, CRC(dd325515) SHA1(8144e1a87f7d72a18791d1d452123a91cfb354dd)) |
| 646 | | ROM_LOAD("mpr-23107.ic58" , 0xa800000, 0x0800000, CRC(a527a22a) SHA1(54c105b21797c9b0a2a6b2c7091de726c49a55e8)) |
| 647 | | ROM_LOAD("mpr-23108.ic59" , 0xb000000, 0x0800000, CRC(47817d9a) SHA1(d2c6f1b2e800448eaf694d550733bba2280b6746)) |
| 648 | | ROM_LOAD("mpr-23109.ic60" , 0xb800000, 0x0800000, CRC(8c61dec4) SHA1(25a1a5b236b3aed013fc94bd9695906ae5d7f305)) |
| 649 | | ROM_LOAD("mpr-23110.ic61" , 0xc000000, 0x0800000, CRC(4ddae9f1) SHA1(d1c5e3f18932af806f166779cf14909ab17d052c)) |
| 650 | | ROM_LOAD("mpr-23111.ic62" , 0xc800000, 0x0800000, CRC(c404cb1c) SHA1(e14855ec8a5a5ba243a2339c571928fdcc187157)) |
| 651 | | ROM_LOAD("mpr-23112.ic63" , 0xd000000, 0x0800000, CRC(d001fe59) SHA1(ab395d2933b5d691259221168dfaa063cf9a4d1c)) |
| 652 | | ROM_LOAD("mpr-23113.ic64" , 0xd800000, 0x0800000, CRC(f241cfd5) SHA1(5b85e8b50559becff7a76565c95487825bbd9351)) |
| 653 | | ROM_LOAD("mpr-23114.ic65" , 0xe000000, 0x0800000, CRC(80049d7c) SHA1(56aab53e9317b1b5d10bd2af78fd83e7422d8939)) |
| 654 | | ROM_LOAD("mpr-23115.ic66" , 0xe800000, 0x0800000, CRC(4fc540fe) SHA1(df580421d856566e067c2b319c8ac4671629682f)) |
| 655 | | ROM_LOAD("mpr-23116.ic67" , 0xf000000, 0x0800000, CRC(9f567fce) SHA1(c35bcf968f139557e50ceafa9c6bad4deb87154f)) |
| 656 | | ROM_LOAD("mpr-23117.ic68" , 0xf800000, 0x0800000, CRC(9d4d3529) SHA1(66008445629681ebf2f26b3f181d8524a8576d2f)) |
| 633 | ROM_LOAD32_WORD("mpr-23086.ic37" , 0x0000000, 0x0800000, CRC(ef6f20f1) SHA1(11fb66bf71223b4c6650d3adaea21e8709b8d67b)) |
| 634 | ROM_LOAD32_WORD("mpr-23087.ic38" , 0x0000002, 0x0800000, CRC(54389822) SHA1(6357f0aa77ef0a5a08a751e085fa026d26ba47d1)) |
| 635 | ROM_LOAD32_WORD("mpr-23088.ic39" , 0x1000000, 0x0800000, CRC(9f1a382e) SHA1(b846c3a091d04e49cc1e731237c9326ccac39a64)) |
| 636 | ROM_LOAD32_WORD("mpr-23089.ic40" , 0x1000002, 0x0800000, CRC(6aae64fc) SHA1(392b6fba25d20bb41fd72be3a3a9ce95b2374065)) |
| 637 | ROM_LOAD32_WORD("mpr-23090.ic41" , 0x2000000, 0x0800000, CRC(ba857872) SHA1(c07ff7955d3d07f2a60d9761b4bd692c0a9c9353)) |
| 638 | ROM_LOAD32_WORD("mpr-23091.ic42" , 0x2000002, 0x0800000, CRC(66a73e27) SHA1(c4e7d190a80499225a78b7f788c2abc7ec4ebdca)) |
| 639 | ROM_LOAD32_WORD("mpr-23092.ic43" , 0x3000000, 0x0800000, CRC(4f20a0f5) SHA1(0580feba6a6dd01a21d09ec2503ccf77030f8d2a)) |
| 640 | ROM_LOAD32_WORD("mpr-23093.ic44" , 0x3000002, 0x0800000, CRC(e74d7d64) SHA1(c28e44319bf08aedd9aed625a12834ec76f1e5e0)) |
| 641 | ROM_LOAD32_WORD("mpr-23094.ic45" , 0x4000000, 0x0800000, CRC(90f04c14) SHA1(b55846ea1edd920fd527e3257b13fea8df1f713f)) |
| 642 | ROM_LOAD32_WORD("mpr-23095.ic46" , 0x4000002, 0x0800000, CRC(cc67cb5b) SHA1(85e99ec22d1c65139685a94f1ba0c52a0eb33a2e)) |
| 643 | ROM_LOAD32_WORD("mpr-23096.ic47" , 0x5000000, 0x0800000, CRC(799ab79e) SHA1(c0ac85ad7f4cf46ff162f1ec2e85a3f22817de5e)) |
| 644 | ROM_LOAD32_WORD("mpr-23097.ic48" , 0x5000002, 0x0800000, CRC(f68439de) SHA1(475d0f22e78e3c86431b742e37cbfd764ca8acee)) |
| 645 | ROM_LOAD32_WORD("mpr-23098.ic49" , 0x6000000, 0x0800000, CRC(a1e2009c) SHA1(c6a600d47fd2a96d28c637631862150e6f303c3d)) |
| 646 | ROM_LOAD32_WORD("mpr-23099.ic50" , 0x6000002, 0x0800000, CRC(ce36f642) SHA1(6cb2e69095efc7969255ebc637e2597c56442751)) |
| 647 | ROM_LOAD32_WORD("mpr-23100.ic51" , 0x7000000, 0x0800000, CRC(0f966653) SHA1(1544af662188ea734e0a2e559e05e5f782fb292d)) |
| 648 | ROM_LOAD32_WORD("mpr-23101.ic52" , 0x7000002, 0x0800000, CRC(2640fbaa) SHA1(59e9bd143734c71968beb9953122680d3350e69c)) |
| 649 | ROM_LOAD32_WORD("mpr-23102.ic53s" , 0x8000000, 0x0800000, CRC(080c5bcb) SHA1(0cf54348420ae9866edd64422cb82464990f1f2f)) |
| 650 | ROM_LOAD32_WORD("mpr-23103.ic54s" , 0x8000002, 0x0800000, CRC(19c7758f) SHA1(fed7f45dd91e1cb6bba7d8e80ed17dca27d92e43)) |
| 651 | ROM_LOAD32_WORD("mpr-23104.ic55s" , 0x9000000, 0x0800000, CRC(4ca74216) SHA1(0e65971359ba0e2b4fc032a26d1c10d8efadc205)) |
| 652 | ROM_LOAD32_WORD("mpr-23105.ic56s" , 0x9000002, 0x0800000, CRC(e2dd35ba) SHA1(2213e3195a49532a177086de8134ce8b753fc7ce)) |
| 653 | ROM_LOAD32_WORD("mpr-23106.ic57s" , 0xa000000, 0x0800000, CRC(dd325515) SHA1(8144e1a87f7d72a18791d1d452123a91cfb354dd)) |
| 654 | ROM_LOAD32_WORD("mpr-23107.ic58s" , 0xa000002, 0x0800000, CRC(a527a22a) SHA1(54c105b21797c9b0a2a6b2c7091de726c49a55e8)) |
| 655 | ROM_LOAD32_WORD("mpr-23108.ic59s" , 0xb000000, 0x0800000, CRC(47817d9a) SHA1(d2c6f1b2e800448eaf694d550733bba2280b6746)) |
| 656 | ROM_LOAD32_WORD("mpr-23109.ic60s" , 0xb000002, 0x0800000, CRC(8c61dec4) SHA1(25a1a5b236b3aed013fc94bd9695906ae5d7f305)) |
| 657 | ROM_LOAD32_WORD("mpr-23110.ic61s" , 0xc000000, 0x0800000, CRC(4ddae9f1) SHA1(d1c5e3f18932af806f166779cf14909ab17d052c)) |
| 658 | ROM_LOAD32_WORD("mpr-23111.ic62s" , 0xc000002, 0x0800000, CRC(c404cb1c) SHA1(e14855ec8a5a5ba243a2339c571928fdcc187157)) |
| 659 | ROM_LOAD32_WORD("mpr-23112.ic63s" , 0xd000000, 0x0800000, CRC(d001fe59) SHA1(ab395d2933b5d691259221168dfaa063cf9a4d1c)) |
| 660 | ROM_LOAD32_WORD("mpr-23113.ic64s" , 0xd000002, 0x0800000, CRC(f241cfd5) SHA1(5b85e8b50559becff7a76565c95487825bbd9351)) |
| 661 | ROM_LOAD32_WORD("mpr-23114.ic65s" , 0xe000000, 0x0800000, CRC(80049d7c) SHA1(56aab53e9317b1b5d10bd2af78fd83e7422d8939)) |
| 662 | ROM_LOAD32_WORD("mpr-23115.ic66s" , 0xe000002, 0x0800000, CRC(4fc540fe) SHA1(df580421d856566e067c2b319c8ac4671629682f)) |
| 663 | ROM_LOAD32_WORD("mpr-23116.ic67s" , 0xf000000, 0x0800000, CRC(9f567fce) SHA1(c35bcf968f139557e50ceafa9c6bad4deb87154f)) |
| 664 | ROM_LOAD32_WORD("mpr-23117.ic68s" , 0xf000002, 0x0800000, CRC(9d4d3529) SHA1(66008445629681ebf2f26b3f181d8524a8576d2f)) |
| 665 | |
| 666 | // current 315-5881 decryption simulation code can't produce valid output data with any of keys |
| 667 | ROM_REGION( 4, "rom_key", ROMREGION_ERASE00 ) |
| 657 | 668 | ROM_END |
| 658 | 669 | |
| 659 | 670 | ROM_START( braveff ) |
| r242413 | r242414 | |
| 661 | 672 | HIKARU_BIOS |
| 662 | 673 | |
| 663 | 674 | ROM_REGION( 0x2000000, "user1", 0) |
| 664 | | ROM_LOAD32_WORD( "epr-21994.ic29", 0x000000, 0x200000, CRC(31b0a754) SHA1(b49c998a15fbc790b780ed6665a56681d4edd369) ) |
| 665 | | ROM_LOAD32_WORD( "epr-21995.ic30", 0x000002, 0x200000, CRC(bcccb56b) SHA1(6e7a69934e5b47495ae8e90c57759573bc519d24) ) |
| 666 | | ROM_LOAD32_WORD( "epr-21996.ic31", 0x400000, 0x200000, CRC(a8f88e17) SHA1(dbbd2a73335c740bcf2ff9680c575841af29b340) ) |
| 667 | | ROM_LOAD32_WORD( "epr-21997.ic32", 0x400002, 0x200000, CRC(36641a7f) SHA1(37931bde1ddebef61fa6d8caca3cb67328fd0b90) ) |
| 668 | | ROM_LOAD32_WORD( "epr-21998.ic33", 0x800000, 0x200000, CRC(bd1df696) SHA1(fd937894763fab5cb50f33c40f8047e0d3adc93b) ) |
| 669 | | ROM_LOAD32_WORD( "epr-21999.ic34", 0x800002, 0x200000, CRC(9425eee0) SHA1(0f6a23163022bbd7ec54dd638094f3e317a87919) ) |
| 675 | ROM_LOAD32_WORD( "epr-21994.ic29", 0x0000000, 0x200000, CRC(31b0a754) SHA1(b49c998a15fbc790b780ed6665a56681d4edd369) ) |
| 676 | ROM_LOAD32_WORD( "epr-21995.ic30", 0x0000002, 0x200000, CRC(bcccb56b) SHA1(6e7a69934e5b47495ae8e90c57759573bc519d24) ) |
| 677 | ROM_LOAD32_WORD( "epr-21996.ic31", 0x0800000, 0x200000, CRC(a8f88e17) SHA1(dbbd2a73335c740bcf2ff9680c575841af29b340) ) |
| 678 | ROM_LOAD32_WORD( "epr-21997.ic32", 0x0800002, 0x200000, CRC(36641a7f) SHA1(37931bde1ddebef61fa6d8caca3cb67328fd0b90) ) |
| 679 | ROM_LOAD32_WORD( "epr-21998.ic33", 0x1000000, 0x200000, CRC(bd1df696) SHA1(fd937894763fab5cb50f33c40f8047e0d3adc93b) ) |
| 680 | ROM_LOAD32_WORD( "epr-21999.ic34", 0x1000002, 0x200000, CRC(9425eee0) SHA1(0f6a23163022bbd7ec54dd638094f3e317a87919) ) |
| 670 | 681 | /* ic35 unpopulated */ |
| 671 | 682 | /* ic36 unpopulated */ |
| 672 | 683 | |
| 673 | 684 | /* ROM board using 64M SOP44 MASKROM */ |
| 674 | 685 | ROM_REGION( 0xc000000, "user2", ROMREGION_ERASE00) |
| 675 | | ROM_LOAD( "mpr-22000.ic37", 0x0000000, 0x800000, CRC(53d641d6) SHA1(f47d7c77d0e36c4ec3b7171fd7a017f9f58ca5a0) ) |
| 676 | | ROM_LOAD( "mpr-22001.ic38", 0x0800000, 0x800000, CRC(234bc48f) SHA1(177c46884de0ba4bac1f9b778f99c905410a9345) ) |
| 677 | | ROM_LOAD( "mpr-22002.ic39", 0x1000000, 0x800000, CRC(d8f3aa9e) SHA1(f73208034fdd51fed086e912cb8580d2270122b6) ) |
| 678 | | ROM_LOAD( "mpr-22003.ic40", 0x1800000, 0x800000, CRC(2560fe98) SHA1(9bb5ffb6212ec6aa3f92e437eb424141f3b15e43) ) |
| 679 | | ROM_LOAD( "mpr-22004.ic41", 0x2000000, 0x800000, CRC(4e24d71d) SHA1(503344dd8cdd8e65ec7c801b0efae83b3f1f9ae2) ) |
| 680 | | ROM_LOAD( "mpr-22005.ic42", 0x2800000, 0x800000, CRC(2b96c97f) SHA1(707070c85f4b044236694daa13970c241b242d4d) ) |
| 681 | | ROM_LOAD( "mpr-22006.ic43", 0x3000000, 0x800000, CRC(f793a3ba) SHA1(80acd1d4f71cafd7328ff9b9ce30e5169b8f4f8c) ) |
| 682 | | ROM_LOAD( "mpr-22007.ic44", 0x3800000, 0x800000, CRC(62616e31) SHA1(dbe0d4b8fc085ed97884c105fd527af5cd8fbe79) ) |
| 683 | | ROM_LOAD( "mpr-22008.ic45", 0x4000000, 0x800000, CRC(e6905de8) SHA1(6bb4e43b1394788add15f0b78ccd5ab14f86516c) ) |
| 684 | | ROM_LOAD( "mpr-22009.ic46", 0x4800000, 0x800000, CRC(c37dfa5c) SHA1(5a3a5f2eb5a13831e36ca215147ec3c9740c50fc) ) |
| 685 | | ROM_LOAD( "mpr-22010.ic47", 0x5000000, 0x800000, CRC(b570b46c) SHA1(6e512fd1a2c8835f6aee307865b42d57ddf90ef5) ) |
| 686 | | ROM_LOAD( "mpr-22011.ic48", 0x5800000, 0x800000, CRC(d1f5fb58) SHA1(08a1282e00bda52d8d938225c65f67d22abfea05) ) |
| 687 | | ROM_LOAD( "mpr-22012.ic49", 0x6000000, 0x800000, CRC(3ab79029) SHA1(d4708446ba700d5f7c89827c80177ad2d1c0b222) ) |
| 688 | | ROM_LOAD( "mpr-22013.ic50", 0x6800000, 0x800000, CRC(42d8d00b) SHA1(ddce3c95258d8cf51792f2115f89ca658ffe97b6) ) |
| 689 | | ROM_LOAD( "mpr-22014.ic51", 0x7000000, 0x800000, CRC(0f49c00f) SHA1(877c654268edc9526ae3e21e21e3ecca706f300b) ) |
| 690 | | ROM_LOAD( "mpr-22015.ic52", 0x7800000, 0x800000, CRC(d3696e61) SHA1(247161c99c7061b8f391543af1812764a82399cb) ) |
| 691 | | ROM_LOAD( "mpr-22016.ic53s", 0x8000000, 0x800000, CRC(c1015e00) SHA1(f2ce2009d4f4f0f3cbfcce7a36fab2c54e738b07) ) |
| 692 | | ROM_LOAD( "mpr-22017.ic54s", 0x8800000, 0x800000, CRC(222a7cb0) SHA1(9f98ae3f13f85fae4596b671ea508b07c2116ab6) ) |
| 693 | | ROM_LOAD( "mpr-22018.ic55s", 0x9000000, 0x800000, CRC(f160e115) SHA1(ecf7f9f58fce6bff220568972ba7763537c9d7d7) ) |
| 694 | | ROM_LOAD( "mpr-22019.ic56s", 0x9800000, 0x800000, CRC(468b2f10) SHA1(f3fc0af7d4dd3f30ba84e684f3d9c217730564bb) ) |
| 695 | | ROM_LOAD( "mpr-22020.ic57s", 0xa000000, 0x800000, CRC(0c018d8a) SHA1(0447d7ad64061cca4c1231733e660ba51de5a216) ) |
| 696 | | ROM_LOAD( "mpr-22021.ic58s", 0xa800000, 0x800000, CRC(43b08604) SHA1(681142d8b95b2f9664d70b23262a64938774d4e3) ) |
| 697 | | ROM_LOAD( "mpr-22022.ic59s", 0xb000000, 0x800000, CRC(abd3d888) SHA1(9654c3a38feab46b4983a602831fb29cccdd0526) ) |
| 698 | | ROM_LOAD( "mpr-22023.ic60s", 0xb800000, 0x800000, CRC(07f00869) SHA1(92282d09d72d3e65a91128e06bb0d4426bb90be5) ) |
| 686 | ROM_LOAD32_WORD( "mpr-22000.ic37", 0x0000000, 0x800000, CRC(53d641d6) SHA1(f47d7c77d0e36c4ec3b7171fd7a017f9f58ca5a0) ) |
| 687 | ROM_LOAD32_WORD( "mpr-22001.ic38", 0x0000002, 0x800000, CRC(234bc48f) SHA1(177c46884de0ba4bac1f9b778f99c905410a9345) ) |
| 688 | ROM_LOAD32_WORD( "mpr-22002.ic39", 0x1000000, 0x800000, CRC(d8f3aa9e) SHA1(f73208034fdd51fed086e912cb8580d2270122b6) ) |
| 689 | ROM_LOAD32_WORD( "mpr-22003.ic40", 0x1000002, 0x800000, CRC(2560fe98) SHA1(9bb5ffb6212ec6aa3f92e437eb424141f3b15e43) ) |
| 690 | ROM_LOAD32_WORD( "mpr-22004.ic41", 0x2000000, 0x800000, CRC(4e24d71d) SHA1(503344dd8cdd8e65ec7c801b0efae83b3f1f9ae2) ) |
| 691 | ROM_LOAD32_WORD( "mpr-22005.ic42", 0x2000002, 0x800000, CRC(2b96c97f) SHA1(707070c85f4b044236694daa13970c241b242d4d) ) |
| 692 | ROM_LOAD32_WORD( "mpr-22006.ic43", 0x3000000, 0x800000, CRC(f793a3ba) SHA1(80acd1d4f71cafd7328ff9b9ce30e5169b8f4f8c) ) |
| 693 | ROM_LOAD32_WORD( "mpr-22007.ic44", 0x3000002, 0x800000, CRC(62616e31) SHA1(dbe0d4b8fc085ed97884c105fd527af5cd8fbe79) ) |
| 694 | ROM_LOAD32_WORD( "mpr-22008.ic45", 0x4000000, 0x800000, CRC(e6905de8) SHA1(6bb4e43b1394788add15f0b78ccd5ab14f86516c) ) |
| 695 | ROM_LOAD32_WORD( "mpr-22009.ic46", 0x4000002, 0x800000, CRC(c37dfa5c) SHA1(5a3a5f2eb5a13831e36ca215147ec3c9740c50fc) ) |
| 696 | ROM_LOAD32_WORD( "mpr-22010.ic47", 0x5000000, 0x800000, CRC(b570b46c) SHA1(6e512fd1a2c8835f6aee307865b42d57ddf90ef5) ) |
| 697 | ROM_LOAD32_WORD( "mpr-22011.ic48", 0x5000002, 0x800000, CRC(d1f5fb58) SHA1(08a1282e00bda52d8d938225c65f67d22abfea05) ) |
| 698 | ROM_LOAD32_WORD( "mpr-22012.ic49", 0x6000000, 0x800000, CRC(3ab79029) SHA1(d4708446ba700d5f7c89827c80177ad2d1c0b222) ) |
| 699 | ROM_LOAD32_WORD( "mpr-22013.ic50", 0x6000002, 0x800000, CRC(42d8d00b) SHA1(ddce3c95258d8cf51792f2115f89ca658ffe97b6) ) |
| 700 | ROM_LOAD32_WORD( "mpr-22014.ic51", 0x7000000, 0x800000, CRC(0f49c00f) SHA1(877c654268edc9526ae3e21e21e3ecca706f300b) ) |
| 701 | ROM_LOAD32_WORD( "mpr-22015.ic52", 0x7000002, 0x800000, CRC(d3696e61) SHA1(247161c99c7061b8f391543af1812764a82399cb) ) |
| 702 | ROM_LOAD32_WORD( "mpr-22016.ic53s", 0x8000000, 0x800000, CRC(c1015e00) SHA1(f2ce2009d4f4f0f3cbfcce7a36fab2c54e738b07) ) |
| 703 | ROM_LOAD32_WORD( "mpr-22017.ic54s", 0x8000002, 0x800000, CRC(222a7cb0) SHA1(9f98ae3f13f85fae4596b671ea508b07c2116ab6) ) |
| 704 | ROM_LOAD32_WORD( "mpr-22018.ic55s", 0x9000000, 0x800000, CRC(f160e115) SHA1(ecf7f9f58fce6bff220568972ba7763537c9d7d7) ) |
| 705 | ROM_LOAD32_WORD( "mpr-22019.ic56s", 0x9000002, 0x800000, CRC(468b2f10) SHA1(f3fc0af7d4dd3f30ba84e684f3d9c217730564bb) ) |
| 706 | ROM_LOAD32_WORD( "mpr-22020.ic57s", 0xa000000, 0x800000, CRC(0c018d8a) SHA1(0447d7ad64061cca4c1231733e660ba51de5a216) ) |
| 707 | ROM_LOAD32_WORD( "mpr-22021.ic58s", 0xa000002, 0x800000, CRC(43b08604) SHA1(681142d8b95b2f9664d70b23262a64938774d4e3) ) |
| 708 | ROM_LOAD32_WORD( "mpr-22022.ic59s", 0xb000000, 0x800000, CRC(abd3d888) SHA1(9654c3a38feab46b4983a602831fb29cccdd0526) ) |
| 709 | ROM_LOAD32_WORD( "mpr-22023.ic60s", 0xb000002, 0x800000, CRC(07f00869) SHA1(92282d09d72d3e65a91128e06bb0d4426bb90be5) ) |
| 710 | |
| 711 | // 315-5881 not populated |
| 712 | ROM_REGION( 4, "rom_key", ROMREGION_ERASE00 ) |
| 699 | 713 | ROM_END |
| 700 | 714 | |
| 701 | 715 | ROM_START( sgnascar ) |
| r242413 | r242414 | |
| 708 | 722 | |
| 709 | 723 | /* ROM board using 128M TSOP48 MASKROMs */ |
| 710 | 724 | ROM_REGION( 0x10000000, "user2", ROMREGION_ERASE00) |
| 711 | | ROM_LOAD( "mpr-23469.ic19", 0x0000000, 0x1000000, CRC(89cbad8d) SHA1(e4f103b96a3a842a90182172ddcf3bc5dfe6cca8) ) |
| 712 | | ROM_LOAD( "mpr-23473.ic20", 0x1000000, 0x1000000, CRC(977b87d6) SHA1(079eeebc6f9c60d0a016a46386bbe846d8a354da) ) |
| 713 | | ROM_LOAD( "mpr-23470.ic21", 0x2000000, 0x1000000, CRC(faf4940f) SHA1(72fee9ea5b78da260ed99ebe80ca6300f62cdbd7) ) |
| 714 | | ROM_LOAD( "mpr-23474.ic22", 0x3000000, 0x1000000, CRC(faf69ac5) SHA1(875c748151bf0e9cd73d86384665414b2f7b6f5a) ) |
| 715 | | ROM_LOAD( "mpr-23471.ic23", 0x4000000, 0x1000000, CRC(a3aad8ac) SHA1(afc8f3d1546e50afab4f540d59c87fe27cfb2cdd) ) |
| 716 | | ROM_LOAD( "mpr-23475.ic24", 0x5000000, 0x1000000, CRC(5f51597c) SHA1(02c0a5d463714082b7ebb2bec4d0f88aff186f82) ) |
| 717 | | ROM_LOAD( "mpr-23472.ic25", 0x6000000, 0x1000000, CRC(2495f678) SHA1(94b3160aabaea0596855c38ab1b63b16b20f2bae) ) |
| 718 | | ROM_LOAD( "mpr-23476.ic26", 0x7000000, 0x1000000, CRC(927cf31c) SHA1(7cab22a4113d92080a52e1d235bf075ce95f985f) ) |
| 719 | | ROM_LOAD( "mpr-23477.ic27", 0x8000000, 0x1000000, CRC(b4b7c477) SHA1(bcbfe081d509f0b87c6685b9b6617ae146987fe7) ) |
| 720 | | ROM_LOAD( "mpr-23481.ic28", 0x9000000, 0x1000000, CRC(27b8eb7d) SHA1(087b1ed13a3e2a0dbda82c454243214784429d24) ) |
| 721 | | ROM_LOAD( "mpr-23478.ic29", 0xa000000, 0x1000000, CRC(1fac431c) SHA1(2e3903c8cfd55d414555a1d23ba3a97c335991b3) ) |
| 722 | | ROM_LOAD( "mpr-23482.ic30", 0xb000000, 0x1000000, CRC(2e9a0420) SHA1(376d5f0b8274d741a702dc08da50ea5679991740) ) |
| 723 | | ROM_LOAD( "mpr-23479.ic31", 0xc000000, 0x1000000, CRC(9704e393) SHA1(0cb1403f4a268def3ce88db42e55d89ca913e2a0) ) |
| 724 | | ROM_LOAD( "mpr-23483.ic32", 0xd000000, 0x1000000, CRC(c37adebe) SHA1(e84f6d2cc364c743f7f3b73d8c8d0271952bb093) ) |
| 725 | | ROM_LOAD( "mpr-23480.ic33", 0xe000000, 0x1000000, CRC(f517b8b3) SHA1(c04740adb612473c4c9f8186e7e93d2f73d1bb1a) ) |
| 726 | | ROM_LOAD( "mpr-23484.ic34", 0xf000000, 0x1000000, CRC(2ebe1aa1) SHA1(16b39f7422da1a334dde27169c2949e1d95bddb3) ) |
| 725 | ROM_LOAD32_WORD( "mpr-23469.ic19", 0x0000000, 0x1000000, CRC(89cbad8d) SHA1(e4f103b96a3a842a90182172ddcf3bc5dfe6cca8) ) |
| 726 | ROM_LOAD32_WORD( "mpr-23473.ic20", 0x0000002, 0x1000000, CRC(977b87d6) SHA1(079eeebc6f9c60d0a016a46386bbe846d8a354da) ) |
| 727 | ROM_LOAD32_WORD( "mpr-23470.ic21", 0x2000000, 0x1000000, CRC(faf4940f) SHA1(72fee9ea5b78da260ed99ebe80ca6300f62cdbd7) ) |
| 728 | ROM_LOAD32_WORD( "mpr-23474.ic22", 0x2000002, 0x1000000, CRC(faf69ac5) SHA1(875c748151bf0e9cd73d86384665414b2f7b6f5a) ) |
| 729 | ROM_LOAD32_WORD( "mpr-23471.ic23", 0x4000000, 0x1000000, CRC(a3aad8ac) SHA1(afc8f3d1546e50afab4f540d59c87fe27cfb2cdd) ) |
| 730 | ROM_LOAD32_WORD( "mpr-23475.ic24", 0x4000002, 0x1000000, CRC(5f51597c) SHA1(02c0a5d463714082b7ebb2bec4d0f88aff186f82) ) |
| 731 | ROM_LOAD32_WORD( "mpr-23472.ic25", 0x6000000, 0x1000000, CRC(2495f678) SHA1(94b3160aabaea0596855c38ab1b63b16b20f2bae) ) |
| 732 | ROM_LOAD32_WORD( "mpr-23476.ic26", 0x6000002, 0x1000000, CRC(927cf31c) SHA1(7cab22a4113d92080a52e1d235bf075ce95f985f) ) |
| 733 | ROM_LOAD32_WORD( "mpr-23477.ic27", 0x8000000, 0x1000000, CRC(b4b7c477) SHA1(bcbfe081d509f0b87c6685b9b6617ae146987fe7) ) |
| 734 | ROM_LOAD32_WORD( "mpr-23481.ic28", 0x8000002, 0x1000000, CRC(27b8eb7d) SHA1(087b1ed13a3e2a0dbda82c454243214784429d24) ) |
| 735 | ROM_LOAD32_WORD( "mpr-23478.ic29", 0xa000000, 0x1000000, CRC(1fac431c) SHA1(2e3903c8cfd55d414555a1d23ba3a97c335991b3) ) |
| 736 | ROM_LOAD32_WORD( "mpr-23482.ic30", 0xa000002, 0x1000000, CRC(2e9a0420) SHA1(376d5f0b8274d741a702dc08da50ea5679991740) ) |
| 737 | ROM_LOAD32_WORD( "mpr-23479.ic31", 0xc000000, 0x1000000, CRC(9704e393) SHA1(0cb1403f4a268def3ce88db42e55d89ca913e2a0) ) |
| 738 | ROM_LOAD32_WORD( "mpr-23483.ic32", 0xc000002, 0x1000000, CRC(c37adebe) SHA1(e84f6d2cc364c743f7f3b73d8c8d0271952bb093) ) |
| 739 | ROM_LOAD32_WORD( "mpr-23480.ic33", 0xe000000, 0x1000000, CRC(f517b8b3) SHA1(c04740adb612473c4c9f8186e7e93d2f73d1bb1a) ) |
| 740 | ROM_LOAD32_WORD( "mpr-23484.ic34", 0xe000002, 0x1000000, CRC(2ebe1aa1) SHA1(16b39f7422da1a334dde27169c2949e1d95bddb3) ) |
| 727 | 741 | ROM_END |
| 728 | 742 | |
| 729 | 743 | GAME( 2000, hikaru, 0, hikaru, hikaru, driver_device, 0, ROT0, "Sega", "Hikaru Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT ) |
trunk/src/mess/drivers/bitgraph.c
| r0 | r242414 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | BBN BitGraph -- monochrome, raster graphics (768x1024), serial terminal. |
| 4 | |
| 5 | Apparently had at least four hardware revisions, A-D, but which ROM |
| 6 | revisions support which hardware is unclear. A Versabus slot, and |
| 7 | various hardware and software options are mentioned in the docs. Best |
| 8 | guesses follow. |
| 9 | |
| 10 | Onboard hardware (common to all revisions) is |
| 11 | - 32K ROM |
| 12 | - 128K RAM (includes frame buffer) |
| 13 | - 3 serial ports, each driven by 6850 ACIA |
| 14 | - some kind of baud rate generator, possibly COM8016 |
| 15 | - sync serial port, driven by 6854 but apparently never supported by ROM |
| 16 | - 682x PIA |
| 17 | - AY-3-891x PSG |
| 18 | - ER2055 EAROM |
| 19 | - DEC VT100 keyboard interface |
| 20 | |
| 21 | Rev A has additional 4th serial port for mouse (not supported by ROM 1.25). |
| 22 | Rev A has 40 hz realtime clock, the rest use 1040 hz. |
| 23 | Rev A-C use AY-3-8912 (with one external PIO port, to connect the EAROM). |
| 24 | Rev D uses AY-3-8913 (no external ports; EAROM is wired to TBD). |
| 25 | Rev B-D have onboard 8035 to talk to parallel printer and mouse. |
| 26 | Rev B-D have more memory (at least up to 512K). |
| 27 | |
| 28 | ROM 1.25 doesn't support mouse, setup mode, pixel data upload and autowrap. |
| 29 | |
| 30 | Missing/incorrect emulation: |
| 31 | Bidirectional keyboard interface (to drive LEDs and speaker). |
| 32 | 8035. |
| 33 | EAROM. |
| 34 | 1.25 only -- clksync() is dummied out -- causes watchdog resets. |
| 35 | Selectable memory size. |
| 36 | Video enable/reverse video switch. |
| 37 | |
| 38 | ****************************************************************************/ |
| 39 | |
| 40 | #include "emu.h" |
| 41 | |
| 42 | #include "bus/centronics/ctronics.h" |
| 43 | #include "bus/rs232/rs232.h" |
| 44 | #include "cpu/m68000/m68000.h" |
| 45 | #include "cpu/mcs48/mcs48.h" |
| 46 | #include "machine/6821pia.h" |
| 47 | #include "machine/6850acia.h" |
| 48 | #include "machine/clock.h" |
| 49 | #include "machine/com8116.h" |
| 50 | #include "machine/er2055.h" |
| 51 | #include "machine/i8243.h" |
| 52 | #include "machine/mc6854.h" |
| 53 | #include "machine/ram.h" |
| 54 | #include "sound/ay8910.h" |
| 55 | |
| 56 | #include "bitgrpha.lh" |
| 57 | #include "bitgrphb.lh" |
| 58 | |
| 59 | #define M68K_TAG "maincpu" |
| 60 | #define PPU_TAG "ppu" |
| 61 | |
| 62 | #define ACIA0_TAG "acia0" |
| 63 | #define ACIA1_TAG "acia1" |
| 64 | #define ACIA2_TAG "acia2" |
| 65 | #define ACIA3_TAG "acia3" |
| 66 | #define RS232_H_TAG "rs232host" |
| 67 | #define RS232_K_TAG "rs232kbd" |
| 68 | #define RS232_D_TAG "rs232debug" |
| 69 | #define RS232_M_TAG "rs232mouse" |
| 70 | #define COM8116_A_TAG "com8116_a" |
| 71 | #define COM8116_B_TAG "com8116_b" |
| 72 | #define ADLC_TAG "adlc" |
| 73 | #define PIA_TAG "pia" |
| 74 | #define PSG_TAG "psg" |
| 75 | #define EAROM_TAG "earom" |
| 76 | |
| 77 | #define VERBOSE_DBG 1 /* general debug messages */ |
| 78 | |
| 79 | #define DBG_LOG(N,M,A) \ |
| 80 | do { \ |
| 81 | if(VERBOSE_DBG>=N) \ |
| 82 | { \ |
| 83 | if( M ) \ |
| 84 | logerror("%11.6f at %s: %-24s",machine().time().as_double(),machine().describe_context(),(char*)M ); \ |
| 85 | logerror A; \ |
| 86 | } \ |
| 87 | } while (0) |
| 88 | |
| 89 | class bitgraph_state : public driver_device |
| 90 | { |
| 91 | public: |
| 92 | bitgraph_state(const machine_config &mconfig, device_type type, const char *tag) |
| 93 | : driver_device(mconfig, type, tag) |
| 94 | , m_maincpu(*this, M68K_TAG) |
| 95 | , m_ram(*this, RAM_TAG) |
| 96 | , m_acia0(*this, ACIA0_TAG) |
| 97 | , m_acia1(*this, ACIA1_TAG) |
| 98 | , m_acia2(*this, ACIA2_TAG) |
| 99 | , m_acia3(*this, ACIA3_TAG) |
| 100 | , m_adlc(*this, ADLC_TAG) |
| 101 | , m_dbrga(*this, COM8116_A_TAG) |
| 102 | , m_dbrgb(*this, COM8116_B_TAG) |
| 103 | , m_pia(*this, PIA_TAG) |
| 104 | , m_psg(*this, PSG_TAG) |
| 105 | , m_earom(*this, EAROM_TAG) |
| 106 | , m_centronics(*this, "centronics") |
| 107 | , m_screen(*this, "screen") |
| 108 | { } |
| 109 | |
| 110 | DECLARE_READ8_MEMBER( pia_r ); |
| 111 | DECLARE_WRITE8_MEMBER( pia_w ); |
| 112 | DECLARE_READ8_MEMBER( pia_pa_r ); |
| 113 | DECLARE_READ8_MEMBER( pia_pb_r ); |
| 114 | DECLARE_WRITE8_MEMBER( pia_pa_w ); |
| 115 | DECLARE_WRITE8_MEMBER( pia_pb_w ); |
| 116 | DECLARE_READ_LINE_MEMBER( pia_ca1_r ); |
| 117 | DECLARE_READ_LINE_MEMBER( pia_cb1_r ); |
| 118 | DECLARE_WRITE_LINE_MEMBER( pia_ca2_w ); |
| 119 | DECLARE_WRITE_LINE_MEMBER( pia_cb2_w ); |
| 120 | |
| 121 | DECLARE_WRITE16_MEMBER( baud_write ); |
| 122 | DECLARE_WRITE_LINE_MEMBER( com8116_a_fr_w ); |
| 123 | DECLARE_WRITE_LINE_MEMBER( com8116_a_ft_w ); |
| 124 | DECLARE_WRITE_LINE_MEMBER( com8116_b_fr_w ); |
| 125 | DECLARE_WRITE_LINE_MEMBER( com8116_b_ft_w ); |
| 126 | |
| 127 | DECLARE_READ8_MEMBER( adlc_r ); |
| 128 | DECLARE_WRITE8_MEMBER( adlc_w ); |
| 129 | |
| 130 | DECLARE_WRITE8_MEMBER( earom_write ); |
| 131 | DECLARE_WRITE8_MEMBER( misccr_write ); |
| 132 | DECLARE_WRITE_LINE_MEMBER( system_clock_write ); |
| 133 | |
| 134 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 135 | |
| 136 | DECLARE_READ8_MEMBER( ppu_read ); |
| 137 | DECLARE_WRITE8_MEMBER( ppu_write ); |
| 138 | DECLARE_WRITE8_MEMBER( ppu_i8243_w ); |
| 139 | |
| 140 | private: |
| 141 | virtual void machine_start(); |
| 142 | virtual void machine_reset(); |
| 143 | required_device<cpu_device> m_maincpu; |
| 144 | required_device<ram_device> m_ram; |
| 145 | required_device<acia6850_device> m_acia0; |
| 146 | required_device<acia6850_device> m_acia1; |
| 147 | required_device<acia6850_device> m_acia2; |
| 148 | optional_device<acia6850_device> m_acia3; |
| 149 | optional_device<mc6854_device> m_adlc; |
| 150 | required_device<com8116_device> m_dbrga; |
| 151 | required_device<com8116_device> m_dbrgb; |
| 152 | required_device<pia6821_device> m_pia; |
| 153 | required_device<ay8912_device> m_psg; |
| 154 | required_device<er2055_device> m_earom; |
| 155 | optional_device<centronics_device> m_centronics; |
| 156 | required_device<screen_device> m_screen; |
| 157 | |
| 158 | UINT8 *m_videoram; |
| 159 | UINT8 m_misccr; |
| 160 | UINT8 m_pia_a; |
| 161 | UINT8 m_pia_b; |
| 162 | UINT8 m_ppu[4]; |
| 163 | }; |
| 164 | |
| 165 | static ADDRESS_MAP_START(bitgrapha_mem, AS_PROGRAM, 16, bitgraph_state) |
| 166 | ADDRESS_MAP_UNMAP_HIGH |
| 167 | AM_RANGE(0x000000, 0x007fff) AM_ROM |
| 168 | AM_RANGE(0x010000, 0x010001) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, data_r, data_w, 0xff00) // HOST |
| 169 | AM_RANGE(0x010002, 0x010003) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, status_r, control_w, 0xff00) |
| 170 | AM_RANGE(0x010008, 0x010009) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, data_r, data_w, 0x00ff) // KEYBOARD |
| 171 | AM_RANGE(0x01000a, 0x01000b) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, status_r, control_w, 0x00ff) |
| 172 | AM_RANGE(0x010010, 0x010011) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, data_r, data_w, 0x00ff) // DEBUGGER |
| 173 | AM_RANGE(0x010012, 0x010013) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, status_r, control_w, 0x00ff) |
| 174 | AM_RANGE(0x010018, 0x010019) AM_DEVREADWRITE8(ACIA3_TAG, acia6850_device, data_r, data_w, 0x00ff) // POINTER |
| 175 | AM_RANGE(0x01001a, 0x01001b) AM_DEVREADWRITE8(ACIA3_TAG, acia6850_device, status_r, control_w, 0x00ff) |
| 176 | AM_RANGE(0x010020, 0x010027) AM_READWRITE8(adlc_r, adlc_w, 0xff00) |
| 177 | AM_RANGE(0x010028, 0x01002f) AM_READWRITE8(pia_r, pia_w, 0xff00) // EAROM, PSG |
| 178 | AM_RANGE(0x010030, 0x010031) AM_WRITE(baud_write) |
| 179 | AM_RANGE(0x3e0000, 0x3fffff) AM_RAM |
| 180 | ADDRESS_MAP_END |
| 181 | |
| 182 | static ADDRESS_MAP_START(bitgraphb_mem, AS_PROGRAM, 16, bitgraph_state) |
| 183 | ADDRESS_MAP_UNMAP_HIGH |
| 184 | AM_RANGE(0x000000, 0x007fff) AM_ROM |
| 185 | AM_RANGE(0x010000, 0x010001) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, data_r, data_w, 0xff00) // HOST |
| 186 | AM_RANGE(0x010002, 0x010003) AM_DEVREADWRITE8(ACIA0_TAG, acia6850_device, status_r, control_w, 0xff00) |
| 187 | AM_RANGE(0x010008, 0x010009) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, data_r, data_w, 0x00ff) // KEYBOARD |
| 188 | AM_RANGE(0x01000a, 0x01000b) AM_DEVREADWRITE8(ACIA1_TAG, acia6850_device, status_r, control_w, 0x00ff) |
| 189 | AM_RANGE(0x010010, 0x010011) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, data_r, data_w, 0x00ff) // DEBUGGER |
| 190 | AM_RANGE(0x010012, 0x010013) AM_DEVREADWRITE8(ACIA2_TAG, acia6850_device, status_r, control_w, 0x00ff) |
| 191 | AM_RANGE(0x01001a, 0x01001b) AM_WRITE8(misccr_write, 0x00ff) |
| 192 | AM_RANGE(0x010020, 0x010027) AM_READWRITE8(adlc_r, adlc_w, 0xff00) |
| 193 | AM_RANGE(0x010028, 0x01002f) AM_READWRITE8(pia_r, pia_w, 0xff00) // EAROM, PSG |
| 194 | AM_RANGE(0x010030, 0x010031) AM_WRITE(baud_write) |
| 195 | // AM_RANGE(0x010030, 0x010037) AM_READ8(ppu_read, 0x00ff) |
| 196 | // AM_RANGE(0x010038, 0x01003f) AM_WRITE8(ppu_write, 0x00ff) |
| 197 | AM_RANGE(0x380000, 0x3fffff) AM_RAM |
| 198 | ADDRESS_MAP_END |
| 199 | |
| 200 | static INPUT_PORTS_START(bitgraph) |
| 201 | INPUT_PORTS_END |
| 202 | |
| 203 | READ8_MEMBER(bitgraph_state::pia_r) |
| 204 | { |
| 205 | DBG_LOG(3,"PIA", ("R %d\n", offset)); |
| 206 | return m_pia->read(space, 3-offset); |
| 207 | } |
| 208 | |
| 209 | WRITE8_MEMBER(bitgraph_state::pia_w) |
| 210 | { |
| 211 | DBG_LOG(3,"PIA", ("W %d < %02X\n", offset, data)); |
| 212 | return m_pia->write(space, 3-offset, data); |
| 213 | } |
| 214 | |
| 215 | READ_LINE_MEMBER(bitgraph_state::pia_ca1_r) |
| 216 | { |
| 217 | return m_screen->frame_number() & 1; |
| 218 | } |
| 219 | |
| 220 | WRITE_LINE_MEMBER(bitgraph_state::pia_cb2_w) |
| 221 | { |
| 222 | // XXX shut up verbose log |
| 223 | } |
| 224 | |
| 225 | READ8_MEMBER(bitgraph_state::pia_pa_r) |
| 226 | { |
| 227 | UINT8 data = BIT(m_pia_b, 3) ? m_earom->data() : m_pia_a; |
| 228 | DBG_LOG(2,"PIA", ("A == %02X (%s)\n", data, BIT(m_pia_b, 3) ? "earom" : "pia")); |
| 229 | return data; |
| 230 | } |
| 231 | |
| 232 | WRITE8_MEMBER(bitgraph_state::pia_pa_w) |
| 233 | { |
| 234 | DBG_LOG(2,"PIA", ("A <- %02X\n", data)); |
| 235 | m_pia_a = data; |
| 236 | } |
| 237 | |
| 238 | /* |
| 239 | B0 O: BC1 to noisemaker. |
| 240 | B1 O: BDIR to noisemaker. |
| 241 | B2 O: Clock for EAROM. |
| 242 | B3 O: CS1 for EAROM. |
| 243 | B4 O: Enable HDLC Xmt interrupt. |
| 244 | B5 O: Enable HDLC Rcv interrupt. |
| 245 | B6 O: Clear Clock interrupt. Must write a 0 [clear interrupt], then a 1. |
| 246 | B7 I: EVEN field ?? |
| 247 | */ |
| 248 | READ8_MEMBER(bitgraph_state::pia_pb_r) |
| 249 | { |
| 250 | DBG_LOG(2,"PIA", ("B == %02X\n", m_pia_b)); |
| 251 | return m_pia_b; |
| 252 | } |
| 253 | |
| 254 | WRITE8_MEMBER(bitgraph_state::pia_pb_w) |
| 255 | { |
| 256 | DBG_LOG(2,"PIA", ("B <- %02X\n", data)); |
| 257 | m_pia_b = data; |
| 258 | |
| 259 | switch (m_pia_b & 0x03) { |
| 260 | case 2: m_psg->data_w(space, 0, m_pia_a); break; |
| 261 | case 3: m_psg->address_w(space, 0, m_pia_a); break; |
| 262 | } |
| 263 | |
| 264 | if (BIT(m_pia_b, 3)) { |
| 265 | DBG_LOG(2,"EAROM", ("data <- %02X\n", m_pia_a)); |
| 266 | m_earom->set_data(m_pia_a); |
| 267 | } |
| 268 | // CS1, ~CS2, C1, C2, CK |
| 269 | m_earom->set_control(BIT(m_pia_b, 3), BIT(m_pia_b, 3), BIT(m_pia_a, 6), BIT(m_pia_a, 7), BIT(m_pia_b, 2)); |
| 270 | |
| 271 | if (!BIT(m_pia_b, 6)) { |
| 272 | m_maincpu->set_input_line(M68K_IRQ_6, CLEAR_LINE); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | WRITE8_MEMBER(bitgraph_state::earom_write) |
| 277 | { |
| 278 | DBG_LOG(2,"EAROM", ("addr <- %02X (%02X)\n", data & 0x3f, data)); |
| 279 | m_earom->set_address(data & 0x3f); |
| 280 | } |
| 281 | |
| 282 | // written once and never changed |
| 283 | WRITE8_MEMBER(bitgraph_state::misccr_write) |
| 284 | { |
| 285 | DBG_LOG(1,"MISCCR", ("<- %02X (DTR %d MAP %d)\n", data, BIT(data, 3), (data & 3))); |
| 286 | m_misccr = data; |
| 287 | } |
| 288 | |
| 289 | WRITE_LINE_MEMBER(bitgraph_state::system_clock_write) |
| 290 | { |
| 291 | if (!BIT(m_pia_b, 6)) { |
| 292 | m_maincpu->set_input_line(M68K_IRQ_6, CLEAR_LINE); |
| 293 | return; |
| 294 | } |
| 295 | if (state) { |
| 296 | m_maincpu->set_input_line_and_vector(M68K_IRQ_6, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 297 | } else { |
| 298 | m_maincpu->set_input_line(M68K_IRQ_6, CLEAR_LINE); |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | WRITE16_MEMBER(bitgraph_state::baud_write) |
| 303 | { |
| 304 | DBG_LOG(1,"Baud", ("%04X\n", data)); |
| 305 | m_dbrgb->str_w(data & 15); // 2 DBG |
| 306 | m_dbrga->stt_w((data >> 4) & 15); // 1 KBD |
| 307 | m_dbrgb->stt_w((data >> 8) & 15); // 3 PNT |
| 308 | m_dbrga->str_w((data >> 12) & 15); // 0 HOST |
| 309 | } |
| 310 | |
| 311 | WRITE_LINE_MEMBER(bitgraph_state::com8116_a_fr_w) |
| 312 | { |
| 313 | m_acia0->write_txc(state); |
| 314 | m_acia0->write_rxc(state); |
| 315 | } |
| 316 | |
| 317 | WRITE_LINE_MEMBER(bitgraph_state::com8116_a_ft_w) |
| 318 | { |
| 319 | m_acia1->write_txc(state); |
| 320 | m_acia1->write_rxc(state); |
| 321 | } |
| 322 | |
| 323 | WRITE_LINE_MEMBER(bitgraph_state::com8116_b_fr_w) |
| 324 | { |
| 325 | m_acia2->write_txc(state); |
| 326 | m_acia2->write_rxc(state); |
| 327 | } |
| 328 | |
| 329 | WRITE_LINE_MEMBER(bitgraph_state::com8116_b_ft_w) |
| 330 | { |
| 331 | if (m_acia3) { |
| 332 | m_acia3->write_txc(state); |
| 333 | m_acia3->write_rxc(state); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | READ8_MEMBER(bitgraph_state::adlc_r) |
| 338 | { |
| 339 | DBG_LOG(1,"ADLC", ("R %d\n", offset)); |
| 340 | return m_adlc ? m_adlc->read(space, 3-offset) : 0xff; |
| 341 | } |
| 342 | |
| 343 | WRITE8_MEMBER(bitgraph_state::adlc_w) |
| 344 | { |
| 345 | DBG_LOG(1,"ADLC", ("W %d < %02X\n", offset, data)); |
| 346 | if (m_adlc) return m_adlc->write(space, 3-offset, data); |
| 347 | } |
| 348 | |
| 349 | UINT32 bitgraph_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 350 | { |
| 351 | UINT8 gfx=0; |
| 352 | int x,y; |
| 353 | |
| 354 | for (y = 0; y < 768; y++) |
| 355 | { |
| 356 | UINT16 *p = &bitmap.pix16(y); |
| 357 | |
| 358 | for (x = 0; x < 1024/8; x+=2) |
| 359 | { |
| 360 | gfx = m_videoram[ (x+1) | (y<<7)]; |
| 361 | |
| 362 | *p++ = BIT(gfx, 7); |
| 363 | *p++ = BIT(gfx, 6); |
| 364 | *p++ = BIT(gfx, 5); |
| 365 | *p++ = BIT(gfx, 4); |
| 366 | *p++ = BIT(gfx, 3); |
| 367 | *p++ = BIT(gfx, 2); |
| 368 | *p++ = BIT(gfx, 1); |
| 369 | *p++ = BIT(gfx, 0); |
| 370 | |
| 371 | gfx = m_videoram[ x | (y<<7)]; |
| 372 | |
| 373 | *p++ = BIT(gfx, 7); |
| 374 | *p++ = BIT(gfx, 6); |
| 375 | *p++ = BIT(gfx, 5); |
| 376 | *p++ = BIT(gfx, 4); |
| 377 | *p++ = BIT(gfx, 3); |
| 378 | *p++ = BIT(gfx, 2); |
| 379 | *p++ = BIT(gfx, 1); |
| 380 | *p++ = BIT(gfx, 0); |
| 381 | } |
| 382 | } |
| 383 | return 0; |
| 384 | } |
| 385 | |
| 386 | READ8_MEMBER(bitgraph_state::ppu_read) |
| 387 | { |
| 388 | UINT8 data = m_ppu[offset]; |
| 389 | DBG_LOG(1,"PPU", ("%d == %02X\n", offset, data)); |
| 390 | return data; |
| 391 | } |
| 392 | |
| 393 | WRITE8_MEMBER(bitgraph_state::ppu_write) |
| 394 | { |
| 395 | DBG_LOG(1,"PPU", ("%d <- %02X\n", offset, data)); |
| 396 | m_ppu[offset] = data; |
| 397 | } |
| 398 | |
| 399 | #ifdef UNUSED_FUNCTION |
| 400 | static ADDRESS_MAP_START(ppu_io, AS_IO, 8, bitgraph_state) |
| 401 | // AM_RANGE(0x00, 0x00) AM_READ(ppu_irq) |
| 402 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) |
| 403 | // AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(ppu_t0_r) |
| 404 | AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE("i8243", i8243_device, i8243_prog_w) |
| 405 | ADDRESS_MAP_END |
| 406 | #endif |
| 407 | |
| 408 | /* |
| 409 | p4 O: Centronics data 3..0 |
| 410 | p5 O: Centronics data 7..4 |
| 411 | p6 O: Centronics control |
| 412 | p7 I: Centronics status |
| 413 | */ |
| 414 | WRITE8_MEMBER(bitgraph_state::ppu_i8243_w) |
| 415 | { |
| 416 | DBG_LOG(1,"PPU", ("8243 %d <- %02X\n", offset + 4, data)); |
| 417 | switch (offset) { |
| 418 | case 0: |
| 419 | m_centronics->write_data0(BIT(data, 0)); |
| 420 | m_centronics->write_data1(BIT(data, 1)); |
| 421 | m_centronics->write_data2(BIT(data, 2)); |
| 422 | m_centronics->write_data3(BIT(data, 3)); |
| 423 | break; |
| 424 | case 1: |
| 425 | m_centronics->write_data4(BIT(data, 0)); |
| 426 | m_centronics->write_data5(BIT(data, 1)); |
| 427 | m_centronics->write_data6(BIT(data, 2)); |
| 428 | m_centronics->write_data7(BIT(data, 3)); |
| 429 | break; |
| 430 | case 2: |
| 431 | m_centronics->write_strobe(BIT(data, 0)); |
| 432 | // 1: Paper instruction |
| 433 | m_centronics->write_init(BIT(data, 2)); |
| 434 | break; |
| 435 | case 3: |
| 436 | m_centronics->write_ack(BIT(data, 0)); |
| 437 | m_centronics->write_busy(BIT(data, 1)); |
| 438 | m_centronics->write_perror(BIT(data, 2)); |
| 439 | m_centronics->write_select(BIT(data, 3)); |
| 440 | break; |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | |
| 445 | void bitgraph_state::machine_start() |
| 446 | { |
| 447 | m_videoram = (UINT8 *)m_maincpu->space(AS_PROGRAM).get_write_ptr(0x3e0000); |
| 448 | } |
| 449 | |
| 450 | void bitgraph_state::machine_reset() |
| 451 | { |
| 452 | m_maincpu->reset(); |
| 453 | m_misccr = 0; |
| 454 | m_pia_a = 0; |
| 455 | m_pia_b = 0; |
| 456 | memset(m_ppu, sizeof(m_ppu), 0); |
| 457 | } |
| 458 | |
| 459 | |
| 460 | static MACHINE_CONFIG_FRAGMENT( bg_motherboard ) |
| 461 | MCFG_SCREEN_ADD("screen", RASTER) |
| 462 | MCFG_SCREEN_REFRESH_RATE(40) |
| 463 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 464 | MCFG_SCREEN_SIZE(1024, 768) |
| 465 | MCFG_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 768-1) |
| 466 | MCFG_SCREEN_UPDATE_DRIVER(bitgraph_state, screen_update) |
| 467 | |
| 468 | MCFG_SCREEN_PALETTE("palette") |
| 469 | MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") |
| 470 | |
| 471 | MCFG_DEVICE_ADD(ACIA0_TAG, ACIA6850, 0) |
| 472 | MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE(RS232_H_TAG, rs232_port_device, write_txd)) |
| 473 | MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE(RS232_H_TAG, rs232_port_device, write_rts)) |
| 474 | MCFG_ACIA6850_IRQ_HANDLER(DEVWRITELINE(M68K_TAG, m68000_device, write_irq1)) |
| 475 | |
| 476 | MCFG_RS232_PORT_ADD(RS232_H_TAG, default_rs232_devices, "null_modem") |
| 477 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA0_TAG, acia6850_device, write_rxd)) |
| 478 | MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA0_TAG, acia6850_device, write_dcd)) |
| 479 | MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ACIA0_TAG, acia6850_device, write_cts)) |
| 480 | |
| 481 | MCFG_DEVICE_ADD(ACIA1_TAG, ACIA6850, 0) |
| 482 | MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE(RS232_K_TAG, rs232_port_device, write_txd)) |
| 483 | MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE(RS232_K_TAG, rs232_port_device, write_rts)) |
| 484 | MCFG_ACIA6850_IRQ_HANDLER(DEVWRITELINE(M68K_TAG, m68000_device, write_irq1)) |
| 485 | |
| 486 | MCFG_RS232_PORT_ADD(RS232_K_TAG, default_rs232_devices, "keyboard") |
| 487 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA1_TAG, acia6850_device, write_rxd)) |
| 488 | MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA1_TAG, acia6850_device, write_dcd)) |
| 489 | MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ACIA1_TAG, acia6850_device, write_cts)) |
| 490 | |
| 491 | MCFG_DEVICE_ADD(ACIA2_TAG, ACIA6850, 0) |
| 492 | MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE(RS232_D_TAG, rs232_port_device, write_txd)) |
| 493 | MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE(RS232_D_TAG, rs232_port_device, write_rts)) |
| 494 | MCFG_ACIA6850_IRQ_HANDLER(DEVWRITELINE(M68K_TAG, m68000_device, write_irq1)) |
| 495 | |
| 496 | MCFG_RS232_PORT_ADD(RS232_D_TAG, default_rs232_devices, NULL) |
| 497 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA2_TAG, acia6850_device, write_rxd)) |
| 498 | MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA2_TAG, acia6850_device, write_dcd)) |
| 499 | MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ACIA2_TAG, acia6850_device, write_cts)) |
| 500 | |
| 501 | // XXX actual part may be something else |
| 502 | MCFG_DEVICE_ADD(COM8116_A_TAG, COM8116, XTAL_5_0688MHz) |
| 503 | MCFG_COM8116_FR_HANDLER(WRITELINE(bitgraph_state, com8116_a_fr_w)) |
| 504 | MCFG_COM8116_FT_HANDLER(WRITELINE(bitgraph_state, com8116_a_ft_w)) |
| 505 | |
| 506 | MCFG_DEVICE_ADD(COM8116_B_TAG, COM8116, XTAL_5_0688MHz) |
| 507 | MCFG_COM8116_FR_HANDLER(WRITELINE(bitgraph_state, com8116_b_fr_w)) |
| 508 | MCFG_COM8116_FT_HANDLER(WRITELINE(bitgraph_state, com8116_b_ft_w)) |
| 509 | |
| 510 | MCFG_DEVICE_ADD(PIA_TAG, PIA6821, 0) |
| 511 | MCFG_PIA_READCA1_HANDLER(READLINE(bitgraph_state, pia_ca1_r)) |
| 512 | MCFG_PIA_CB2_HANDLER(WRITELINE(bitgraph_state, pia_cb2_w)) |
| 513 | MCFG_PIA_READPA_HANDLER(READ8(bitgraph_state, pia_pa_r)) |
| 514 | MCFG_PIA_WRITEPA_HANDLER(WRITE8(bitgraph_state, pia_pa_w)) |
| 515 | MCFG_PIA_READPB_HANDLER(READ8(bitgraph_state, pia_pb_r)) |
| 516 | MCFG_PIA_WRITEPB_HANDLER(WRITE8(bitgraph_state, pia_pb_w)) |
| 517 | |
| 518 | MCFG_ER2055_ADD(EAROM_TAG) |
| 519 | |
| 520 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 521 | MCFG_SOUND_ADD(PSG_TAG, AY8912, XTAL_1_2944MHz) |
| 522 | MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(bitgraph_state, earom_write)) |
| 523 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 524 | MACHINE_CONFIG_END |
| 525 | |
| 526 | #ifdef UNUSED_FUNCTION |
| 527 | static MACHINE_CONFIG_FRAGMENT( bg_ppu ) |
| 528 | MCFG_CPU_ADD(PPU_TAG, I8035, XTAL_6_9MHz) |
| 529 | MCFG_CPU_IO_MAP(ppu_io) |
| 530 | |
| 531 | MCFG_I8243_ADD("i8243", NOOP, WRITE8(bitgraph_state, ppu_i8243_w)) |
| 532 | |
| 533 | MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") |
| 534 | MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit6)) |
| 535 | MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit7)) |
| 536 | MCFG_CENTRONICS_FAULT_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit4)) |
| 537 | MCFG_CENTRONICS_PERROR_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit5)) |
| 538 | |
| 539 | MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0) |
| 540 | |
| 541 | MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") |
| 542 | MACHINE_CONFIG_END |
| 543 | #endif |
| 544 | |
| 545 | static MACHINE_CONFIG_START( bitgrpha, bitgraph_state ) |
| 546 | MCFG_CPU_ADD(M68K_TAG, M68000, XTAL_6_9MHz) |
| 547 | MCFG_CPU_PROGRAM_MAP(bitgrapha_mem) |
| 548 | |
| 549 | MCFG_FRAGMENT_ADD(bg_motherboard) |
| 550 | |
| 551 | MCFG_DEVICE_ADD("system_clock", CLOCK, 40) |
| 552 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(bitgraph_state, system_clock_write)) |
| 553 | |
| 554 | MCFG_DEVICE_ADD(ACIA3_TAG, ACIA6850, 0) |
| 555 | MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE(RS232_M_TAG, rs232_port_device, write_txd)) |
| 556 | MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE(RS232_M_TAG, rs232_port_device, write_rts)) |
| 557 | MCFG_ACIA6850_IRQ_HANDLER(DEVWRITELINE(M68K_TAG, m68000_device, write_irq1)) |
| 558 | |
| 559 | MCFG_RS232_PORT_ADD(RS232_M_TAG, default_rs232_devices, NULL) |
| 560 | MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA3_TAG, acia6850_device, write_rxd)) |
| 561 | MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA3_TAG, acia6850_device, write_dcd)) |
| 562 | MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ACIA3_TAG, acia6850_device, write_cts)) |
| 563 | |
| 564 | MCFG_DEFAULT_LAYOUT(layout_bitgrpha) |
| 565 | |
| 566 | MCFG_RAM_ADD(RAM_TAG) |
| 567 | MCFG_RAM_DEFAULT_SIZE("128K") |
| 568 | MACHINE_CONFIG_END |
| 569 | |
| 570 | static MACHINE_CONFIG_START( bitgrphb, bitgraph_state ) |
| 571 | MCFG_CPU_ADD(M68K_TAG, M68000, XTAL_6_9MHz) |
| 572 | MCFG_CPU_PROGRAM_MAP(bitgraphb_mem) |
| 573 | |
| 574 | MCFG_FRAGMENT_ADD(bg_motherboard) |
| 575 | // MCFG_FRAGMENT_ADD(bg_ppu) |
| 576 | |
| 577 | MCFG_DEVICE_ADD("system_clock", CLOCK, 1040) |
| 578 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(bitgraph_state, system_clock_write)) |
| 579 | |
| 580 | MCFG_DEFAULT_LAYOUT(layout_bitgrphb) |
| 581 | |
| 582 | MCFG_RAM_ADD(RAM_TAG) |
| 583 | MCFG_RAM_DEFAULT_SIZE("512K") |
| 584 | MACHINE_CONFIG_END |
| 585 | |
| 586 | /* ROM definition */ |
| 587 | ROM_START( bitgrpha ) |
| 588 | ROM_REGION16_BE( 0x8000, M68K_TAG, 0 ) |
| 589 | ROM_LOAD( "bg125.rom", 0x000000, 0x008000, CRC(b86c974e) SHA1(5367db80a856444c2a55de22b69a13f97a62f602)) |
| 590 | ROM_FILL( 0x38e4, 1, 0x4e ) // disable clksync() |
| 591 | ROM_FILL( 0x38e5, 1, 0x75 ) |
| 592 | ROM_END |
| 593 | |
| 594 | ROM_START( bitgrphb ) |
| 595 | ROM_REGION16_BE( 0x8000, M68K_TAG, 0 ) |
| 596 | ROM_DEFAULT_BIOS("2.33A") |
| 597 | |
| 598 | ROM_SYSTEM_BIOS(0, "2.33A", "rev 2.33 Alpha' ROM") |
| 599 | ROMX_LOAD( "bg2.32lo_u10.bin", 0x004001, 0x002000, CRC(6a702a96) SHA1(acdf1ba34038b4ccafb5b8069e70ae57a3b8a7e0), ROM_BIOS(1)|ROM_SKIP(1)) |
| 600 | ROMX_LOAD( "bg2.32hi_u12.bin", 0x004000, 0x002000, CRC(a282a2c8) SHA1(ea7e4d4e197201c8944acef54479d5c2b26d409f), ROM_BIOS(1)|ROM_SKIP(1)) |
| 601 | ROMX_LOAD( "bg2.32lo_u11.bin", 0x000001, 0x002000, CRC(46912afd) SHA1(c1f771adc1ef62b1fb1b904ed1d2a61009e24f55), ROM_BIOS(1)|ROM_SKIP(1)) |
| 602 | ROMX_LOAD( "bg2.32hi_u13.bin", 0x000000, 0x002000, CRC(731df44f) SHA1(8c238b5943b8864e539f92891a0ffa6ddd4fc779), ROM_BIOS(1)|ROM_SKIP(1)) |
| 603 | |
| 604 | ROM_SYSTEM_BIOS(1, "3.0P", "rev 3.0P ROM") |
| 605 | ROMX_LOAD( "bg5173_u10.bin", 0x004001, 0x002000, CRC(40014850) SHA1(ef0b7da58a5183391a3a03947882197f25694518), ROM_BIOS(2)|ROM_SKIP(1)) |
| 606 | ROMX_LOAD( "bg5175_u12.bin", 0x004000, 0x002000, CRC(c2c4cc6c) SHA1(dbbce7cb58b4cef1557a834cbb07b3ace298cb8b), ROM_BIOS(2)|ROM_SKIP(1)) |
| 607 | ROMX_LOAD( "bg5174_u11.bin", 0x000001, 0x002000, CRC(639768b9) SHA1(68f623bcf3bb75390ba2b17efc067cf25f915ec0), ROM_BIOS(2)|ROM_SKIP(1)) |
| 608 | ROMX_LOAD( "bg5176_u13.bin", 0x000000, 0x002000, CRC(984e7e8c) SHA1(dd13cbaff96a8b9936ae8cb07205c6abe8b27b6e), ROM_BIOS(2)|ROM_SKIP(1)) |
| 609 | |
| 610 | ROM_SYSTEM_BIOS(2, "ramtest", "RAM test") |
| 611 | ROMX_LOAD( "ramtest.rom", 0x000000, 0x004000, CRC(fabe3b34) SHA1(4d892a2ed2b7ea12d83843609981be9069611d43), ROM_BIOS(3)) |
| 612 | |
| 613 | ROM_REGION( 0x800, PPU_TAG, 0 ) |
| 614 | ROM_LOAD( "bg_mouse_u9.bin", 0x0000, 0x0800, CRC(fd827ff5) SHA1(6d4a8e9b18c7610c5cfde40464826d144d387601)) |
| 615 | ROM_END |
| 616 | |
| 617 | /* Driver */ |
| 618 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 619 | COMP( 1981, bitgrpha, 0, 0, bitgrpha, bitgraph, driver_device, 0, "BBN", "BitGraph rev A", GAME_IMPERFECT_KEYBOARD) |
| 620 | COMP( 1982, bitgrphb, 0, 0, bitgrphb, bitgraph, driver_device, 0, "BBN", "BitGraph rev B", GAME_NOT_WORKING|GAME_IMPERFECT_KEYBOARD) |
trunk/src/mess/drivers/excali64.c
| r242413 | r242414 | |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | 5 | Excalibur 64 kit computer, designed and sold in Australia by BGR Computers. |
| 6 | The official schematics have a LOT of errors and omissions. |
| 6 | 7 | |
| 7 | 8 | Skeleton driver created on 2014-12-09. |
| 8 | 9 | |
| 9 | 10 | Chips: Z80A, 8251, 8253, 8255, 6845 |
| 11 | We have Basic 1.1. Other known versions are 1.01, 2.1 |
| 12 | There are 2 versions of the colour prom, which have different palettes. |
| 13 | We have the later version. |
| 10 | 14 | |
| 15 | Control W then Enter will switch between 40 and 80 characters per line. |
| 16 | |
| 11 | 17 | ToDo: |
| 12 | | - Some keys can be connected to more than one position in the matrix. Need to |
| 13 | | determine the correct positions. |
| 14 | | - The position of the "Line Insert" key is unknown. |
| 15 | | - The video section has attributes and colour, none of this is done. |
| 18 | - Colours are approximate. |
| 16 | 19 | - Disk controller |
| 17 | | - Banking |
| 20 | - Graphics commands such as LINE and CIRCLE produce a syntax error. |
| 21 | - Some commands such as HGRCLS are missing from the rom. Perhaps we need a later version? |
| 22 | - SET command produces random graphics instead of the expected lo-res dot. |
| 18 | 23 | - The schematic shows the audio counter connected to 2MHz, but this produces |
| 19 | 24 | sounds that are too high. Connected to 1MHz for now. |
| 20 | 25 | - Serial |
| 21 | 26 | - Parallel / Centronics |
| 22 | 27 | - Need software |
| 28 | - Pasting can sometimes drop a character. |
| 23 | 29 | |
| 24 | 30 | ****************************************************************************/ |
| 25 | 31 | |
| r242413 | r242414 | |
| 45 | 51 | , m_palette(*this, "palette") |
| 46 | 52 | , m_maincpu(*this, "maincpu") |
| 47 | 53 | , m_cass(*this, "cassette") |
| 54 | , m_crtc(*this, "crtc") |
| 48 | 55 | , m_io_keyboard(*this, "KEY") |
| 49 | 56 | { } |
| 50 | 57 | |
| 51 | | DECLARE_DRIVER_INIT(excali64); |
| 58 | DECLARE_PALETTE_INIT(excali64); |
| 52 | 59 | DECLARE_WRITE8_MEMBER(ppib_w); |
| 53 | 60 | DECLARE_READ8_MEMBER(ppic_r); |
| 54 | 61 | DECLARE_WRITE8_MEMBER(ppic_w); |
| 55 | 62 | DECLARE_READ8_MEMBER(port00_r); |
| 56 | 63 | DECLARE_READ8_MEMBER(port50_r); |
| 57 | 64 | DECLARE_WRITE8_MEMBER(port70_w); |
| 58 | | DECLARE_WRITE8_MEMBER(video_w); |
| 59 | 65 | MC6845_UPDATE_ROW(update_row); |
| 60 | 66 | DECLARE_WRITE_LINE_MEMBER(crtc_de); |
| 61 | 67 | DECLARE_WRITE_LINE_MEMBER(crtc_vs); |
| 62 | | |
| 68 | DECLARE_MACHINE_RESET(excali64); |
| 63 | 69 | required_device<palette_device> m_palette; |
| 64 | 70 | |
| 65 | 71 | private: |
| 66 | 72 | const UINT8 *m_p_chargen; |
| 67 | 73 | UINT8 *m_p_videoram; |
| 74 | UINT8 *m_p_hiresram; |
| 68 | 75 | UINT8 m_sys_status; |
| 69 | 76 | UINT8 m_kbdrow; |
| 70 | 77 | bool m_crtc_vs; |
| 71 | 78 | bool m_crtc_de; |
| 72 | 79 | required_device<cpu_device> m_maincpu; |
| 73 | 80 | required_device<cassette_image_device> m_cass; |
| 81 | required_device<mc6845_device> m_crtc; |
| 74 | 82 | required_ioport_array<8> m_io_keyboard; |
| 75 | 83 | }; |
| 76 | 84 | |
| 77 | 85 | static ADDRESS_MAP_START(excali64_mem, AS_PROGRAM, 8, excali64_state) |
| 78 | | AM_RANGE(0x0000, 0x1FFF) AM_ROM |
| 79 | | AM_RANGE(0x2000, 0x3FFF) AM_ROM AM_WRITE(video_w) |
| 80 | | AM_RANGE(0x4000, 0xFFFF) AM_RAM |
| 86 | AM_RANGE(0x0000, 0x1FFF) AM_READ_BANK("bankr1") AM_WRITE_BANK("bankw1") |
| 87 | AM_RANGE(0x2000, 0x2FFF) AM_READ_BANK("bankr2") AM_WRITE_BANK("bankw2") |
| 88 | AM_RANGE(0x3000, 0x3FFF) AM_READ_BANK("bankr3") AM_WRITE_BANK("bankw3") |
| 89 | AM_RANGE(0x4000, 0x4FFF) AM_READ_BANK("bankr4") AM_WRITE_BANK("bankw4") |
| 90 | AM_RANGE(0x5000, 0xFFFF) AM_RAM AM_REGION("rambank", 0x5000) |
| 81 | 91 | ADDRESS_MAP_END |
| 82 | 92 | |
| 83 | 93 | static ADDRESS_MAP_START(excali64_io, AS_IO, 8, excali64_state) |
| r242413 | r242414 | |
| 94 | 104 | ADDRESS_MAP_END |
| 95 | 105 | |
| 96 | 106 | |
| 97 | | /* Input ports */ |
| 98 | 107 | static INPUT_PORTS_START( excali64 ) |
| 99 | | //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LINEFEED") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(0x0a)//H |
| 100 | | //PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("REPT") PORT_CODE(KEYCODE_LALT)//0x11 |
| 101 | | //PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))//B |
| 102 | | //PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 103 | | //PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Fire)") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) |
| 104 | | //PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ |")PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) |
| 105 | | //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 106 | | //PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BRK") PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(0x03) |
| 107 | | //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 108 | | |
| 109 | 108 | PORT_START("KEY.0") /* line 0 */ |
| 110 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('R') PORT_CHAR(0x12) |
| 111 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('W') PORT_CHAR(0x17) |
| 109 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) |
| 110 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(0x17) |
| 112 | 111 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 113 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('E') PORT_CHAR(0x05) |
| 112 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(0x05) |
| 114 | 113 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09) |
| 115 | 114 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPSLOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE |
| 116 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('A') PORT_CHAR(0x01) |
| 117 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('Q') PORT_CHAR(0x11) |
| 115 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01) |
| 116 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x11) |
| 118 | 117 | |
| 119 | 118 | PORT_START("KEY.1") /* line 1 */ |
| 120 | 119 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 121 | 120 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 122 | 121 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 123 | 122 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 124 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2)//= |
| 123 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 125 | 124 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) // space |
| 126 | 125 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 127 | 126 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) // F1 |
| 128 | 127 | |
| 129 | 128 | PORT_START("KEY.2") /* line 2 */ |
| 130 | 129 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 131 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('M') PORT_CHAR(0x0d) |
| 130 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHAR(0x0d) |
| 132 | 131 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 133 | 132 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 134 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('B') PORT_CHAR(0x02) |
| 133 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) |
| 135 | 134 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) //B |
| 136 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('N') PORT_CHAR(0x0e) |
| 135 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) |
| 137 | 136 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) //N |
| 138 | 137 | |
| 139 | 138 | PORT_START("KEY.3") /* line 3 */ |
| 140 | 139 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("' \"") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x27) PORT_CHAR(0x22) PORT_CHAR(0x27) |
| 141 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('L') PORT_CHAR(0x0c) |
| 140 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR(0x0c) |
| 142 | 141 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0d) |
| 143 | 142 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; :") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 144 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('J') PORT_CHAR(0x0a) |
| 145 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('G') PORT_CHAR(0x07) |
| 146 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('K') PORT_CHAR(0x0b) |
| 147 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('H') PORT_CHAR(0x08) |
| 143 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHAR(0x0a) |
| 144 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR(0x07) |
| 145 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR(0x0b) |
| 146 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHAR(0x08) |
| 148 | 147 | |
| 149 | 148 | PORT_START("KEY.4") /* line 4 */ |
| 150 | 149 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| r242413 | r242414 | |
| 154 | 153 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0x7f) PORT_CHAR(0x7f) PORT_CHAR(0x1f) |
| 155 | 154 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1b) |
| 156 | 155 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 157 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) //1 |
| 156 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INS") PORT_CODE(KEYCODE_INSERT) |
| 158 | 157 | |
| 159 | 158 | PORT_START("KEY.5") /* line 5 */ |
| 160 | 159 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHAR(0x1b) |
| 161 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('O') PORT_CHAR(0x0f) |
| 160 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0f) |
| 162 | 161 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHAR(0x1d) |
| 163 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('P') PORT_CHAR(0x10) |
| 164 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('U') PORT_CHAR(0x15) |
| 165 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('T') PORT_CHAR(0x14) |
| 166 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('I') PORT_CHAR(0x09)//0x12 |
| 167 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('Y') PORT_CHAR(0x19)//0x14 |
| 162 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) |
| 163 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(0x15) |
| 164 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(0x14) |
| 165 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x09) |
| 166 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) |
| 168 | 167 | |
| 169 | 168 | PORT_START("KEY.6") /* line 6 */ |
| 170 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('F') PORT_CHAR(0x06) |
| 171 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('X') PORT_CHAR(0x18) |
| 172 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('V') PORT_CHAR(0x16) |
| 173 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('C') PORT_CHAR(0x03) |
| 174 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('D') PORT_CHAR(0x04) |
| 175 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('S') PORT_CHAR(0x13) |
| 176 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('Z') PORT_CHAR(0x1a) |
| 169 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR(0x06) |
| 170 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) |
| 171 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) |
| 172 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR(0x03) |
| 173 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR(0x04) |
| 174 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR(0x13) |
| 175 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) |
| 177 | 176 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) //Z |
| 178 | 177 | |
| 179 | 178 | PORT_START("KEY.7") /* line 7 */ |
| r242413 | r242414 | |
| 199 | 198 | return data; |
| 200 | 199 | } |
| 201 | 200 | |
| 201 | WRITE8_MEMBER( excali64_state::ppic_w ) |
| 202 | { |
| 203 | m_cass->output(BIT(data, 7) ? -1.0 : +1.0); |
| 204 | } |
| 205 | |
| 202 | 206 | READ8_MEMBER( excali64_state::port00_r ) |
| 203 | 207 | { |
| 204 | 208 | UINT8 data = 0xff; |
| r242413 | r242414 | |
| 216 | 220 | d0 : /rom ; screen |
| 217 | 221 | d1 : ram on |
| 218 | 222 | d2 : /low ; high res |
| 219 | | d3 : dispen |
| 223 | d3 : 2nd colour set (previously, dispen, which is a mistake in hardware and schematic) |
| 220 | 224 | d4 : vsync |
| 225 | d5 : rombank |
| 221 | 226 | */ |
| 222 | 227 | READ8_MEMBER( excali64_state::port50_r ) |
| 223 | 228 | { |
| 224 | | UINT8 data = m_sys_status & 7; |
| 229 | UINT8 data = m_sys_status & 0x2f; |
| 225 | 230 | data |= (UINT8)m_crtc_vs << 4; |
| 226 | | data |= (UINT8)m_crtc_de << 5; |
| 227 | 231 | return data; |
| 228 | 232 | } |
| 229 | 233 | |
| 230 | | WRITE8_MEMBER( excali64_state::ppic_w ) |
| 231 | | { |
| 232 | | m_cass->output(BIT(data, 7) ? -1.0 : +1.0); |
| 233 | | } |
| 234 | | |
| 235 | 234 | /* |
| 236 | | d0,1,2 : same as port50 |
| 237 | | d7 : 2nd col |
| 235 | d0,1,2,3,5 : same as port50 |
| 236 | (schematic wrongly says d7 used for 2nd colour set) |
| 238 | 237 | */ |
| 239 | 238 | WRITE8_MEMBER( excali64_state::port70_w ) |
| 240 | 239 | { |
| 241 | 240 | m_sys_status = data; |
| 241 | m_crtc->set_unscaled_clock(BIT(data, 2) ? 2e6 : 1e6); |
| 242 | if BIT(data, 1) |
| 243 | { |
| 244 | // select 64k ram |
| 245 | membank("bankr1")->set_entry(0); |
| 246 | membank("bankr2")->set_entry(0); |
| 247 | membank("bankr3")->set_entry(0); |
| 248 | membank("bankw2")->set_entry(0); |
| 249 | membank("bankw3")->set_entry(0); |
| 250 | membank("bankw4")->set_entry(0); |
| 251 | } |
| 252 | else |
| 253 | if BIT(data, 0) |
| 254 | { |
| 255 | // select videoram and hiresram for writing, and ROM for reading |
| 256 | membank("bankr1")->set_entry(1); |
| 257 | membank("bankr2")->set_entry(1); |
| 258 | membank("bankr3")->set_entry(1); |
| 259 | membank("bankw2")->set_entry(2); |
| 260 | membank("bankw3")->set_entry(2); |
| 261 | membank("bankw4")->set_entry(2); |
| 262 | } |
| 263 | else |
| 264 | { |
| 265 | // as above, except 4000-4FFF is main ram |
| 266 | membank("bankr1")->set_entry(1); |
| 267 | membank("bankr2")->set_entry(1); |
| 268 | membank("bankr3")->set_entry(1); |
| 269 | membank("bankw2")->set_entry(2); |
| 270 | membank("bankw3")->set_entry(2); |
| 271 | membank("bankw4")->set_entry(0); |
| 272 | } |
| 273 | |
| 274 | // other half of ROM_1 |
| 275 | if ((data & 0x22) == 0x20) |
| 276 | membank("bankr1")->set_entry(2); |
| 242 | 277 | } |
| 243 | 278 | |
| 244 | | WRITE8_MEMBER( excali64_state::video_w ) |
| 279 | MACHINE_RESET_MEMBER( excali64_state, excali64 ) |
| 245 | 280 | { |
| 246 | | m_p_videoram[offset] = data; |
| 281 | membank("bankr1")->set_entry(1); // read from ROM |
| 282 | membank("bankr2")->set_entry(1); // read from ROM |
| 283 | membank("bankr3")->set_entry(1); // read from ROM |
| 284 | membank("bankr4")->set_entry(0); // read from RAM |
| 285 | membank("bankw1")->set_entry(0); // write to RAM |
| 286 | membank("bankw2")->set_entry(2); // write to videoram |
| 287 | membank("bankw3")->set_entry(2); // write to hiresram |
| 288 | membank("bankw4")->set_entry(0); // write to RAM |
| 289 | m_maincpu->reset(); |
| 247 | 290 | } |
| 248 | 291 | |
| 249 | 292 | WRITE_LINE_MEMBER( excali64_state::crtc_de ) |
| r242413 | r242414 | |
| 256 | 299 | m_crtc_vs = state; |
| 257 | 300 | } |
| 258 | 301 | |
| 259 | | DRIVER_INIT_MEMBER( excali64_state, excali64 ) |
| 302 | /* F4 Character Displayer */ |
| 303 | static const gfx_layout excali64_charlayout = |
| 260 | 304 | { |
| 305 | 8, 12, /* 8 x 12 characters */ |
| 306 | 256, /* 256 characters */ |
| 307 | 1, /* 1 bits per pixel */ |
| 308 | { 0 }, /* no bitplanes */ |
| 309 | /* x offsets */ |
| 310 | { 7, 6, 5, 4, 3, 2, 1, 0 }, |
| 311 | /* y offsets */ |
| 312 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8 }, |
| 313 | 8*16 /* every char takes 16 bytes */ |
| 314 | }; |
| 315 | |
| 316 | static GFXDECODE_START( excali64 ) |
| 317 | GFXDECODE_ENTRY( "chargen", 0x0000, excali64_charlayout, 0, 1 ) |
| 318 | GFXDECODE_END |
| 319 | |
| 320 | // The prom, the schematic, and the manual all contradict each other, |
| 321 | // so the colours can only be described as wild guesses. Further, the 38 |
| 322 | // colour-load resistors are missing labels and values. |
| 323 | PALETTE_INIT_MEMBER( excali64_state, excali64 ) |
| 324 | { |
| 325 | // do this here because driver_init hasn't run yet |
| 326 | m_p_videoram = memregion("videoram")->base(); |
| 261 | 327 | m_p_chargen = memregion("chargen")->base(); |
| 262 | | m_p_videoram = memregion("videoram")->base(); |
| 328 | m_p_hiresram = memregion("hiresram")->base(); |
| 329 | UINT8 *main = memregion("roms")->base(); |
| 330 | UINT8 *ram = memregion("rambank")->base(); |
| 331 | |
| 332 | // main ram (cp/m mode) |
| 333 | membank("bankr1")->configure_entry(0, &ram[0x0000]); |
| 334 | membank("bankr2")->configure_entry(0, &ram[0x2000]); |
| 335 | membank("bankr3")->configure_entry(0, &ram[0x3000]); |
| 336 | membank("bankr4")->configure_entry(0, &ram[0x4000]);//boot |
| 337 | membank("bankw1")->configure_entry(0, &ram[0x0000]);//boot |
| 338 | membank("bankw2")->configure_entry(0, &ram[0x2000]); |
| 339 | membank("bankw3")->configure_entry(0, &ram[0x3000]); |
| 340 | membank("bankw4")->configure_entry(0, &ram[0x4000]);//boot |
| 341 | // rom_1 |
| 342 | membank("bankr1")->configure_entry(1, &main[0x0000]);//boot |
| 343 | membank("bankr1")->configure_entry(2, &main[0x2000]); |
| 344 | // rom_2 |
| 345 | membank("bankr2")->configure_entry(1, &main[0x4000]);//boot |
| 346 | membank("bankr3")->configure_entry(1, &main[0x5000]);//boot |
| 347 | // videoram |
| 348 | membank("bankw2")->configure_entry(2, &m_p_videoram[0x0000]);//boot |
| 349 | // hiresram |
| 350 | membank("bankw3")->configure_entry(2, &m_p_hiresram[0x0000]);//boot |
| 351 | membank("bankw4")->configure_entry(2, &m_p_hiresram[0x0000]); |
| 352 | |
| 353 | // Set up foreground palettes |
| 354 | UINT8 r,g,b,i,code; |
| 355 | for (i = 0; i < 32; i++) |
| 356 | { |
| 357 | code = m_p_chargen[0x1000+i]; |
| 358 | r = (BIT(code, 0) ? 38 : 0) + (BIT(code, 1) ? 73 : 0) + (BIT(code, 2) ? 144 : 0); |
| 359 | b = (BIT(code, 3) ? 38 : 0) + (BIT(code, 4) ? 73 : 0) + (BIT(code, 5) ? 144 : 0); |
| 360 | g = (BIT(code, 6) ? 85 : 0) + (BIT(code, 7) ? 170 : 0); |
| 361 | palette.set_pen_color(i, r, g, b); |
| 362 | } |
| 363 | |
| 364 | // Background |
| 365 | palette.set_pen_color(32, 0x00, 0x00, 0x00); // 0 Black |
| 366 | palette.set_pen_color(33, 0xff, 0x00, 0x00); // 1 Red |
| 367 | palette.set_pen_color(34, 0x00, 0x00, 0xff); // 2 Blue |
| 368 | palette.set_pen_color(35, 0xff, 0x00, 0xff); // 3 Magenta |
| 369 | palette.set_pen_color(36, 0x00, 0xff, 0x00); // 4 Green |
| 370 | palette.set_pen_color(37, 0xff, 0xff, 0x00); // 5 Yellow |
| 371 | palette.set_pen_color(38, 0x00, 0xff, 0xff); // 6 Cyan |
| 372 | palette.set_pen_color(39, 0xff, 0xff, 0xff); // 7 White |
| 263 | 373 | } |
| 264 | 374 | |
| 265 | 375 | MC6845_UPDATE_ROW( excali64_state::update_row ) |
| 266 | 376 | { |
| 267 | 377 | const rgb_t *palette = m_palette->palette()->entry_list_raw(); |
| 268 | | UINT8 chr,gfx; |
| 378 | UINT8 chr,gfx,col,bg,fg; |
| 269 | 379 | UINT16 mem,x; |
| 380 | UINT8 col_base = BIT(m_sys_status, 3) ? 16 : 0; |
| 270 | 381 | UINT32 *p = &bitmap.pix32(y); |
| 271 | 382 | |
| 272 | 383 | for (x = 0; x < x_count; x++) |
| 273 | 384 | { |
| 274 | | UINT8 inv=0; |
| 275 | | if (x == cursor_x) inv=0xff; |
| 276 | | mem = (ma + x) & 0xfff; |
| 385 | mem = (ma + x) & 0x7ff; |
| 277 | 386 | chr = m_p_videoram[mem]; |
| 278 | | gfx = m_p_chargen[(chr<<4) | ra] ^ inv; |
| 387 | col = m_p_videoram[mem+0x800]; |
| 388 | fg = col_base + (col >> 4); |
| 389 | bg = 32 + ((col >> 1) & 7); |
| 279 | 390 | |
| 391 | if (BIT(col, 0) & BIT(chr, 7)) |
| 392 | gfx = m_p_hiresram[(chr<<4) | ra]; // hires definition |
| 393 | else |
| 394 | gfx = m_p_chargen[(chr<<4) | ra]; // normal character |
| 395 | |
| 396 | gfx ^= (x == cursor_x) ? 0xff : 0; |
| 397 | |
| 280 | 398 | /* Display a scanline of a character */ |
| 281 | | *p++ = palette[BIT(gfx, 0)]; |
| 282 | | *p++ = palette[BIT(gfx, 1)]; |
| 283 | | *p++ = palette[BIT(gfx, 2)]; |
| 284 | | *p++ = palette[BIT(gfx, 3)]; |
| 285 | | *p++ = palette[BIT(gfx, 4)]; |
| 286 | | *p++ = palette[BIT(gfx, 5)]; |
| 287 | | *p++ = palette[BIT(gfx, 6)]; |
| 288 | | *p++ = palette[BIT(gfx, 7)]; |
| 399 | *p++ = palette[BIT(gfx, 0) ? fg : bg]; |
| 400 | *p++ = palette[BIT(gfx, 1) ? fg : bg]; |
| 401 | *p++ = palette[BIT(gfx, 2) ? fg : bg]; |
| 402 | *p++ = palette[BIT(gfx, 3) ? fg : bg]; |
| 403 | *p++ = palette[BIT(gfx, 4) ? fg : bg]; |
| 404 | *p++ = palette[BIT(gfx, 5) ? fg : bg]; |
| 405 | *p++ = palette[BIT(gfx, 6) ? fg : bg]; |
| 406 | *p++ = palette[BIT(gfx, 7) ? fg : bg]; |
| 289 | 407 | } |
| 290 | 408 | } |
| 291 | 409 | |
| r242413 | r242414 | |
| 295 | 413 | MCFG_CPU_PROGRAM_MAP(excali64_mem) |
| 296 | 414 | MCFG_CPU_IO_MAP(excali64_io) |
| 297 | 415 | |
| 416 | MCFG_MACHINE_RESET_OVERRIDE(excali64_state, excali64) |
| 417 | |
| 298 | 418 | MCFG_DEVICE_ADD("uart", I8251, 0) |
| 299 | 419 | //MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd)) |
| 300 | 420 | //MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts)) |
| r242413 | r242414 | |
| 328 | 448 | MCFG_SCREEN_ADD("screen", RASTER) |
| 329 | 449 | MCFG_SCREEN_REFRESH_RATE(50) |
| 330 | 450 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 331 | | MCFG_SCREEN_SIZE(80*8, 25*10) |
| 332 | | MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 25*10-1) |
| 451 | MCFG_SCREEN_SIZE(80*8, 24*12) |
| 452 | MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*12-1) |
| 333 | 453 | MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) |
| 334 | | MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") |
| 454 | MCFG_PALETTE_ADD("palette", 40) |
| 455 | MCFG_PALETTE_INIT_OWNER(excali64_state, excali64) |
| 456 | //MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") |
| 457 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", excali64) |
| 335 | 458 | MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_16MHz / 16) // 1MHz for lowres; 2MHz for highres |
| 336 | 459 | MCFG_MC6845_SHOW_BORDER_AREA(false) |
| 337 | 460 | MCFG_MC6845_CHAR_WIDTH(8) |
| r242413 | r242414 | |
| 345 | 468 | |
| 346 | 469 | /* ROM definition */ |
| 347 | 470 | ROM_START( excali64 ) |
| 348 | | ROM_REGION(0x10000, "maincpu", 0) |
| 349 | | ROM_LOAD( "rom_1.bin", 0x0000, 0x4000, CRC(e129a305) SHA1(e43ec7d040c2b2e548d22fd6bbc7df8b45a26e5a) ) |
| 350 | | ROM_LOAD( "rom_2.bin", 0x2000, 0x2000, CRC(916d9f5a) SHA1(91c527cce963481b7bebf077e955ca89578bb553) ) |
| 471 | ROM_REGION(0x6000, "roms", 0) |
| 472 | ROM_LOAD( "rom_1.ic17", 0x0000, 0x4000, CRC(e129a305) SHA1(e43ec7d040c2b2e548d22fd6bbc7df8b45a26e5a) ) |
| 473 | ROM_LOAD( "rom_2.ic24", 0x4000, 0x2000, CRC(916d9f5a) SHA1(91c527cce963481b7bebf077e955ca89578bb553) ) |
| 474 | // fix a bug that causes screen to be filled with 'p' |
| 475 | ROM_FILL(0x4ee, 1, 0) |
| 476 | ROM_FILL(0x4ef, 1, 8) |
| 477 | ROM_FILL(0x4f6, 1, 0) |
| 478 | ROM_FILL(0x4f7, 1, 8) |
| 351 | 479 | |
| 352 | | ROM_REGION(0x2000, "videoram", ROMREGION_ERASE00) |
| 480 | ROM_REGION(0x10000, "rambank", ROMREGION_ERASE00) |
| 481 | ROM_REGION(0x1000, "videoram", ROMREGION_ERASE00) |
| 482 | ROM_REGION(0x1000, "hiresram", ROMREGION_ERASE00) |
| 353 | 483 | |
| 354 | | ROM_REGION(0x1000, "chargen", 0) |
| 355 | | ROM_LOAD( "genex_3.bin", 0x0000, 0x1000, CRC(b91619a9) SHA1(2ced636cb7b94ba9d329868d7ecf79963cefe9d9) ) |
| 484 | ROM_REGION(0x1020, "chargen", 0) |
| 485 | ROM_LOAD( "genex_3.ic43", 0x0000, 0x1000, CRC(b91619a9) SHA1(2ced636cb7b94ba9d329868d7ecf79963cefe9d9) ) |
| 486 | ROM_LOAD( "hm7603.ic55", 0x1000, 0x0020, CRC(c74f47dc) SHA1(331ff3c913846191ddd97cacb80bd19438c1ff71) ) |
| 356 | 487 | ROM_END |
| 357 | 488 | |
| 358 | 489 | /* Driver */ |
| 359 | 490 | |
| 360 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 361 | | COMP( 1984, excali64, 0, 0, excali64, excali64, excali64_state, excali64, "BGR Computers", "Excalibur 64", GAME_IS_SKELETON ) |
| 491 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 492 | COMP( 1984, excali64, 0, 0, excali64, excali64, driver_device, 0, "BGR Computers", "Excalibur 64", GAME_NOT_WORKING ) |
trunk/src/mess/drivers/pc9801.c
| r242413 | r242414 | |
| 416 | 416 | |
| 417 | 417 | #include "formats/pc98_dsk.h" |
| 418 | 418 | #include "formats/pc98fdi_dsk.h" |
| 419 | #include "formats/fdd_dsk.h" |
| 420 | #include "formats/dcp_dsk.h" |
| 421 | #include "formats/dip_dsk.h" |
| 422 | #include "formats/nfd_dsk.h" |
| 419 | 423 | |
| 420 | 424 | #include "machine/pc9801_26.h" |
| 421 | 425 | #include "machine/pc9801_86.h" |
| r242413 | r242414 | |
| 481 | 485 | optional_device<input_buffer_device> m_sasi_data_in; |
| 482 | 486 | optional_device<input_buffer_device> m_sasi_ctrl_in; |
| 483 | 487 | optional_device<ata_interface_device> m_ide; |
| 484 | | required_shared_ptr<UINT8> m_video_ram_1; |
| 485 | | required_shared_ptr<UINT8> m_video_ram_2; |
| 486 | | optional_shared_ptr<UINT8> m_ext_gvram; |
| 488 | required_shared_ptr<UINT16> m_video_ram_1; |
| 489 | required_shared_ptr<UINT16> m_video_ram_2; |
| 490 | optional_shared_ptr<UINT16> m_ext_gvram; |
| 487 | 491 | required_device<beep_device> m_beeper; |
| 488 | 492 | optional_device<ram_device> m_ram; |
| 489 | 493 | required_device<gfxdecode_device> m_gfxdecode; |
| r242413 | r242414 | |
| 505 | 509 | UINT8 m_txt_scroll_reg[8]; |
| 506 | 510 | UINT8 m_pal_clut[4]; |
| 507 | 511 | |
| 508 | | UINT8 *m_tvram; |
| 512 | UINT16 *m_tvram; |
| 509 | 513 | |
| 510 | 514 | UINT16 m_font_addr; |
| 511 | 515 | UINT8 m_font_line; |
| r242413 | r242414 | |
| 539 | 543 | UINT8 tile[4], tile_index; |
| 540 | 544 | }m_grcg; |
| 541 | 545 | |
| 546 | struct { |
| 547 | UINT16 regs[8]; |
| 548 | UINT16 pat[4]; |
| 549 | UINT16 src[4]; |
| 550 | INT16 count; |
| 551 | UINT16 leftover[4]; |
| 552 | bool first; |
| 553 | } m_egc; |
| 554 | |
| 542 | 555 | /* PC9821 specific */ |
| 543 | 556 | UINT8 m_sdip[24], m_sdip_bank; |
| 544 | 557 | UINT8 m_pc9821_window_bank; |
| r242413 | r242414 | |
| 554 | 567 | DECLARE_WRITE8_MEMBER(txt_scrl_w); |
| 555 | 568 | DECLARE_READ8_MEMBER(grcg_r); |
| 556 | 569 | DECLARE_WRITE8_MEMBER(grcg_w); |
| 570 | DECLARE_WRITE16_MEMBER(egc_w); |
| 557 | 571 | DECLARE_READ8_MEMBER(pc9801_a0_r); |
| 558 | 572 | DECLARE_WRITE8_MEMBER(pc9801_a0_w); |
| 559 | 573 | DECLARE_READ8_MEMBER(pc9801_fdc_2hd_r); |
| 560 | 574 | DECLARE_WRITE8_MEMBER(pc9801_fdc_2hd_w); |
| 561 | 575 | DECLARE_READ8_MEMBER(pc9801_fdc_2dd_r); |
| 562 | 576 | DECLARE_WRITE8_MEMBER(pc9801_fdc_2dd_w); |
| 563 | | DECLARE_READ8_MEMBER(tvram_r); |
| 564 | | DECLARE_WRITE8_MEMBER(tvram_w); |
| 577 | DECLARE_READ16_MEMBER(tvram_r); |
| 578 | DECLARE_WRITE16_MEMBER(tvram_w); |
| 565 | 579 | DECLARE_READ8_MEMBER(gvram_r); |
| 566 | 580 | DECLARE_WRITE8_MEMBER(gvram_w); |
| 567 | 581 | DECLARE_WRITE8_MEMBER(pc9801rs_mouse_freq_w); |
| 568 | 582 | DECLARE_CUSTOM_INPUT_MEMBER(system_type_r); |
| 569 | | DECLARE_READ8_MEMBER(grcg_gvram_r); |
| 570 | | DECLARE_WRITE8_MEMBER(grcg_gvram_w); |
| 571 | | DECLARE_READ8_MEMBER(grcg_gvram0_r); |
| 572 | | DECLARE_WRITE8_MEMBER(grcg_gvram0_w); |
| 573 | | DECLARE_READ8_MEMBER(upd7220_grcg_r); |
| 574 | | DECLARE_WRITE8_MEMBER(upd7220_grcg_w); |
| 583 | DECLARE_READ16_MEMBER(grcg_gvram_r); |
| 584 | DECLARE_WRITE16_MEMBER(grcg_gvram_w); |
| 585 | DECLARE_READ16_MEMBER(grcg_gvram0_r); |
| 586 | DECLARE_WRITE16_MEMBER(grcg_gvram0_w); |
| 587 | DECLARE_READ16_MEMBER(upd7220_grcg_r); |
| 588 | DECLARE_WRITE16_MEMBER(upd7220_grcg_w); |
| 589 | void egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask); |
| 590 | UINT16 egc_blit_r(UINT32 offset, UINT16 mem_mask); |
| 591 | inline UINT16 egc_do_partial_op(int plane, UINT16 src, UINT16 pat, UINT16 dst); |
| 575 | 592 | UINT32 pc9801_286_a20(bool state); |
| 576 | 593 | |
| 577 | 594 | DECLARE_READ8_MEMBER(ide_hack_r); |
| r242413 | r242414 | |
| 714 | 731 | |
| 715 | 732 | void pc9801_state::video_start() |
| 716 | 733 | { |
| 717 | | m_tvram = auto_alloc_array(machine(), UINT8, 0x4000); |
| 734 | m_tvram = auto_alloc_array(machine(), UINT16, 0x2000); |
| 718 | 735 | |
| 719 | 736 | // find memory regions |
| 720 | 737 | m_char_rom = memregion("chargen")->base(); |
| r242413 | r242414 | |
| 750 | 767 | |
| 751 | 768 | if(m_ex_video_ff[ANALOG_256_MODE]) |
| 752 | 769 | { |
| 753 | | for(xi=0;xi<8;xi++) |
| 770 | for(xi=0;xi<16;xi++) |
| 754 | 771 | { |
| 755 | 772 | res_x = x + xi; |
| 756 | 773 | res_y = y; |
| r242413 | r242414 | |
| 758 | 775 | if(!m_screen->visible_area().contains(res_x, res_y*2+0)) |
| 759 | 776 | return; |
| 760 | 777 | |
| 761 | | pen = m_ext_gvram[(address*8+xi)+(m_vram_disp*0x40000)]; |
| 778 | pen = m_ext_gvram[((address*16+xi)+(m_vram_disp*0x40000)) >> 1]; |
| 762 | 779 | |
| 763 | 780 | bitmap.pix32(res_y*2+0, res_x) = palette[pen + 0x20]; |
| 764 | 781 | if(m_screen->visible_area().contains(res_x, res_y*2+1)) |
| r242413 | r242414 | |
| 767 | 784 | } |
| 768 | 785 | else |
| 769 | 786 | { |
| 770 | | for(xi=0;xi<8;xi++) |
| 787 | for(xi=0;xi<16;xi++) |
| 771 | 788 | { |
| 772 | 789 | res_x = x + xi; |
| 773 | 790 | res_y = y; |
| 774 | 791 | |
| 775 | | pen = ((m_video_ram_2[(address & 0x7fff) + (0x08000) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 1 : 0; |
| 776 | | pen|= ((m_video_ram_2[(address & 0x7fff) + (0x10000) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 2 : 0; |
| 777 | | pen|= ((m_video_ram_2[(address & 0x7fff) + (0x18000) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 4 : 0; |
| 792 | pen = ((m_video_ram_2[((address & 0x7fff) + (0x08000) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 1 : 0; |
| 793 | pen|= ((m_video_ram_2[((address & 0x7fff) + (0x10000) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 2 : 0; |
| 794 | pen|= ((m_video_ram_2[((address & 0x7fff) + (0x18000) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 4 : 0; |
| 778 | 795 | if(m_ex_video_ff[ANALOG_16_MODE]) |
| 779 | | pen|= ((m_video_ram_2[(address & 0x7fff) + (0) + (m_vram_disp*0x20000)] >> (7-xi)) & 1) ? 8 : 0; |
| 796 | pen|= ((m_video_ram_2[((address & 0x7fff) + (0) + (m_vram_disp*0x20000)) >> 1] >> xi) & 1) ? 8 : 0; |
| 780 | 797 | |
| 781 | 798 | if(interlace_on) |
| 782 | 799 | { |
| r242413 | r242414 | |
| 826 | 843 | kanji_sel = 0; |
| 827 | 844 | kanji_lr = 0; |
| 828 | 845 | |
| 829 | | tile = m_video_ram_1[(tile_addr*2) & 0x1fff] & 0xff; |
| 830 | | knj_tile = m_video_ram_1[(tile_addr*2+1) & 0x1fff] & 0xff; |
| 846 | tile = m_video_ram_1[tile_addr & 0xfff] & 0xff; |
| 847 | knj_tile = m_video_ram_1[tile_addr & 0xfff] >> 8; |
| 831 | 848 | if(knj_tile) |
| 832 | 849 | { |
| 833 | 850 | /* Note: bit 7 doesn't really count, if a kanji is enabled then the successive tile is always the second part of it. |
| r242413 | r242414 | |
| 848 | 865 | else |
| 849 | 866 | x_step = 1; |
| 850 | 867 | |
| 851 | | attr = (m_video_ram_1[(tile_addr*2 & 0x1fff) | 0x2000] & 0xff); |
| 868 | attr = (m_video_ram_1[(tile_addr & 0xfff) | 0x1000] & 0xff); |
| 852 | 869 | |
| 853 | 870 | secret = (attr & 1) ^ 1; |
| 854 | 871 | blink = attr & 2; |
| r242413 | r242414 | |
| 1279 | 1296 | |
| 1280 | 1297 | |
| 1281 | 1298 | /* TODO: banking? */ |
| 1282 | | READ8_MEMBER(pc9801_state::tvram_r) |
| 1299 | READ16_MEMBER(pc9801_state::tvram_r) |
| 1283 | 1300 | { |
| 1284 | | UINT8 res; |
| 1301 | UINT16 res; |
| 1285 | 1302 | |
| 1286 | | if((offset & 0x2000) && offset & 1) |
| 1287 | | return 0xff; |
| 1303 | if((offset & 0x1000) && (mem_mask == 0xff00)) |
| 1304 | return 0xffff; |
| 1288 | 1305 | |
| 1289 | 1306 | res = m_tvram[offset]; |
| 1290 | 1307 | |
| 1291 | 1308 | return res; |
| 1292 | 1309 | } |
| 1293 | 1310 | |
| 1294 | | WRITE8_MEMBER(pc9801_state::tvram_w) |
| 1311 | WRITE16_MEMBER(pc9801_state::tvram_w) |
| 1295 | 1312 | { |
| 1296 | | if(offset < (0x3fe2) || m_video_ff[MEMSW_REG]) |
| 1297 | | m_tvram[offset] = data; |
| 1313 | if(offset < (0x3fe2>>1) || m_video_ff[MEMSW_REG]) |
| 1314 | COMBINE_DATA(&m_tvram[offset]); |
| 1298 | 1315 | |
| 1299 | | m_video_ram_1[offset] = data; //TODO: check me |
| 1316 | COMBINE_DATA(&m_video_ram_1[offset]); //TODO: check me |
| 1300 | 1317 | } |
| 1301 | 1318 | |
| 1302 | 1319 | /* +0x8000 is trusted (bank 0 is actually used by 16 colors mode) */ |
| 1303 | 1320 | READ8_MEMBER(pc9801_state::gvram_r) |
| 1304 | 1321 | { |
| 1305 | | return m_video_ram_2[offset+0x08000+m_vram_bank*0x20000]; |
| 1322 | return BITSWAP8(m_video_ram_2[(offset>>1)+0x04000+m_vram_bank*0x10000] >> ((offset & 1) << 3),0,1,2,3,4,5,6,7); |
| 1306 | 1323 | } |
| 1307 | 1324 | |
| 1308 | 1325 | WRITE8_MEMBER(pc9801_state::gvram_w) |
| 1309 | 1326 | { |
| 1310 | | m_video_ram_2[offset+0x08000+m_vram_bank*0x20000] = data; |
| 1327 | UINT16 ram = m_video_ram_2[(offset>>1)+0x04000+m_vram_bank*0x10000]; |
| 1328 | int mask = (offset & 1) << 3; |
| 1329 | data = BITSWAP8(data,0,1,2,3,4,5,6,7); |
| 1330 | m_video_ram_2[(offset>>1)+0x04000+m_vram_bank*0x10000] = (ram & (0xff00 >> mask)) | (data << mask); |
| 1311 | 1331 | } |
| 1312 | 1332 | |
| 1313 | | READ8_MEMBER(pc9801_state::upd7220_grcg_r) |
| 1333 | inline UINT16 pc9801_state::egc_do_partial_op(int plane, UINT16 src, UINT16 pat, UINT16 dst) |
| 1314 | 1334 | { |
| 1315 | | UINT8 res = 0; |
| 1335 | UINT16 out = 0; |
| 1336 | int src_off, dst_off; |
| 1337 | UINT16 src_tmp = src; |
| 1316 | 1338 | |
| 1317 | | if(!(m_grcg.mode & 0x80)) |
| 1339 | if(m_egc.regs[6] & 0x1000) |
| 1340 | { |
| 1341 | src_off = 15 - (m_egc.regs[6] & 0xf); |
| 1342 | dst_off = 15 - ((m_egc.regs[6] >> 4) & 0xf); |
| 1343 | } |
| 1344 | else |
| 1345 | { |
| 1346 | src_off = m_egc.regs[6] & 0xf; |
| 1347 | dst_off = (m_egc.regs[6] >> 4) & 0xf; |
| 1348 | } |
| 1349 | |
| 1350 | if(src_off < dst_off) |
| 1351 | { |
| 1352 | src = src_tmp << (dst_off - src_off); |
| 1353 | src |= m_egc.leftover[plane]; |
| 1354 | m_egc.leftover[plane] = src_tmp >> (16 - (dst_off - src_off)); |
| 1355 | } |
| 1356 | else |
| 1357 | { |
| 1358 | src = src_tmp >> (src_off - dst_off); |
| 1359 | src |= m_egc.leftover[plane]; |
| 1360 | m_egc.leftover[plane] = src_tmp << (16 - (src_off - dst_off)); |
| 1361 | } |
| 1362 | |
| 1363 | for(int i = 7; i >= 0; i--) |
| 1364 | { |
| 1365 | if(BIT(m_egc.regs[2], i)) |
| 1366 | out |= src & pat & dst; |
| 1367 | pat = ~pat; |
| 1368 | dst = (!(i & 1)) ? ~dst : dst; |
| 1369 | src = (i == 4) ? ~src : src; |
| 1370 | } |
| 1371 | return out; |
| 1372 | } |
| 1373 | |
| 1374 | void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask) |
| 1375 | { |
| 1376 | UINT16 mask = m_egc.regs[4] & mem_mask, out = 0; |
| 1377 | bool dir = !(m_egc.regs[6] & 0x1000); |
| 1378 | int dst_off = (m_egc.regs[6] >> 4) & 0xf; |
| 1379 | offset &= 0x13fff; |
| 1380 | |
| 1381 | if((((m_egc.regs[2] >> 11) & 3) == 1) || ((((m_egc.regs[2] >> 11) & 3) == 2) && !BIT(m_egc.regs[2], 10))) |
| 1382 | { |
| 1383 | UINT16 end_mask = 0xffff, start_mask = 0xffff; |
| 1384 | // mask off the bits before the start |
| 1385 | if(m_egc.first) |
| 1386 | { |
| 1387 | m_egc.leftover[0] = m_egc.leftover[1] = m_egc.leftover[2] = m_egc.leftover[3] = 0; |
| 1388 | start_mask = dir ? ~((1 << dst_off) - 1) : ((1 << (15 - dst_off)) - 1); |
| 1389 | } |
| 1390 | |
| 1391 | // mask off the bits past the end of the blit |
| 1392 | if(m_egc.count < 16) |
| 1393 | { |
| 1394 | end_mask = dir ? ((1 << m_egc.count) - 1) : ~((1 << (16 - m_egc.count)) - 1); |
| 1395 | // if the blit is less than 16 bits, adjust the masks |
| 1396 | if(start_mask != 0xffff) |
| 1397 | { |
| 1398 | if(dir) |
| 1399 | end_mask <<= dst_off; |
| 1400 | else |
| 1401 | end_mask >>= (15 - dst_off); |
| 1402 | } |
| 1403 | } |
| 1404 | mask &= end_mask & start_mask; |
| 1405 | } |
| 1406 | |
| 1407 | for(int i = 0; i < 4; i++) |
| 1408 | { |
| 1409 | if(!BIT(m_egc.regs[0], i)) |
| 1410 | { |
| 1411 | UINT16 src = m_egc.src[i] & mem_mask, pat = m_egc.pat[i]; |
| 1412 | if(BIT(m_egc.regs[2], 10)) |
| 1413 | src = data; |
| 1414 | |
| 1415 | if((m_egc.regs[2] & 0x300) == 0x200) |
| 1416 | pat = m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)]; |
| 1417 | |
| 1418 | switch((m_egc.regs[2] >> 11) & 3) |
| 1419 | { |
| 1420 | case 0: |
| 1421 | out = data; |
| 1422 | break; |
| 1423 | case 1: |
| 1424 | if(mem_mask == 0x00ff) |
| 1425 | src = src | src << 8; |
| 1426 | else if(mem_mask == 0xff00) |
| 1427 | src = src | src >> 8; |
| 1428 | |
| 1429 | out = egc_do_partial_op(i, src, pat, m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)]); |
| 1430 | break; |
| 1431 | case 2: |
| 1432 | out = pat; |
| 1433 | break; |
| 1434 | case 3: |
| 1435 | logerror("Invalid EGC blit operation\n"); |
| 1436 | return; |
| 1437 | } |
| 1438 | |
| 1439 | m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)] &= ~mask; |
| 1440 | m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)] |= out & mask; |
| 1441 | } |
| 1442 | } |
| 1443 | if(mem_mask != 0xffff) |
| 1444 | { |
| 1445 | dst_off &= 7; |
| 1446 | if(m_egc.first) |
| 1447 | m_egc.count -= dir ? 8 - dst_off : (dst_off + 1); |
| 1448 | else |
| 1449 | m_egc.count -= 8; |
| 1450 | } |
| 1451 | else |
| 1452 | { |
| 1453 | if(m_egc.first) |
| 1454 | m_egc.count -= dir ? 16 - dst_off : (dst_off + 1); |
| 1455 | else |
| 1456 | m_egc.count -= 16; |
| 1457 | } |
| 1458 | |
| 1459 | m_egc.first = false; |
| 1460 | |
| 1461 | if(m_egc.count <= 0) |
| 1462 | { |
| 1463 | m_egc.first = true; |
| 1464 | m_egc.count = (m_egc.regs[7] & 0xfff) + 1; |
| 1465 | } |
| 1466 | } |
| 1467 | |
| 1468 | UINT16 pc9801_state::egc_blit_r(UINT32 offset, UINT16 mem_mask) |
| 1469 | { |
| 1470 | UINT32 plane_off = offset & 0x13fff; |
| 1471 | if((m_egc.regs[2] & 0x300) == 0x100) |
| 1472 | { |
| 1473 | m_egc.pat[0] = m_video_ram_2[plane_off + 0x4000]; |
| 1474 | m_egc.pat[1] = m_video_ram_2[plane_off + (0x4000 * 2)]; |
| 1475 | m_egc.pat[2] = m_video_ram_2[plane_off + (0x4000 * 3)]; |
| 1476 | m_egc.pat[3] = m_video_ram_2[plane_off]; |
| 1477 | } |
| 1478 | if(!BIT(m_egc.regs[2], 10)) |
| 1479 | { |
| 1480 | m_egc.src[0] = m_video_ram_2[plane_off + 0x4000]; |
| 1481 | m_egc.src[1] = m_video_ram_2[plane_off + (0x4000 * 2)]; |
| 1482 | m_egc.src[2] = m_video_ram_2[plane_off + (0x4000 * 3)]; |
| 1483 | m_egc.src[3] = m_video_ram_2[plane_off]; |
| 1484 | } |
| 1485 | if(BIT(m_egc.regs[2], 13)) |
| 1486 | return m_video_ram_2[offset]; |
| 1487 | else |
| 1488 | return m_video_ram_2[plane_off + (((m_egc.regs[1] >> 8) + 1) & 3) * 0x4000]; |
| 1489 | } |
| 1490 | |
| 1491 | READ16_MEMBER(pc9801_state::upd7220_grcg_r) |
| 1492 | { |
| 1493 | UINT16 res = 0; |
| 1494 | |
| 1495 | if(!(m_grcg.mode & 0x80) || space.debugger_access()) |
| 1318 | 1496 | res = m_video_ram_2[offset]; |
| 1497 | else if(m_ex_video_ff[2]) |
| 1498 | res = egc_blit_r(offset, mem_mask); |
| 1319 | 1499 | else if(!(m_grcg.mode & 0x40)) |
| 1320 | 1500 | { |
| 1321 | 1501 | int i; |
| 1322 | 1502 | |
| 1323 | | offset &= ~(3 << 15); |
| 1503 | offset &= 0x13fff; |
| 1324 | 1504 | res = 0; |
| 1325 | 1505 | for(i=0;i<4;i++) |
| 1326 | 1506 | { |
| 1327 | 1507 | if((m_grcg.mode & (1 << i)) == 0) |
| 1328 | | res |= m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] ^ m_grcg.tile[i]; |
| 1508 | { |
| 1509 | res |= m_video_ram_2[offset | (((i + 1) & 3) * 0x4000)] ^ (m_grcg.tile[i] | m_grcg.tile[i] << 8); |
| 1510 | } |
| 1329 | 1511 | } |
| 1330 | 1512 | |
| 1331 | | res ^= 0xff; |
| 1513 | res ^= 0xffff; |
| 1332 | 1514 | } |
| 1333 | 1515 | |
| 1334 | 1516 | return res; |
| 1335 | 1517 | } |
| 1336 | 1518 | |
| 1337 | | WRITE8_MEMBER(pc9801_state::upd7220_grcg_w) |
| 1519 | WRITE16_MEMBER(pc9801_state::upd7220_grcg_w) |
| 1338 | 1520 | { |
| 1339 | | if((m_grcg.mode & 0x80) == 0) |
| 1340 | | m_video_ram_2[offset] = data; |
| 1521 | if(!(m_grcg.mode & 0x80)) |
| 1522 | COMBINE_DATA(&m_video_ram_2[offset]); |
| 1523 | else if(m_ex_video_ff[2]) |
| 1524 | egc_blit_w(offset, data, mem_mask); |
| 1341 | 1525 | else |
| 1342 | 1526 | { |
| 1343 | 1527 | int i; |
| 1344 | | offset &= ~(3 << 15); |
| 1528 | UINT8 *vram = (UINT8 *)m_video_ram_2.target(); |
| 1529 | offset = (offset << 1) & 0x27fff; |
| 1345 | 1530 | |
| 1346 | 1531 | if(m_grcg.mode & 0x40) // RMW |
| 1347 | 1532 | { |
| r242413 | r242414 | |
| 1349 | 1534 | { |
| 1350 | 1535 | if((m_grcg.mode & (1 << i)) == 0) |
| 1351 | 1536 | { |
| 1352 | | m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] &= ~data; |
| 1353 | | m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] |= m_grcg.tile[i] & data; |
| 1537 | if(mem_mask & 0xff) |
| 1538 | { |
| 1539 | vram[offset | (((i + 1) & 3) * 0x8000)] &= ~data; |
| 1540 | vram[offset | (((i + 1) & 3) * 0x8000)] |= m_grcg.tile[i] & data; |
| 1541 | } |
| 1542 | if(mem_mask & 0xff00) |
| 1543 | { |
| 1544 | vram[offset | (((i + 1) & 3) * 0x8000) | 1] &= ~(data >> 8); |
| 1545 | vram[offset | (((i + 1) & 3) * 0x8000) | 1] |= m_grcg.tile[i] & (data >> 8); |
| 1546 | } |
| 1354 | 1547 | } |
| 1355 | 1548 | } |
| 1356 | 1549 | } |
| r242413 | r242414 | |
| 1360 | 1553 | { |
| 1361 | 1554 | if((m_grcg.mode & (1 << i)) == 0) |
| 1362 | 1555 | { |
| 1363 | | m_video_ram_2[offset | (((i + 1) & 3) * 0x8000)] = m_grcg.tile[i]; |
| 1556 | if(mem_mask & 0xff) |
| 1557 | vram[offset | (((i + 1) & 3) * 0x8000)] = m_grcg.tile[i]; |
| 1558 | if(mem_mask & 0xff00) |
| 1559 | vram[offset | (((i + 1) & 3) * 0x8000) | 1] = m_grcg.tile[i]; |
| 1364 | 1560 | } |
| 1365 | 1561 | } |
| 1366 | 1562 | } |
| r242413 | r242414 | |
| 1491 | 1687 | |
| 1492 | 1688 | static ADDRESS_MAP_START( pc9801_map, AS_PROGRAM, 16, pc9801_state ) |
| 1493 | 1689 | AM_RANGE(0x00000, 0x9ffff) AM_RAM //work RAM |
| 1494 | | AM_RANGE(0xa0000, 0xa3fff) AM_READWRITE8(tvram_r,tvram_w,0xffff) //TVRAM |
| 1690 | AM_RANGE(0xa0000, 0xa3fff) AM_READWRITE(tvram_r,tvram_w) //TVRAM |
| 1495 | 1691 | AM_RANGE(0xa8000, 0xbffff) AM_READWRITE8(gvram_r,gvram_w,0xffff) //bitmap VRAM |
| 1496 | 1692 | AM_RANGE(0xcc000, 0xcdfff) AM_ROM AM_REGION("sound_bios",0) //sound BIOS |
| 1497 | 1693 | AM_RANGE(0xd6000, 0xd6fff) AM_ROM AM_REGION("fdc_bios_2dd",0) //floppy BIOS 2dd |
| r242413 | r242414 | |
| 1674 | 1870 | txt_scrl_w(space,offset,data); |
| 1675 | 1871 | } |
| 1676 | 1872 | |
| 1873 | WRITE16_MEMBER(pc9801_state::egc_w) |
| 1874 | { |
| 1875 | if(!m_ex_video_ff[2]) |
| 1876 | return; |
| 1877 | |
| 1878 | COMBINE_DATA(&m_egc.regs[offset]); |
| 1879 | switch(offset) |
| 1880 | { |
| 1881 | case 1: |
| 1882 | case 3: |
| 1883 | case 5: |
| 1884 | { |
| 1885 | UINT8 color = 0; |
| 1886 | switch((m_egc.regs[1] >> 13) & 3) |
| 1887 | { |
| 1888 | case 1: |
| 1889 | //back color |
| 1890 | color = m_egc.regs[5]; |
| 1891 | break; |
| 1892 | case 2: |
| 1893 | //fore color |
| 1894 | color = m_egc.regs[3]; |
| 1895 | break; |
| 1896 | default: |
| 1897 | return; |
| 1898 | } |
| 1899 | m_egc.pat[0] = (color & 1) ? 0xffff : 0; |
| 1900 | m_egc.pat[1] = (color & 2) ? 0xffff : 0; |
| 1901 | m_egc.pat[2] = (color & 4) ? 0xffff : 0; |
| 1902 | m_egc.pat[3] = (color & 8) ? 0xffff : 0; |
| 1903 | break; |
| 1904 | } |
| 1905 | case 6: |
| 1906 | case 7: |
| 1907 | m_egc.count = (m_egc.regs[7] & 0xfff) + 1; |
| 1908 | m_egc.first = true; |
| 1909 | break; |
| 1910 | } |
| 1911 | } |
| 1912 | |
| 1677 | 1913 | READ8_MEMBER(pc9801_state::pc9810rs_fdc_ctrl_r) |
| 1678 | 1914 | { |
| 1679 | 1915 | return (m_fdc_ctrl & 3) | 0xf0 | 8 | 4; |
| r242413 | r242414 | |
| 1885 | 2121 | ((offset >= 4) ? m_pic2 : m_pic1)->write(space, offset & 3, data); |
| 1886 | 2122 | } |
| 1887 | 2123 | |
| 1888 | | READ8_MEMBER(pc9801_state::grcg_gvram_r) |
| 2124 | READ16_MEMBER(pc9801_state::grcg_gvram_r) |
| 1889 | 2125 | { |
| 1890 | | return upd7220_grcg_r(space, (offset + 0x8000) | (m_vram_bank << 17), mem_mask); |
| 2126 | UINT16 ret = upd7220_grcg_r(space, (offset + 0x4000) | (m_vram_bank << 16), mem_mask); |
| 2127 | return BITSWAP16(ret,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 1891 | 2128 | } |
| 1892 | 2129 | |
| 1893 | | WRITE8_MEMBER(pc9801_state::grcg_gvram_w) |
| 2130 | WRITE16_MEMBER(pc9801_state::grcg_gvram_w) |
| 1894 | 2131 | { |
| 1895 | | upd7220_grcg_w(space, (offset + 0x8000) | (m_vram_bank << 17), data, mem_mask); |
| 2132 | data = BITSWAP16(data,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 2133 | upd7220_grcg_w(space, (offset + 0x4000) | (m_vram_bank << 16), data, mem_mask); |
| 1896 | 2134 | } |
| 1897 | 2135 | |
| 1898 | | READ8_MEMBER(pc9801_state::grcg_gvram0_r) |
| 2136 | READ16_MEMBER(pc9801_state::grcg_gvram0_r) |
| 1899 | 2137 | { |
| 1900 | | return upd7220_grcg_r(space, offset | (m_vram_bank << 17), mem_mask); |
| 2138 | UINT16 ret = upd7220_grcg_r(space, offset | (m_vram_bank << 16), mem_mask); |
| 2139 | return BITSWAP16(ret,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 1901 | 2140 | } |
| 1902 | 2141 | |
| 1903 | | WRITE8_MEMBER(pc9801_state::grcg_gvram0_w) |
| 2142 | WRITE16_MEMBER(pc9801_state::grcg_gvram0_w) |
| 1904 | 2143 | { |
| 1905 | | upd7220_grcg_w(space, offset | (m_vram_bank << 17), data, mem_mask); |
| 2144 | data = BITSWAP16(data,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7); |
| 2145 | upd7220_grcg_w(space, offset | (m_vram_bank << 16), data, mem_mask); |
| 1906 | 2146 | } |
| 1907 | 2147 | |
| 1908 | 2148 | static ADDRESS_MAP_START( pc9801ux_map, AS_PROGRAM, 16, pc9801_state ) |
| 1909 | 2149 | AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("wram") |
| 1910 | | AM_RANGE(0x0a0000, 0x0a3fff) AM_READWRITE8(tvram_r, tvram_w, 0xffff) |
| 2150 | AM_RANGE(0x0a0000, 0x0a3fff) AM_READWRITE(tvram_r, tvram_w) |
| 1911 | 2151 | AM_RANGE(0x0a4000, 0x0a4fff) AM_READWRITE8(pc9801rs_knjram_r, pc9801rs_knjram_w, 0xffff) |
| 1912 | | AM_RANGE(0x0a8000, 0x0bffff) AM_READWRITE8(grcg_gvram_r, grcg_gvram_w, 0xffff) |
| 1913 | | AM_RANGE(0x0e0000, 0x0e7fff) AM_READWRITE8(grcg_gvram0_r,grcg_gvram0_w, 0xffff) |
| 2152 | AM_RANGE(0x0a8000, 0x0bffff) AM_READWRITE(grcg_gvram_r, grcg_gvram_w) |
| 2153 | AM_RANGE(0x0e0000, 0x0e7fff) AM_READWRITE(grcg_gvram0_r,grcg_gvram0_w) |
| 1914 | 2154 | AM_RANGE(0x0e0000, 0x0fffff) AM_READ8(pc9801rs_ipl_r, 0xffff) |
| 1915 | 2155 | ADDRESS_MAP_END |
| 1916 | 2156 | |
| r242413 | r242414 | |
| 1927 | 2167 | AM_RANGE(0x00f0, 0x00ff) AM_READWRITE8(a20_ctrl_r, a20_ctrl_w, 0x00ff) |
| 1928 | 2168 | AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffff) |
| 1929 | 2169 | AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w, 0xffff) //ROM/RAM bank |
| 2170 | AM_RANGE(0x04a0, 0x04af) AM_WRITE(egc_w) |
| 1930 | 2171 | AM_RANGE(0x3fd8, 0x3fdf) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00) |
| 1931 | 2172 | // AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r, pc9801_ext_opna_w, 0xffff) |
| 1932 | 2173 | AM_IMPORT_FROM(pc9801_io) |
| r242413 | r242414 | |
| 2135 | 2376 | static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state ) |
| 2136 | 2377 | AM_RANGE(0x00000000, 0x0009ffff) AM_RAMBANK("wram") |
| 2137 | 2378 | //AM_RANGE(0x00080000, 0x0009ffff) AM_READWRITE8(winram_r, winram_w, 0xffffffff) |
| 2138 | | AM_RANGE(0x000a0000, 0x000a3fff) AM_READWRITE8(tvram_r, tvram_w, 0xffffffff) |
| 2379 | AM_RANGE(0x000a0000, 0x000a3fff) AM_READWRITE16(tvram_r, tvram_w, 0xffffffff) |
| 2139 | 2380 | AM_RANGE(0x000a4000, 0x000a4fff) AM_READWRITE8(pc9801rs_knjram_r, pc9801rs_knjram_w, 0xffffffff) |
| 2140 | | AM_RANGE(0x000a8000, 0x000bffff) AM_READWRITE8(grcg_gvram_r, grcg_gvram_w, 0xffffffff) |
| 2381 | AM_RANGE(0x000a8000, 0x000bffff) AM_READWRITE16(grcg_gvram_r, grcg_gvram_w, 0xffffffff) |
| 2141 | 2382 | AM_RANGE(0x000cc000, 0x000cdfff) AM_ROM AM_REGION("sound_bios",0) //sound BIOS |
| 2142 | 2383 | AM_RANGE(0x000d8000, 0x000d9fff) AM_ROM AM_REGION("ide",0) |
| 2143 | 2384 | AM_RANGE(0x000da000, 0x000dbfff) AM_RAM // ide ram |
| 2144 | | AM_RANGE(0x000e0000, 0x000e7fff) AM_READWRITE8(grcg_gvram0_r,grcg_gvram0_w, 0xffffffff) |
| 2385 | AM_RANGE(0x000e0000, 0x000e7fff) AM_READWRITE16(grcg_gvram0_r,grcg_gvram0_w, 0xffffffff) |
| 2145 | 2386 | AM_RANGE(0x000e0000, 0x000fffff) AM_READ8(pc9801rs_ipl_r, 0xffffffff) |
| 2146 | 2387 | AM_RANGE(0x00f00000, 0x00f9ffff) AM_RAM AM_SHARE("ext_gvram") |
| 2147 | 2388 | AM_RANGE(0xffee0000, 0xffefffff) AM_READ8(pc9801rs_ipl_r, 0xffffffff) |
| r242413 | r242414 | |
| 2179 | 2420 | // AM_RANGE(0x043d, 0x043d) ROM/RAM bank (NEC) |
| 2180 | 2421 | AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w, 0xffffffff) //ROM/RAM bank (EPSON) |
| 2181 | 2422 | AM_RANGE(0x0460, 0x0463) AM_READWRITE8(pc9821_window_bank_r,pc9821_window_bank_w, 0xffffffff) |
| 2182 | | // AM_RANGE(0x04a0, 0x04af) EGC |
| 2423 | AM_RANGE(0x04a0, 0x04af) AM_WRITE16(egc_w, 0xffffffff) |
| 2183 | 2424 | // AM_RANGE(0x04be, 0x04be) FDC "RPM" register |
| 2184 | 2425 | AM_RANGE(0x0640, 0x064f) AM_DEVREADWRITE16("ide", ata_interface_device, read_cs0, write_cs0, 0xffffffff) |
| 2185 | 2426 | AM_RANGE(0x0740, 0x074f) AM_DEVREADWRITE16("ide", ata_interface_device, read_cs1, write_cs1, 0xffffffff) |
| r242413 | r242414 | |
| 2229 | 2470 | // AM_RANGE(0xfcd0, 0xfcd3) MIDI port, option F / <undefined> |
| 2230 | 2471 | ADDRESS_MAP_END |
| 2231 | 2472 | |
| 2232 | | static ADDRESS_MAP_START( upd7220_1_map, AS_0, 8, pc9801_state ) |
| 2473 | static ADDRESS_MAP_START( upd7220_1_map, AS_0, 16, pc9801_state ) |
| 2233 | 2474 | AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram_1") |
| 2234 | 2475 | ADDRESS_MAP_END |
| 2235 | 2476 | |
| 2236 | | static ADDRESS_MAP_START( upd7220_2_map, AS_0, 8, pc9801_state ) |
| 2477 | static ADDRESS_MAP_START( upd7220_2_map, AS_0, 16, pc9801_state ) |
| 2237 | 2478 | AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram_2") |
| 2238 | 2479 | ADDRESS_MAP_END |
| 2239 | 2480 | |
| 2240 | | static ADDRESS_MAP_START( upd7220_grcg_2_map, AS_0, 8, pc9801_state ) |
| 2481 | static ADDRESS_MAP_START( upd7220_grcg_2_map, AS_0, 16, pc9801_state ) |
| 2241 | 2482 | AM_RANGE(0x00000, 0x3ffff) AM_READWRITE(upd7220_grcg_r, upd7220_grcg_w) AM_SHARE("video_ram_2") |
| 2242 | 2483 | ADDRESS_MAP_END |
| 2243 | 2484 | |
| r242413 | r242414 | |
| 2781 | 3022 | |
| 2782 | 3023 | MACHINE_RESET_MEMBER(pc9801_state,pc9801_common) |
| 2783 | 3024 | { |
| 2784 | | memset(m_tvram, 0, sizeof(UINT8) * 0x4000); |
| 3025 | memset(m_tvram, 0, sizeof(UINT16) * 0x2000); |
| 2785 | 3026 | /* this looks like to be some kind of backup ram, system will boot with green colors otherwise */ |
| 2786 | 3027 | { |
| 2787 | 3028 | int i; |
| r242413 | r242414 | |
| 2792 | 3033 | }; |
| 2793 | 3034 | |
| 2794 | 3035 | for(i=0;i<0x10;i++) |
| 2795 | | m_tvram[(0x3fe0)+i*2] = default_memsw_data[i]; |
| 3036 | m_tvram[(0x3fe0>>1)+i] = default_memsw_data[i]; |
| 2796 | 3037 | } |
| 2797 | 3038 | |
| 2798 | 3039 | m_beeper->set_frequency(2400); |
| r242413 | r242414 | |
| 2802 | 3043 | m_mouse.control = 0xff; |
| 2803 | 3044 | m_mouse.freq_reg = 0; |
| 2804 | 3045 | m_mouse.freq_index = 0; |
| 3046 | memset(&m_egc, 0, sizeof(m_egc)); |
| 2805 | 3047 | } |
| 2806 | 3048 | |
| 2807 | 3049 | MACHINE_RESET_MEMBER(pc9801_state,pc9801f) |
| r242413 | r242414 | |
| 2869 | 3111 | |
| 2870 | 3112 | FLOPPY_FORMATS_MEMBER( pc9801_state::floppy_formats ) |
| 2871 | 3113 | FLOPPY_PC98_FORMAT, |
| 2872 | | FLOPPY_PC98FDI_FORMAT |
| 3114 | FLOPPY_PC98FDI_FORMAT, |
| 3115 | FLOPPY_FDD_FORMAT, |
| 3116 | FLOPPY_DCP_FORMAT, |
| 3117 | FLOPPY_DIP_FORMAT, |
| 3118 | FLOPPY_NFD_FORMAT |
| 2873 | 3119 | FLOPPY_FORMATS_END |
| 2874 | 3120 | |
| 2875 | 3121 | TIMER_DEVICE_CALLBACK_MEMBER( pc9801_state::mouse_irq_cb ) |
trunk/src/mess/machine/victor9kb.c
| r242413 | r242414 | |
| 11 | 11 | |
| 12 | 12 | /* |
| 13 | 13 | |
| 14 | | PCB Layout |
| 14 | Keyboard PCB Layout |
| 15 | 15 | ---------- |
| 16 | 16 | |
| 17 | | A65-02307-201D |
| 17 | Marking on PCB back: A65-02307-201D 007 |
| 18 | 18 | |
| 19 | | |-----------------------------------------------------------------------| |
| 20 | | | 22-008-03 22-050-3B 8021 74LS14 CN1| |
| 21 | | | ?MHz | |
| 22 | | | | |
| 23 | | | | |
| 24 | | | | |
| 25 | | | | |
| 26 | | | | |
| 27 | | | | |
| 28 | | | | |
| 29 | | | | |
| 30 | | | | |
| 31 | | |-----------------------------------------------------------------------| |
| 19 | |------------------------------------------------------------------------------------| |
| 20 | | 22-908-03 22-950-3B XTAL 8021 74LS14 [804x] [EPROM] [???] L CN1=___ |
| 21 | | X X X X X X X X X X X | |
| 22 | | X X X X X X X X X X X X X X X X X X X X X | |
| 23 | | X X X X X X X X X X X X X X X X X X X X X | |
| 24 | | X X X X X X X X X X X X X X X X X X X X X | |
| 25 | | X X X X X X X X X X X X X X X X X X X X | |
| 26 | | X X marking X X X X X X X X | |
| 27 | |----------------------------------------------------------------------------------------| |
| 32 | 28 | |
| 29 | |
| 33 | 30 | Notes: |
| 34 | 31 | All IC's shown. |
| 32 | XTAL - 3.579545Mhz Crystal, marked "48-300-010" (front of xtal) and "3.579545Mhz" (back of xtal) |
| 33 | 74LS14 - Z4 - 74LS14 Hex inverter with Schmitt-trigger inputs (0.8v hysteresis) |
| 34 | 8021 - Z3 - Intel 8021 MCU, marked: "P8021 2137 // 8227 // 20-8021-139 // (C) INTEL 77" |
| 35 | 22-908-03 - Z2 - Exar Semiconductor XR22-008-03 keyboard matrix capacitive readout latch |
| 36 | 22-950-3B - Z1 - Exar Semiconductor XR22-050-3B keyboard matrix row driver with 4 to 12 decoder/demultiplexer |
| 37 | CN1 or J1 - J1 - keyboard data connector (SIP, 7 pins, right angle) |
| 38 | L - L1 & L2 - mil-spec 22uH 10% inductors (double wide silver band(mil spec), red(2) red(2) black(x1uH) silver(10%)) |
| 35 | 39 | |
| 36 | | 8021 - Intel 8021 "70-8021-130?" |
| 37 | | 22-008-03 - Exar Semiconductor XR22-008-03 keyboard matrix capacitive readout latch |
| 38 | | 22-050-3B - Exar Semiconductor XR22-050-3B keyboard matrix row driver with 4 to 12 decoder/demultiplexer |
| 39 | | CN1 - keyboard data connector |
| 40 | [804x] - unpopulated space for a 40 pin 804x or 803x MCU |
| 41 | [EPROM] - unpopulated space for an EPROM, if a ROMless 803x MCU was used |
| 42 | [???] - unpopulated space for an unknown NDIP10 IC or DIP-switch array |
| 43 | X - capacitive sensor pad for one key |
| 44 | marking - PCB trace marking: "KTC // A65-02307-007 // PCB 201 D" |
| 40 | 45 | |
| 46 | 74LS14 (Hex inverter with Schmitt-trigger inputs (0.8v hysteresis)) |
| 47 | ------------------ |
| 48 | __ __ |
| 49 | 1A 1 |* \_/ | 14 VCC |
| 50 | /1Y 2 | | 13 6A |
| 51 | 2A 3 | | 12 /6Y |
| 52 | /2Y 4 | | 11 5A |
| 53 | 3A 5 | 74LS14| 10 /5Y |
| 54 | /3Y 6 | | 9 4A |
| 55 | GND 7 |_______| 8 /4Y |
| 56 | |
| 57 | |
| 58 | P8021 Pinout |
| 59 | ------------------ |
| 60 | _____ _____ |
| 61 | P22 1 |* \_/ | 28 VCC |
| 62 | P23 2 | | 27 P21 |
| 63 | PROG 3 | | 26 P20 |
| 64 | P00 4 | | 25 P17 |
| 65 | P01 5 | P8021 | 24 P16 |
| 66 | P02 6 | | 23 P15 |
| 67 | P03 7 | | 22 P14 |
| 68 | P04 8 | | 21 P13 |
| 69 | P05 9 | | 20 P12 |
| 70 | P06 10 | | 19 P11 |
| 71 | P07 11 | | 18 P10 |
| 72 | ALE 12 | | 17 RESET |
| 73 | T1 13 | | 16 XTAL 2 |
| 74 | VSS 14 |_____________| 15 XTAL 1 |
| 75 | |
| 76 | |
| 77 | XR22-008-03 Pinout (AKA XR22-908-03) |
| 78 | ------------------ |
| 79 | _____ _____ |
| 80 | D0 1 |* \_/ | 20 Vcc |
| 81 | D1 2 | | 19 _CLR |
| 82 | D2 3 | | 18 Q0 |
| 83 | D3 4 | | 17 Q1 |
| 84 | HYS 5 | 22-008-03 | 16 Q2 |
| 85 | D4 6 | | 15 Q3 |
| 86 | D5 7 | | 14 Q4 |
| 87 | D6 8 | | 13 Q5 |
| 88 | D7 9 | | 12 Q6 |
| 89 | GND 10 |_____________| 11 Q7 |
| 90 | |
| 91 | |
| 92 | XR22-050-3B Pinout (AKA XR22-950-3B) |
| 93 | ------------------ |
| 94 | _____ _____ |
| 95 | Y8 1 |* \_/ | 20 Vcc |
| 96 | Y9 2 | | 19 Y7 |
| 97 | Y10 3 | | 18 Y6 |
| 98 | Y11 4 | | 17 Y5 |
| 99 | _STB 5 | 22-050-3B | 16 Y4 |
| 100 | A0 6 | | 15 Y3 |
| 101 | A1 7 | | 14 Y2 |
| 102 | A2 8 | | 13 Y1 |
| 103 | A3 9 | | 12 Y0 |
| 104 | GND 10 |_____________| 11 OE? |
| 105 | |
| 106 | i8021 to elsewhere connections |
| 107 | ------------------------------ |
| 108 | 8021 pin - 22-xxx pin |
| 109 | P22 1 - 74LS14 pin 5 (3A) AND (804x chip pin 37, P26) |
| 110 | P23 2 - 74LS14 pin 11 (5A) AND (804x chip pin 38, P27) |
| 111 | PROG 3 - (804x chip pin 25, PROG) |
| 112 | P00 4 - N/C |
| 113 | P01 5 - N/C |
| 114 | P02 6 - N/C |
| 115 | P03 7 - N/C |
| 116 | P04 8 - N/C |
| 117 | P05 9 - N/C |
| 118 | P06 10 - N/C |
| 119 | P07 11 - N/C |
| 120 | ALE 12 - N/C |
| 121 | T1 13 - 74LS14 pin 2 (/1Y) AND (804x chip pin 39, T1) |
| 122 | VSS 14 - GND |
| 123 | XTAL1 15 - XTAL |
| 124 | XTAL2 16 - XTAL |
| 125 | RESET 17 - 10uf capacitor - VCC |
| 126 | P10 18 - 22-908 pin 18 (Q0) AND 22-950 pin 6 (A0) AND (804x chip pin 27, P10) |
| 127 | P11 19 - 22-908 pin 17 (Q1) AND 22-950 pin 7 (A1) AND (804x chip pin 28, P11) |
| 128 | P12 20 - 22-908 pin 16 (Q2) AND 22-950 pin 8 (A2) AND (804x chip pin 29, P12) |
| 129 | P13 21 - 22-908 pin 15 (Q3) AND 22-950 pin 9 (A3) AND (804x chip pin 30, P13) |
| 130 | P14 22 - 22-908 pin 14 (Q4) AND (804x chip pin 31, P14) |
| 131 | P15 23 - 22-908 pin 13 (Q5) AND (804x chip pin 32, P15) |
| 132 | P16 24 - 22-908 pin 12 (Q6) AND (804x chip pin 33, P16) |
| 133 | P17 25 - 22-908 pin 11 (Q7) AND (804x chip pin 34, P17) |
| 134 | P20 26 - 22-908 pin 19 (/CLR) AND 22-950 pin 5 (/STB) AND (804x chip pin 35, P24) |
| 135 | P21 27 - 74LS14 pin 9 (4A) AND (804x chip pin 36, P25) |
| 136 | VCC 28 - VCC |
| 137 | |
| 138 | 74LS14 to elsewhere connections |
| 139 | ------------------------------- |
| 140 | 1A 1 - 100 Ohm resistor - J1 pin 4 |
| 141 | /1Y 2 - 8021 pin 13 (T1) |
| 142 | 2A 3 - 74LS14 pin 8 |
| 143 | /2Y 4 - 22uH 10% inductor 'L1' - J1 pin 5 |
| 144 | 3A 5 - 8021 pin 1 (P22) |
| 145 | /3Y 6 - many keyboard contact pads (!) |
| 146 | GND 7 - GND |
| 147 | /4Y 8 - 74LS14 pin 3 |
| 148 | 4A 9 - 8021 pin 27 (P21) |
| 149 | /5Y 10 - 74LS14 pin 13 |
| 150 | 5A 11 - 8021 pin 2 (P23) |
| 151 | /6Y 12 - 22uH 10% inductor 'L2' - J1 pin 6 |
| 152 | 6A 13 - 74LS14 pin 10 |
| 153 | VCC 14 - VCC |
| 154 | |
| 155 | |
| 156 | J1 (aka CN1) connections: |
| 157 | ------------------------- |
| 158 | 1 - VCC |
| 159 | 2 - GND |
| 160 | 3 - GND |
| 161 | 4 - 100 Ohm 5% resistor -> 74LS14 pin 1 -> inverted 74LS14 pin 2 -> inverted 8021 pin 13 (T1) |
| 162 | 5 - 22uH 10% inductor 'L1' <- 74LS14 pin 4 <- inverted 74LS14 pin 3 <- inverted 74LS14 pin 8 <- 74LS14 pin 9 <- 8021 pin 27 (P21) |
| 163 | 6 - 22uH 10% inductor 'L2' <- 74LS14 pin 12 <- inverted 74LS14 pin 13 <- inverted 74LS14 pin 10 <- 74LS14 pin 11 <- 8021 pin 2 (P23) |
| 164 | 7 - VCC |
| 165 | |
| 166 | Pins 5,and 6 also have a .0047uF capacitor to GND (forming some sort of LC filter) |
| 167 | There is another .0047uF capacitor to ground from the connection between 74LS14 pin 1 and the 100 Ohm 5% resistor which connects to pin 4 (forming some sort of RC filter) |
| 168 | |
| 169 | Exar Custom connections between each other: |
| 170 | ------------------------------------------- |
| 171 | 22-950 pin 11 (OE?) - 68KOhm 5% resistor - 22-908 pin 5 (HYS) |
| 172 | |
| 173 | Cable connecting J1/CN1 to the Victor: |
| 174 | -------------------------------------- |
| 175 | RJ45 when looking at end of plug (not socket!) |
| 176 | .||||||||. |
| 177 | |87654321| |
| 178 | |__----__| |
| 179 | |__| |
| 180 | |
| 181 | RJ45 pins Wire Color Connection |
| 182 | 1 White J1 pin 1 (VCC) |
| 183 | 2 Yellow J1 pin 2 (GND) |
| 184 | 3 Green J1 pin 3 (GND) |
| 185 | 4 Orange J1 pin 4 (?KBACK?) |
| 186 | 5 Blue J1 pin 5 (?KBRDY?) |
| 187 | 6 Red J1 pin 6 (?KBDATA?) |
| 188 | 7 Black J1 pin 7 (VCC) |
| 189 | 8 shield/bare Keyboard Frame Ground |
| 190 | |
| 191 | |
| 192 | Key Layout (USA Variant): (the S0x markings appear on the back of the PCB) |
| 193 | |------------------------------------------------------------------------------------| |
| 194 | | 22-908-03 22-950-3B XTAL 8021 74LS14 [804x] [EPROM] [???] L CN1=___ |
| 195 | | 01 02 03 04 05 06 07 08 09 10 11 | |
| 196 | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
| 197 | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
| 198 | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
| 199 | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
| 200 | | 95 96 marking 97 98 99 100 101 102 103 104| |
| 201 | |----------------------------------------------------------------------------------------| |
| 202 | |
| 203 | key - Shifted(top)/Unshifted(bottom)/Alt(front) (if no slashes in description assume key has just one symbol on it) |
| 204 | S01 - [1] |
| 205 | S02 - [2] |
| 206 | S03 - [3] |
| 207 | S04 - [4] |
| 208 | S05 - [5] |
| 209 | S06 - [6] |
| 210 | S07 - [7] |
| 211 | S08 - [8] |
| 212 | S09 - UNUSED (under the [8] key, no metal contact on key) |
| 213 | S10 - [9] |
| 214 | S11 - [10] |
| 215 | |
| 216 | S12 - CLR/HOME |
| 217 | S13 - (Degree symbol U+00B0)/(+- symbol U+00B1)/(Pi symbol U+03C0) |
| 218 | S14 - !/1/| |
| 219 | S15 - @/2/< |
| 220 | S16 - #/3/> |
| 221 | S17 - $/4/(centered closed dot U+00B7) |
| 222 | S18 - %/5/(up arrow symbol U+2191) |
| 223 | S19 - (cent symbol U+00A2)/6/(logical not symbol U+00AC) |
| 224 | S20 - &/7/^ |
| 225 | S21 - * /8/` |
| 226 | S22 - (/9/{ |
| 227 | S23 - )/0/} |
| 228 | S24 - _/-/~ |
| 229 | S25 - +/=/\ |
| 230 | S26 - BACKSPACE |
| 231 | S27 - INS |
| 232 | S28 - DEL |
| 233 | S29 - MODE CALC/= (white keypad key) |
| 234 | S30 - % (white keypad key) |
| 235 | S31 - (division symbol U+00F7) (white keypad key) |
| 236 | S32 - (multiplication symbol U+00D7) (white keypad key) |
| 237 | |
| 238 | S33 - (up arrow, SCRL, down arrow)//VTAB |
| 239 | S34 - TAB//BACK |
| 240 | S35 - Q |
| 241 | S36 - W |
| 242 | S37 - E |
| 243 | S38 - R |
| 244 | S39 - T |
| 245 | S40 - Y |
| 246 | S41 - U |
| 247 | S42 - I |
| 248 | S43 - O |
| 249 | S44 - P |
| 250 | S45 - (1/4 symbol U+00BC)/(1/2 symbol U+00BD) |
| 251 | S46 - [/] |
| 252 | S47 - UNUSED (under the RETURN key, no metal contact on key) |
| 253 | S48 - ERASE/EOL |
| 254 | S49 - REQ/CAN |
| 255 | S50 - 7 (white keypad key) |
| 256 | S51 - 8 (white keypad key) |
| 257 | S52 - 9 (white keypad key) |
| 258 | S53 - - (white keypad key) |
| 259 | |
| 260 | S54 - (OFF,RVS,ON)//ESC |
| 261 | S55 - LOCK//CAPS LOCK |
| 262 | S56 - A |
| 263 | S57 - S |
| 264 | S58 - D |
| 265 | S59 - F |
| 266 | S60 - G |
| 267 | S61 - H |
| 268 | S62 - J |
| 269 | S63 - K |
| 270 | S64 - L |
| 271 | S65 - :/; |
| 272 | S66 - "/' |
| 273 | S67 - UNUSED (under the RETURN key, no metal contact on key) |
| 274 | S68 - RETURN |
| 275 | S69 - WORD/(left arrow U+2190)/(volume up U+1F508 plus U+25B4) (i.e. 'Previous Word') |
| 276 | S70 - WORD/(right arrow U+2192)/(volume down U+1F508 plus U+25BE) (i.e. 'Next Word') |
| 277 | S71 - 4 (white keypad key) |
| 278 | S72 - 5 (white keypad key) |
| 279 | S73 - 6 (white keypad key) |
| 280 | S74 - + (white keypad key) |
| 281 | |
| 282 | S75 - (OFF,UNDL,ON) |
| 283 | S76 - SHIFT (left shift) |
| 284 | S77 - UNUSED (under the left SHIFT key, no metal contact on key) |
| 285 | S78 - Z |
| 286 | S79 - X |
| 287 | S80 - C |
| 288 | S81 - V |
| 289 | S82 - B |
| 290 | S83 - N |
| 291 | S84 - M |
| 292 | S85 - ,/, (yes, both are comma) |
| 293 | S86 - ./. (yes, both are period/fullstop) |
| 294 | S87 - ?// (this is the actual / key) |
| 295 | S88 - SHIFT (right shift) |
| 296 | S89 - (up arrow U+2191)//(brightness up U+263C plus U+25B4) |
| 297 | S90 - (down arrow U+2193)//(brightness down U+263C plus U+25BE) |
| 298 | S91 - 1 (white keypad key) |
| 299 | S92 - 2 (white keypad key) |
| 300 | S93 - 3 (white keypad key) |
| 301 | S94 - ENTER (white keypad key) |
| 302 | |
| 303 | S95 - RPT |
| 304 | S96 - ALT |
| 305 | S97 - (spacebar) |
| 306 | S98 - PAUSE/CONT |
| 307 | S99 - (left arrow U+2190)//(contrast up U+25D0 plus U+25B4) (U+1F313 can be used in place of U+25D0) |
| 308 | S100 - (right arrow U+2192)//(contrast down U+25D0 plus U+25BE) '' |
| 309 | S101 - 0 (white keypad key) |
| 310 | S102 - 00 (white keypad key) ('double zero') |
| 311 | S103 - . (white keypad key) |
| 312 | S104 - UNUSED (under the ENTER (keypad) key, no metal contact on key) |
| 313 | |
| 314 | Note that the five unused key contacts: |
| 315 | S09, S47, S67, S77 and S104 |
| 316 | may be used on international variants of the Victor 9000/Sirius 1 Keyboard. |
| 317 | |
| 318 | Keyboard Matrix |
| 319 | --------------- |
| 320 | Row select |
| 321 | | Columns Sxxx by bit Columns Key by bit |
| 322 | | D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7 |
| 323 | V V V V V V V V V V V V V V V V V |
| 324 | Y0 12 13 33 34 54 55 75 76 CLRH DEGR SCRL TAB RVS LOCK UNDL LSHFT |
| 325 | Y1 14 15 35 36 56 57 77 78 1 2 Q W A S N/A Z |
| 326 | Y2 16 17 37 38 58 59 79 80 3 4 E R D F X C |
| 327 | Y3 18 19 39 40 60 61 81 82 5 6 T Y G H V B |
| 328 | Y4 20 21 41 42 62 63 83 84 7 8 U I J K N M |
| 329 | Y5 22 23 43 44 64 65 85 86 9 0 O P L ; , . |
| 330 | Y6 24 25 45 46 66 67 87 88 - = 1/2 [] ' N/A ? RSHFT |
| 331 | Y7 26 27 47 48 68 69 89 90 BKSP INS N/A ERSE RETN WRDL UP DOWN |
| 332 | Y8 28 29 49 50 70 71 91 92 DEL MODE REQ k7 WRDR k4 k1 k2 |
| 333 | Y9 30 31 51 52 72 73 93 94 k% kDIV k8 k9 k5 k6 k3 kENTR |
| 334 | Y10 32 11 53 10 74 09 07 06 kMUL [10] k- [9] k+ N/A [7] [6] |
| 335 | Y11 104 103 102 101 100 99 98 97 kN/A k. k00 k0 RGHT LEFT PAUS SPACE |
| 336 | /3Y 05 04 03 02 01 08 95 96 [5] [4] [3] [2] [1] [8] RPT ALT |
| 337 | |
| 41 | 338 | */ |
| 42 | 339 | |
| 43 | 340 | #include "victor9kb.h" |
| r242413 | r242414 | |
| 48 | 345 | // MACROS / CONSTANTS |
| 49 | 346 | //************************************************************************** |
| 50 | 347 | |
| 51 | | #define I8021_TAG "z3" |
| 348 | #define I8021_TAG "z3" |
| 52 | 349 | |
| 350 | #define LOG 0 |
| 53 | 351 | |
| 54 | 352 | |
| 353 | |
| 55 | 354 | //************************************************************************** |
| 56 | 355 | // DEVICE DEFINITIONS |
| 57 | 356 | //************************************************************************** |
| 58 | 357 | |
| 59 | | const device_type VICTOR9K_KEYBOARD = &device_creator<victor9k_keyboard_device>; |
| 358 | const device_type VICTOR9K_KEYBOARD = &device_creator<victor_9000_keyboard_t>; |
| 60 | 359 | |
| 61 | 360 | |
| 62 | 361 | //------------------------------------------------- |
| r242413 | r242414 | |
| 73 | 372 | // rom_region - device-specific ROM region |
| 74 | 373 | //------------------------------------------------- |
| 75 | 374 | |
| 76 | | const rom_entry *victor9k_keyboard_device::device_rom_region() const |
| 375 | const rom_entry *victor_9000_keyboard_t::device_rom_region() const |
| 77 | 376 | { |
| 78 | 377 | return ROM_NAME( victor9k_keyboard ); |
| 79 | 378 | } |
| r242413 | r242414 | |
| 83 | 382 | // ADDRESS_MAP( kb_io ) |
| 84 | 383 | //------------------------------------------------- |
| 85 | 384 | |
| 86 | | static ADDRESS_MAP_START( victor9k_keyboard_io, AS_IO, 8, victor9k_keyboard_device ) |
| 385 | static ADDRESS_MAP_START( victor9k_keyboard_io, AS_IO, 8, victor_9000_keyboard_t ) |
| 386 | // P0 is unconnected on pcb |
| 87 | 387 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(kb_p1_r, kb_p1_w) |
| 88 | 388 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(kb_p2_w) |
| 89 | 389 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(kb_t1_r) |
| r242413 | r242414 | |
| 105 | 405 | // machine configurations |
| 106 | 406 | //------------------------------------------------- |
| 107 | 407 | |
| 108 | | machine_config_constructor victor9k_keyboard_device::device_mconfig_additions() const |
| 408 | machine_config_constructor victor_9000_keyboard_t::device_mconfig_additions() const |
| 109 | 409 | { |
| 110 | 410 | return MACHINE_CONFIG_NAME( victor9k_keyboard ); |
| 111 | 411 | } |
| r242413 | r242414 | |
| 117 | 417 | |
| 118 | 418 | INPUT_PORTS_START( victor9k_keyboard ) |
| 119 | 419 | PORT_START("Y0") |
| 120 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 121 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 122 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 123 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 124 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 125 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 126 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 127 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 420 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CLR/HOME") PORT_CODE(KEYCODE_HOME) // S12 |
| 421 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_PLUSMINUS" "UTF8_DEGREES" "UTF8_SMALL_PI) PORT_CODE(KEYCODE_TILDE) // +-, degree, pi // S13 |
| 422 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP" SCRL "UTF8_DOWN) PORT_CODE(KEYCODE_SCRLOCK) // unicode arrows // S33 |
| 423 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("TAB/BACK") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) // S34 |
| 424 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RVS On-Off/ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) // S54 |
| 425 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LOCK/CAPSLOCK") PORT_CODE(KEYCODE_CAPSLOCK) // S55 |
| 426 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNDL On-Off") PORT_CODE(KEYCODE_PRTSCR) // need better key code // S75 |
| 427 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // S76 |
| 128 | 428 | |
| 129 | 429 | PORT_START("Y1") |
| 130 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 131 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 132 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 133 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 134 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 135 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 136 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 137 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 430 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1 ! |") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_CHAR('|') // S14 |
| 431 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2 @ <") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') PORT_CHAR('<') // S15 |
| 432 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') // S35 |
| 433 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') // S36 |
| 434 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') // S56 |
| 435 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') // S57 |
| 436 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNUSED S75") // unused // S75 |
| 437 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') // S76 |
| 138 | 438 | |
| 139 | 439 | PORT_START("Y2") |
| 140 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 141 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 142 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 143 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 144 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 145 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 146 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 147 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 440 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 # >") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('3') PORT_CHAR('3')// S16 |
| 441 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 $ \xc2\xb7") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // centered closed dot U+00B7 // S17 |
| 442 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') // S37 |
| 443 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') // S38 |
| 444 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') // S58 |
| 445 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') // S59 |
| 446 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') // S79 |
| 447 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') // S80 |
| 148 | 448 | |
| 149 | 449 | PORT_START("Y3") |
| 150 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 151 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 152 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 153 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 154 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 155 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 156 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 157 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 450 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5 % "UTF8_UP) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') // S18 |
| 451 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6 \xc2\xa2 \xc2\xac") PORT_CODE(KEYCODE_6) PORT_CHAR('6') // cent U+00A2, logic not U+00AC // S19 |
| 452 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') // S39 |
| 453 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') // S40 |
| 454 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') // S60 |
| 455 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') // S61 |
| 456 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') // S81 |
| 457 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') // S82 |
| 158 | 458 | |
| 159 | 459 | PORT_START("Y4") |
| 160 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 161 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 162 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 163 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 164 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 165 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 166 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 167 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 460 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7 & ^") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') PORT_CHAR('^') // S20 |
| 461 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8 * `") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_CHAR('`') // S21 |
| 462 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') // S41 |
| 463 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') // S42 |
| 464 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') // S62 |
| 465 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') // S63 |
| 466 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') // S83 |
| 467 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') // S84 |
| 168 | 468 | |
| 169 | 469 | PORT_START("Y5") |
| 170 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 171 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 172 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 173 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 174 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 175 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 176 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 177 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 470 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9 ( {") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_CHAR('{') // S22 |
| 471 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0 ) }") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_CHAR('}') // S23 |
| 472 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') // S43 |
| 473 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') // S44 |
| 474 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') // S64 |
| 475 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("; :") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') // S65 |
| 476 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') // S85 |
| 477 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') // S86 |
| 178 | 478 | |
| 179 | 479 | PORT_START("Y6") |
| 180 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 181 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 182 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 183 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 184 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 185 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 186 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 187 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 480 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("- _ ~") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') PORT_CHAR('~') // S24 |
| 481 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("= + \\") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') PORT_CHAR('\\') // S25 |
| 482 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xc2\xbd \xc2\xbc") PORT_CODE(KEYCODE_OPENBRACE) // unicode half fraction U+00BD / quarter fraction U+00BC // S45 |
| 483 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("[ ]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR(']') // S46 |
| 484 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("' \"") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('\"') // S66 |
| 485 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNUSED S67") // unused // S67 |
| 486 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') // S87 |
| 487 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // S88 |
| 188 | 488 | |
| 189 | 489 | PORT_START("Y7") |
| 190 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 191 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 192 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 193 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 194 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 195 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 196 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 197 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 490 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) // S26 |
| 491 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("INS") PORT_CODE(KEYCODE_INSERT) // S27 |
| 492 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNUSED S47") // unused // S47 |
| 493 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ERASE/EOL") PORT_CODE(KEYCODE_END) // should this be mapped to end or del? // S48 |
| 494 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) // S68 |
| 495 | //PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Word "UTF8_LEFT"/Volume Up \xf0\x9f\x94\x88\xe2\x96\xb4") PORT_CODE(KEYCODE_PGUP) // unicode U+2190/U+1F508 + U+25B4 // S69 |
| 496 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Word "UTF8_LEFT"/Volume Up") PORT_CODE(KEYCODE_PGUP) // unicode U+2190/U+1F508 + U+25B4 // S69 |
| 497 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP"/Brightness Up \xe2\x98\xbc\xe2\x96\xb4") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) // U+2191/U+263C + U+25B4 // S89 |
| 498 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN"/Brightness Down \xe2\x98\xbc\xe2\x96\xbe") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) // U+2193/U+263C + U+25BE // S90 |
| 198 | 499 | |
| 199 | 500 | PORT_START("Y8") |
| 200 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 201 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 202 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 203 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 204 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 205 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 206 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 207 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 501 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR(127) // S28 |
| 502 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad MODE CALC/=") PORT_CODE(KEYCODE_NUMLOCK) // S29 |
| 503 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("REQ/CAN") PORT_CODE(KEYCODE_BACKSLASH) // is this a good key for this? does sysrq make more sense? // S49 |
| 504 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD) // S50 |
| 505 | //PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Word "UTF8_RIGHT"/Volume Down \xf0\x9f\x94\x88\xe2\x96\xbe") PORT_CODE(KEYCODE_PGDN) // unicode U+2192/U+1F508 + U+25B4 // S70 |
| 506 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Word "UTF8_RIGHT"/Volume Down") PORT_CODE(KEYCODE_PGDN) // unicode U+2192/U+1F508 + U+25B4 // S70 |
| 507 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD) // S71 |
| 508 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD) // S91 |
| 509 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD) // S92 |
| 208 | 510 | |
| 209 | 511 | PORT_START("Y9") |
| 210 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 211 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 212 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 213 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 214 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 215 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 216 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 217 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 512 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad %") // find a good key for this // S30 |
| 513 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad "UTF8_DIVIDE) PORT_CODE(KEYCODE_SLASH_PAD) // unicode division sign U+00F7 // S31 |
| 514 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD) // S51 |
| 515 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD) // S52 |
| 516 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD) // S72 |
| 517 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD) // S73 |
| 518 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD) // S93 |
| 519 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad Enter") PORT_CODE(KEYCODE_ENTER_PAD) // S94 |
| 218 | 520 | |
| 219 | 521 | PORT_START("YA") |
| 220 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 221 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 222 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 223 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 224 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 225 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 226 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 227 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 522 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad "UTF8_MULTIPLY) PORT_CODE(KEYCODE_ASTERISK) // unicode multiply sign U+00D7 // S32 |
| 523 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F10 [10]") PORT_CODE(KEYCODE_F10) // S11 |
| 524 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad -") PORT_CODE(KEYCODE_MINUS_PAD) // S53 |
| 525 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F9 [9]") PORT_CODE(KEYCODE_F9) // S10 |
| 526 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad +") PORT_CODE(KEYCODE_PLUS_PAD) // S74 |
| 527 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNUSED S09") // unused // S09 |
| 528 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7 [7]") PORT_CODE(KEYCODE_F7) // S07 |
| 529 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F6 [6]") PORT_CODE(KEYCODE_F6) // S06 |
| 228 | 530 | |
| 229 | 531 | PORT_START("YB") |
| 230 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 231 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 232 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 233 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 234 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 235 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 236 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 237 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 532 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UNUSED S04") // unused // S104 |
| 533 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) // S103 |
| 534 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 00") // S102 |
| 535 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD) // S101 |
| 536 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT"/Contrast Down \xe2\x97\x90\xe2\x96\xbe") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) // U+2190/U+25D0 + U+25BE S100 |
| 537 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT"/Contrast Up \xe2\x97\x90\xe2\x96\xb4") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) // U+2190/U+25D0 + U+25B4 S99 |
| 538 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PAUSE/CONT") PORT_CODE(KEYCODE_PAUSE) // S98 |
| 539 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Spacebar") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') // S97 |
| 238 | 540 | |
| 239 | 541 | PORT_START("YC") |
| 240 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 241 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 242 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 243 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 244 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 245 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 246 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 247 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 542 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5 [5]") PORT_CODE(KEYCODE_F5) // S05 |
| 543 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F4 [4]") PORT_CODE(KEYCODE_F4) // S04 |
| 544 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F3 [3]") PORT_CODE(KEYCODE_F3) // S03 |
| 545 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2 [2]") PORT_CODE(KEYCODE_F2) // S02 |
| 546 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1 [1]") PORT_CODE(KEYCODE_F1) // S01 |
| 547 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F8 [8]") PORT_CODE(KEYCODE_F8) // S11 |
| 548 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RPT") PORT_CODE(KEYCODE_LCONTROL) // S95 |
| 549 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ALT") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_SHIFT_2) // S96 |
| 248 | 550 | INPUT_PORTS_END |
| 249 | 551 | |
| 250 | 552 | |
| r242413 | r242414 | |
| 252 | 554 | // input_ports - device-specific input ports |
| 253 | 555 | //------------------------------------------------- |
| 254 | 556 | |
| 255 | | ioport_constructor victor9k_keyboard_device::device_input_ports() const |
| 557 | ioport_constructor victor_9000_keyboard_t::device_input_ports() const |
| 256 | 558 | { |
| 257 | 559 | return INPUT_PORTS_NAME( victor9k_keyboard ); |
| 258 | 560 | } |
| r242413 | r242414 | |
| 264 | 566 | //************************************************************************** |
| 265 | 567 | |
| 266 | 568 | //------------------------------------------------- |
| 267 | | // victor9k_keyboard_device - constructor |
| 569 | // victor_9000_keyboard_t - constructor |
| 268 | 570 | //------------------------------------------------- |
| 269 | 571 | |
| 270 | | victor9k_keyboard_device::victor9k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 572 | victor_9000_keyboard_t::victor_9000_keyboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 271 | 573 | device_t(mconfig, VICTOR9K_KEYBOARD, "Victor 9000 Keyboard", tag, owner, clock, "victor9kb", __FILE__), |
| 272 | 574 | m_maincpu(*this, I8021_TAG), |
| 273 | 575 | m_y0(*this, "Y0"), |
| r242413 | r242414 | |
| 283 | 585 | m_ya(*this, "YA"), |
| 284 | 586 | m_yb(*this, "YB"), |
| 285 | 587 | m_yc(*this, "YC"), |
| 286 | | m_kbrdy_handler(*this), |
| 287 | | m_kbdata_handler(*this), |
| 588 | m_kbrdy_cb(*this), |
| 589 | m_kbdata_cb(*this), |
| 288 | 590 | m_y(0), |
| 289 | | m_kbrdy(1), |
| 290 | | m_kbdata(1), |
| 591 | m_kbrdy(-1), |
| 592 | m_kbdata(-1), |
| 291 | 593 | m_kback(1) |
| 292 | 594 | { |
| 293 | 595 | } |
| r242413 | r242414 | |
| 297 | 599 | // device_start - device-specific startup |
| 298 | 600 | //------------------------------------------------- |
| 299 | 601 | |
| 300 | | void victor9k_keyboard_device::device_start() |
| 602 | void victor_9000_keyboard_t::device_start() |
| 301 | 603 | { |
| 302 | 604 | // resolve callbacks |
| 303 | | m_kbrdy_handler.resolve_safe(); |
| 304 | | m_kbdata_handler.resolve_safe(); |
| 605 | m_kbrdy_cb.resolve_safe(); |
| 606 | m_kbdata_cb.resolve_safe(); |
| 305 | 607 | |
| 306 | 608 | // state saving |
| 609 | save_item(NAME(m_p1)); |
| 307 | 610 | save_item(NAME(m_y)); |
| 611 | save_item(NAME(m_stb)); |
| 612 | save_item(NAME(m_y12)); |
| 308 | 613 | save_item(NAME(m_kbrdy)); |
| 309 | 614 | save_item(NAME(m_kbdata)); |
| 310 | 615 | save_item(NAME(m_kback)); |
| r242413 | r242414 | |
| 312 | 617 | |
| 313 | 618 | |
| 314 | 619 | //------------------------------------------------- |
| 315 | | // device_reset - device-specific reset |
| 620 | // kback_w - |
| 316 | 621 | //------------------------------------------------- |
| 317 | 622 | |
| 318 | | void victor9k_keyboard_device::device_reset() |
| 623 | WRITE_LINE_MEMBER( victor_9000_keyboard_t::kback_w ) |
| 319 | 624 | { |
| 320 | | } |
| 625 | if (LOG) logerror("KBACK %u\n", state); |
| 321 | 626 | |
| 322 | | |
| 323 | | //------------------------------------------------- |
| 324 | | // kback_w - |
| 325 | | //------------------------------------------------- |
| 326 | | |
| 327 | | WRITE_LINE_MEMBER( victor9k_keyboard_device::kback_w ) |
| 328 | | { |
| 329 | | //logerror("KBACK %u\n", state); |
| 330 | | m_kback = state; |
| 627 | m_kback = !state; |
| 331 | 628 | } |
| 332 | 629 | |
| 333 | 630 | |
| r242413 | r242414 | |
| 335 | 632 | // kb_p1_r - |
| 336 | 633 | //------------------------------------------------- |
| 337 | 634 | |
| 338 | | READ8_MEMBER( victor9k_keyboard_device::kb_p1_r ) |
| 635 | READ8_MEMBER( victor_9000_keyboard_t::kb_p1_r ) |
| 339 | 636 | { |
| 340 | 637 | UINT8 data = 0xff; |
| 341 | 638 | |
| r242413 | r242414 | |
| 353 | 650 | case 9: data &= m_y9->read(); break; |
| 354 | 651 | case 0xa: data &= m_ya->read(); break; |
| 355 | 652 | case 0xb: data &= m_yb->read(); break; |
| 356 | | case 0xc: data &= m_yc->read(); break; |
| 357 | 653 | } |
| 358 | 654 | |
| 655 | if (!m_y12) |
| 656 | { |
| 657 | data &= m_yc->read(); |
| 658 | } |
| 659 | |
| 359 | 660 | return data; |
| 360 | 661 | } |
| 361 | 662 | |
| r242413 | r242414 | |
| 364 | 665 | // kb_p1_w - |
| 365 | 666 | //------------------------------------------------- |
| 366 | 667 | |
| 367 | | WRITE8_MEMBER( victor9k_keyboard_device::kb_p1_w ) |
| 668 | WRITE8_MEMBER( victor_9000_keyboard_t::kb_p1_w ) |
| 368 | 669 | { |
| 369 | | if ((data & 0xf0) == 0x20) |
| 370 | | { |
| 371 | | m_y = data & 0x0f; |
| 372 | | } |
| 373 | | |
| 374 | | //logerror("P1 %02x\n", data); |
| 670 | m_p1 = data; |
| 375 | 671 | } |
| 376 | 672 | |
| 377 | 673 | |
| r242413 | r242414 | |
| 379 | 675 | // kb_p2_w - |
| 380 | 676 | //------------------------------------------------- |
| 381 | 677 | |
| 382 | | WRITE8_MEMBER( victor9k_keyboard_device::kb_p2_w ) |
| 678 | WRITE8_MEMBER( victor_9000_keyboard_t::kb_p2_w ) |
| 383 | 679 | { |
| 384 | 680 | /* |
| 385 | 681 | |
| 386 | 682 | bit description |
| 387 | 683 | |
| 388 | | P20 ? |
| 684 | P20 22-908 CLR, 22-950 STB |
| 389 | 685 | P21 KBRDY |
| 390 | | P22 ? |
| 686 | P22 Y12 |
| 391 | 687 | P23 KBDATA |
| 392 | 688 | |
| 393 | 689 | */ |
| 394 | 690 | |
| 395 | | int kbrdy = BIT(data, 1); |
| 396 | | |
| 397 | | if (m_kbrdy != kbrdy) |
| 691 | // falling (?edge or level?), latch keyboard rows 0-11 |
| 692 | if (!BIT(data, 0)) |
| 398 | 693 | { |
| 399 | | m_kbrdy = kbrdy; |
| 400 | | m_kbrdy_handler(m_kbrdy); |
| 694 | m_y = m_p1 & 0x0f; |
| 401 | 695 | } |
| 402 | 696 | |
| 403 | | int kbdata = BIT(data, 3); |
| 697 | // keyboard row 12 |
| 698 | m_y12 = BIT(data, 2); |
| 404 | 699 | |
| 405 | | if (m_kbdata != kbdata) |
| 406 | | { |
| 407 | | m_kbdata = kbdata; |
| 408 | | m_kbdata_handler(m_kbdata); |
| 409 | | } |
| 700 | // keyboard ready |
| 701 | m_kbrdy_cb(BIT(data, 1)); |
| 410 | 702 | |
| 411 | | //logerror("P2 %02x\n", data); |
| 703 | // keyboard data |
| 704 | m_kbdata_cb(BIT(data, 3)); |
| 412 | 705 | } |
| 413 | 706 | |
| 414 | 707 | |
| r242413 | r242414 | |
| 416 | 709 | // kb_t1_r - |
| 417 | 710 | //------------------------------------------------- |
| 418 | 711 | |
| 419 | | READ8_MEMBER( victor9k_keyboard_device::kb_t1_r ) |
| 712 | READ8_MEMBER( victor_9000_keyboard_t::kb_t1_r ) |
| 420 | 713 | { |
| 421 | 714 | return m_kback; |
| 422 | 715 | } |