dirkwhoffmann / Moira

A Motorola 68000 emulator written in C++
https://dirkwhoffmann.github.io/Moira
Other
106 stars 13 forks source link

Dasm Output/alignment for Illegal Instruction in Moira/MoiraDasm_cpp.h #17

Closed elmerucr closed 1 year ago

elmerucr commented 1 year ago

Suggestion to change line 104: str << "dc.w " << UInt16{op} << "; ILLEGAL";

Into: str << "dc.w " << tab << UInt16{op} << "; ILLEGAL";

This makes disassembler output more aligned.

dirkwhoffmann commented 1 year ago

Agreed. I'll change

        case DASM_GNU:
        case DASM_GNU_MIT:

            str << ".short " << Int{op};
            break;

        default:

            str << "dc.w " << UInt16{op} << "; ILLEGAL";
            break;

into

        case DASM_GNU:
        case DASM_GNU_MIT:

            str << ".short " << Int{op};
            break;

        case DASM_MUSASHI:

            str << "dc.w " << UInt16{op} << "; ILLEGAL";
            break;

        default:

            str << "dc.w " << tab << UInt16{op} << "; ILLEGAL";
            break;

The change will take effect for DASM styles DASM_MOIRA_MOT and DASM_MOIRA_MIT. I need to keep the Musashi output as it was, because the unit tester does a one-to-one comparison with the Musashi disassembler output.

If you have other disassembler suggestions, please let me know. The two Moira DASM styles can be changed freely.

elmerucr commented 1 year ago

That's great, thank you!

dirkwhoffmann commented 1 year ago

The change is part of the latest checkin.