CE-Programming / CEmu

Third-party TI-84 Plus CE / TI-83 Premium CE emulator, focused on developer features
https://ce-programming.github.io/CEmu/
Other
1.07k stars 76 forks source link

CEmu SDL incorrectly uses multiple cores #382

Open TheLastMillennial opened 3 years ago

TheLastMillennial commented 3 years ago

What's wrong, and with what software version?

Operating System: Raspbian GNU/Linux 10 (buster) CEmu version: CEmu SDL v1.3 Describe your issue:
Apparently CEmu SDL is not supposed to use multiple cores at all. However, on my Raspberry Pi 3B (v1.2), when I run CEmu then check htop, cemu-sdl has five children and utilizes between 200% and 320% of my CPU (the load is spread out roughly evenly across all four cores). Strangely, the last child only uses RAM, it never uses any CPU resources.

Oddly, after I test the RAM through the [mode]>[alpha]>[s] self-test menu, CEmu suddenly switches to only using a single core which causes emulation speed to tank to ~30%. (a RAM reset through the memory management doesn't trigger this behavior). The calculator's APD also gets significantly shortened to a mere 25 seconds before the calculator turns off on its own.

When I run CEmu on my Raspberry Pi Zero W (which only has one core), CEmu only has one child and emulates at about 25% speed.

EDIT: When I run the RAM self test on the Raspberry Pi Zero W, the performance gets even worse. Emulation speed dips to ~7% and wont go any faster.

Any logs, error output, screenshot, other comments...?

htop on Raspberry Pi 3B before RAM reset htop on Raspberry Pi 3B after RAM reset

jacobly0 commented 3 years ago

The SDL version of CEmu itself doesn't use multiple threads, but SDL definitely does.