DERP icon indicating copy to clipboard operation
DERP copied to clipboard

Synchronisation

Open Daft-Freak opened this issue 2 years ago • 0 comments

DERP has mostly inherited the "lazy updates" from DaftBoy(Advance) with the addition of the handling of multiple clocks. This worked fine there with one "master" CPU, two peripherals that don't interact with each other and DMA that doesn't run at the same time as the CPU.

The same does not apply to the RP2040. Two CPUs that should run in parallel... and then DMA, which is itself two bus masters. Plus most of the peripherals need to sync on IO.

Currently there's enough sync for many things to work but occasionally something will get updated in the wrong order and cause an uh "time travel" problem. Another problem is the possibility for too much recursion when peripherals try to update each other. Need to come up with some plan to improve this (without syncing too much for perf reasons)... some kind of scheduling or something? :shrug:

Daft-Freak avatar Sep 17 '23 16:09 Daft-Freak