Skip to content

Pinta's Quest interrupt quirk #17

@RikkiGibson

Description

@RikkiGibson

PQ does a lot of stuff like this:

; render a frame..
set1 ie,7 ; master interrupt enable
set1 pcon,0 ; enable halt mode

The issue is that when you turn on ie,7, you might be tempted to handle a base timer interrupt straight away. But that will cause you to run at half speed. The reason is that when ie,7 is turned on, PQ is already late, the source flag for the interrupt is already set.

That means when you reach halt mode, the timer interrupt was already handled, and won't serve to exit halt mode, until another frame or whatever goes by.

The solution that worked for me, was to just have a hacky flag which was like: we just enabled interrupts, wait for another instruction to go by before we actually service any.

Someday we will understand the VMU's interrupts well enough that we can all get rid of our hacky flags, or we can just start calling them normal flags and say the hardware is what's hacky.

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