MiSTer and polling

Discussion of developmental aspects of the MiSTer Project.
foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

MiSTer and polling

Unread post 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?
zakk4223
Posts: 289
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 120 times

Re: MiSTer and polling

Unread post 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...)
Bas
Top Contributor
Posts: 623
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 80 times
Been thanked: 324 times

Re: MiSTer and polling

Unread post 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.
foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

Re: MiSTer and polling

Unread post 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!
Bas
Top Contributor
Posts: 623
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 80 times
Been thanked: 324 times

Re: MiSTer and polling

Unread post 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.
Post Reply