Page 1 of 1

MiSTer and polling

Posted: Fri Apr 30, 2021 9:19 am
by foft
I think it'd be valuable as we start to use more of the arm CPU to stop MiSTer doing all this polling and sitting at 100% CPU.

For Minimig ideally I'd like one CPU for 68K and one CPU for powerpc (or arm direct).

It should be fine to run as real-time priority and use events to wake it up.

Has anyone started looking at this?

Re: MiSTer and polling

Posted: Fri Apr 30, 2021 9:47 am
by zakk4223
Based on all the digging around and modifications I've done in that source code, it seems like it would be a pretty large undertaking. That main loop handles a lot more than just input, it's responsible for things like polling some of the CD-based cores for cd/ide commands and responding to them, dealing with all the various 'timers' (UI "animations", cd seek time emulation, autofire etc). The fact there is a fairly tight main loop is deeply embedded in almost every aspect of that code.

Obviously Sorg may have is own ideas here.

(Also I would be sad because I have custom autofire code that relies on fast polling the scaler frame counter...)

Re: MiSTer and polling

Posted: Fri Apr 30, 2021 10:49 am
by Bas
Started looking, yes.. but no more than that. The MiSTer binary could do with some refactoring or at the very least documentation because it's hardly obvious what's going on and especially: why. Sorgelig probably knows it like the back of his hand, but to me it feels like quite a minefield to make even small changes.

Re: MiSTer and polling

Posted: Fri Apr 30, 2021 6:13 pm
by foft
Perhaps we can make a special 'MiSTer light' that works for the Amiga then to start with, or something like that hmmm. Anyway got other issues to tackle first just trying to think ahead!

Re: MiSTer and polling

Posted: Sun May 02, 2021 12:25 pm
by Bas
The MiSTer binary evolved from Minimig. I'm now looking at a rewrite in Rust, just to teach myself low-level Rust programming.