diff --git a/InstructionSets/68k/Decoder.cpp b/InstructionSets/68k/Decoder.cpp index d9eb8a7df..d2f97d635 100644 --- a/InstructionSets/68k/Decoder.cpp +++ b/InstructionSets/68k/Decoder.cpp @@ -499,7 +499,63 @@ Preinstruction Predecoder::decodeD(uint16_t instruction) { } Preinstruction Predecoder::decodeE(uint16_t instruction) { - (void)instruction; + switch(instruction & 0x1d8) { + // 4-22 (p126) + case 0x000: return decode(instruction); + case 0x040: return decode(instruction); + case 0x080: return decode(instruction); + + // 4-113 (p217) + case 0x008: return decode(instruction); + case 0x048: return decode(instruction); + case 0x088: return decode(instruction); + + // 4-163 (p267) + case 0x010: return decode(instruction); + case 0x050: return decode(instruction); + case 0x090: return decode(instruction); + + // 4-160 (p264) + case 0x018: return decode(instruction); + case 0x058: return decode(instruction); + case 0x098: return decode(instruction); + + // 4-22 (p126) + case 0x100: return decode(instruction); + case 0x140: return decode(instruction); + case 0x180: return decode(instruction); + + // 4-113 (p217) + case 0x108: return decode(instruction); + case 0x148: return decode(instruction); + case 0x188: return decode(instruction); + + // 4-163 (p267) + case 0x110: return decode(instruction); + case 0x150: return decode(instruction); + case 0x190: return decode(instruction); + + // 4-160 (p264) + case 0x118: return decode(instruction); + case 0x158: return decode(instruction); + case 0x198: return decode(instruction); + + default: break; + } + + switch(instruction & 0xfc0) { + case 0x0c0: return decode(instruction); // 4-22 (p126) + case 0x1c0: return decode(instruction); // 4-22 (p126) + case 0x2c0: return decode(instruction); // 4-113 (p217) + case 0x3c0: return decode(instruction); // 4-113 (p217) + case 0x4c0: return decode(instruction); // 4-163 (p267) + case 0x5c0: return decode(instruction); // 4-163 (p267) + case 0x6c0: return decode(instruction); // 4-160 (p264) + case 0x7c0: return decode(instruction); // 4-160 (p264) + + default: break; + } + return Preinstruction(); }