From 174b48a14a41ae5ef563b0ddfdcc65d3ee1c66ee Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 12 Apr 2022 08:57:40 -0400 Subject: [PATCH] Populate lines 9 and D. --- InstructionSets/68k/Decoder.cpp | 58 ++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/InstructionSets/68k/Decoder.cpp b/InstructionSets/68k/Decoder.cpp index 61bae1455..d9eb8a7df 100644 --- a/InstructionSets/68k/Decoder.cpp +++ b/InstructionSets/68k/Decoder.cpp @@ -382,7 +382,32 @@ Preinstruction Predecoder::decode8(uint16_t instruction) { } Preinstruction Predecoder::decode9(uint16_t instruction) { - (void)instruction; + switch(instruction & 0x0c0) { + // 4-174 (p278) + case 0x00: return decode(instruction); + case 0x40: return decode(instruction); + case 0x80: return decode(instruction); + + default: break; + } + + switch(instruction & 0x1c0) { + // 4-177 (p281) + case 0x0c0: return decode(instruction); + case 0x1c0: return decode(instruction); + + default: break; + } + + switch(instruction & 0x1f0) { + // 4-184 (p288) + case 0x100: return decode(instruction); + case 0x140: return decode(instruction); + case 0x180: return decode(instruction); + + default: break; + } + return Preinstruction(); } @@ -391,16 +416,16 @@ Preinstruction Predecoder::decodeA(uint16_t) { } Preinstruction Predecoder::decodeB(uint16_t instruction) { - // 4-100 (p204) switch(instruction & 0x0c0) { + // 4-100 (p204) case 0x000: return decode(instruction); case 0x040: return decode(instruction); case 0x080: return decode(instruction); default: break; } - // 4-75 (p179) switch(instruction & 0x1c0) { + // 4-75 (p179) case 0x000: return decode(instruction); case 0x040: return decode(instruction); case 0x080: return decode(instruction); @@ -444,7 +469,32 @@ Preinstruction Predecoder::decodeC(uint16_t instruction) { } Preinstruction Predecoder::decodeD(uint16_t instruction) { - (void)instruction; + switch(instruction & 0x0c0) { + // 4-4 (p108) + case 0x00: return decode(instruction); + case 0x40: return decode(instruction); + case 0x80: return decode(instruction); + + default: break; + } + + switch(instruction & 0x1c0) { + // 4-7 (p111) + case 0x0c0: return decode(instruction); + case 0x1c0: return decode(instruction); + + default: break; + } + + switch(instruction & 0x1f0) { + // 4-14 (p118) + case 0x100: return decode(instruction); + case 0x140: return decode(instruction); + case 0x180: return decode(instruction); + + default: break; + } + return Preinstruction(); }