Closed kbeckmann closed 7 months ago
See https://github.com/DragonMinded/libdragon/pull/291 for interrupt handling
Some good info and ideas from Rasky:
the deadlock detection is important because CART interrupts are level triggered and must be ack'd on the peripherals, so if you don't install the right handlers and somehow handle multiplex interrupts correctly, you might end up entering an infinite interrupt loop so the deadlock detection notifies that with a nice error screen rather than freezing the console if you add interrupt support to pico64 make sure there is a way for the software to check whether pico64 actually triggered it or not, and then acknowledge it to turn it off i would also have a separate enable bit among pico64 registers the idea is that a pico64-supporting library would be able to:
- Register a pico64 cart interrupt handler
- Enable the interrupt in pico64 via its own registers
- Enable the interrupt in MI register (but notice: others might already have done this!) the pico64 interrupt handler would be called for each cart interrupt, but would need to check whether pico64 generated it, and only process it (+ ack it) if it's coming from a pico64
Can we use this to run arbitrary code from closed source ROMs without patching?
What do we need to patch in order to jump to our memory area?
Can we extract screenshots from the frame buffer directly?
Possible to debug?
Read/write memory, and continue?