Skip to content

Emulator's BTI pattern does not match spec. #16

@ZaneDubya

Description

@ZaneDubya

private void BitPatternBTI(ushort operand, out ushort value, out RegGeneral destination) {

Suggested fix:

    private void BitPatternBTI(ushort operand, out ushort value, out RegGeneral destination) {
        destination = (RegGeneral)((operand & 0xE000) >> 13); // bits DEF
        RegGeneral source = (RegGeneral)((operand & 0x0F00) >> 8);
        bool asRegister = (operand & 0x1000) != 0;
        value = asRegister ?
            (ushort)(R[(int)source] & 0x000F) :
            (ushort)((operand & 0x1E00) >> 9);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions