Sounds like something isn't shutting down cleanly, I'll investigate.Vanfanel wrote: ↑Thu Jan 24, 2019 8:15 pm @Jon: I have discovered another problem between games. If you run "Simon the Sorcerer" and then exit and try to run "Alone in the Dark", it will fail.
Another game that has problems on quit is "Magnetoids":
-If you quit via CTRL+SHIFT+F12 it goes to a black screen (system is still running).
-If you quit via CTRL+ESC, it quits well, but trying to run it again, it fails.
As ADFFS is hypervising the game, it pretty much knows everything it's doing and simply shuts down the hypervising layer to terminate it. It's not a true Hypervisor in the sense that it doesn't paravirtualize the CPU or MMU yet, so you can't run a full OS under it, but it's near identical to a type 1 Hypervisor in most other respects, such as the code running natively on the CPU and minimal interaction.
If a game is cleanly quit via CTRL-ESC or its equivalent, running another game should cause no issues assuming the game closed any open files. Even if it fails to release IRQ's ADFFS will shut them down when the JIT shuts down.
Forcibly terminating a game via CTRL-SHIFT-F12 will cause ADFFS to terminate all IRQ code, voices, channel handlers, sequencers etc that are running in AppSpace. It doesn't currently close open files and I can't remember off the top of my head what it does with 26bit Modules, they're possibly left alive and will be RMKilled when the JIT shuts down.
ADFFS certainly doesn't do anything hairy, it's all done through legal OS calls and it doesn't modify any parts of the OS. The self-modifying code support I suppose you could say is a bit dodgy, as it changes the write permissions on AppSpace pages which is something the OS doesnt know about, but I believe it's something that's going to be added as currently RISC OS corrupts page flags.
On a seperate issue...Whilst testing the Pi3 blanking issue yesterday I noticed RISCOS was down clocking the CPU when it was being heavily used by background non-Wimp tasks, key presses at the commandline had a noticeable delay on them when ADFFS was emulating a legacy mode. As a consequence, I'm going to modify the blitter to force the CPU speed high around itself and halt the CPU when the game is waiting.