Skip to content

Misemulation of RTI #10

Description

@EtchedPixels

The code as implemented looks at the current E flag in order to decide whether it is doing a fast or slow interrupt return. The processor pops cc then looks at E to decide what the rest of the frame is.

So it should be something like

        /* rti */
        case 0x3b:
                reg_cc = pull8(sp);
                cycles += 1;
                if (get_cc (FLAG_E)) {
                        inst_pul (0xfe, &reg_s, &reg_u, &cycles);
                } else {
                        inst_pul (0x80, &reg_s, &reg_u, &cycles);
                }
                cycles += 3;
                break;

Found because I've been using the e6809 code for another project and hit a case where it mattered.

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