There's a better alternative, agranlund created a kind of virtual machine emulator. So it uses the real 68k CPU, no emulation needed. It runs on Mint I think.
Steve wrote: ↑Wed Nov 15, 2023 1:01 pm
There's a better alternative, agranlund created a kind of virtual machine emulator. So it uses the real 68k CPU, no emulation needed. It runs on Mint I think.
I was mulling the question over (and how daft it was ) when I was making lunch and something along those lines occurred to me. I've probably read about that before but the significance of it didn't hit home at the time.
Technically with a 68030 and above with an MMU you could write a hypervisor giving the virtual machine a virtual address space and running privileged code sections in a CPU instruction simulator, catching any access to hardware etc.
In that way all non-privileged code would run at full speed, only the supervisor mode instructions would be slow.
You could even simulate the 68000 exception stack for the virtual machine/process.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
@stephen_usher: yeah, that's like the imaginary holy grail of emulation on our small platform. It sounds great in theory but in practice it would be way less usable than you'd expect. Many games, demos basically switch to supervisor, access hardware directly (even for no or little reason) and after that the can of worms has been opened: sure, you could fake it, pretend that it's still user code and catch exceptions and blah blah, the point is, you wont get anywhere near a decent / smooth experience even on CT60.
What I think is a better way is to create a JIT compiler for given emulators: that way the CPU emulation burden nearly disappears and one can focus on optimising the hardware emulation, ideally using some hardware tricks the host provides.