First post, by superfury
I'm trying to optimize my x86EMU emulator to reach at least 386 speed (7800 Dosbox-style cycles) with the pure interpretation core it uses(without giving up accuracy on the currently emulated hardware). So far I managed to squeeze out 20% of it's speed (So it would be equal to a 386 with only a 6.6MHz clock crystal roughly, instead of the usual 33MHz according to the Dosbox wiki). Still need to implement the missing 286&386 instructions and task switching to get that one fully running though. The instructions themselves won't be that much of a problem using the current 80186 core as a base (it's a part of the 286/386 CPU instruction set after all, and it already supports the 32-bit MMU and ModR/M addressing&protected mode). The task switching is still a bit difficult to implement atm(concerning all the security checks required during the task switch itself, including triple fault&double fault handling). Also the 32-bit interrupt handling still needs to be implemented.
I am wondering though: how did the Dosbox creators make Dosbox so fast, even using a simple interpreting core? Any stuff to watch out for when optimizing it to become fast enough?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io