I made a strategic decision for daveemu: Intel 386 support is now being brought into pre-alpha earlier than originally planned.
One of the main reasons is that, under some important aspects, the 286 core has become reasonably stable already. There are still exceptions and unfinished corners, of course, but those can be handled later. The bigger issue is performance. My current 286 implementation is a classic interpreted core, and that naturally comes with hard limits.
The new 386 core is different by design. From the very beginning it is being built as a hybrid core: interpreted execution for cold paths, and a dynamic core for hot paths. That approach should give me significantly better performance and much more room to grow.
This change also happened alongside a massive refactor of the entire project. Over the course of a single week I pushed through roughly 100,000 lines of code churn. Some parts were deleted, some were added, and a lot was reorganized. The codebase is now much better structured and far more prepared for newer CPU core implementations.
Because of that groundwork, the 386 implementation is already genuinely advanced. Real mode Windows 3.0 is now running on the 386 core.
Naturally, I then hit the next wall: 386 protected mode. It differs from 286 protected mode in important ways, and that currently shows up as a regression on Windows 3.1. Right now the protected-mode boot ends in a fatal error. We will get there, though. I promise.
There is also one practical side effect of working this way: I am currently developing on a separate i386 branch, which is why new nightly builds are not appearing from master. This functionality is still heavily unstable and not ready to be merged yet.
Below is a small set of project statistics as of today.
C++ and asm for the emulator, including the 386 core:
| Metric | Value |
|---|---|
| Blank lines | 23,142 |
| Comment lines | 3,602 |
| Code lines | 170,564 |
| Total size | 7,012.77 KB |
Out of that, 2,268 lines are custom-made 286 and 386 BIOS assembly written specifically for Daveemu.
Including Python scripts for reproducing Windows 3.0 / 3.1 crashes, protected-mode reproduction and debugging, end-to-end CI automation for DOS 3.0 / 5.0 and Windows 3.0 / 3.1 installations, plus several useful tools:
| Metric | Value |
|---|---|
| Blank lines | 36,592 |
| Comment lines | 5,202 |
| Code lines | 251,811 |
| Total size | 10,285.54 KB |
Repository-wide statistics:
| Metric | Value |
|---|---|
| Commits total | 1,687 |
| Additions total | 780,744 |
| Removed total | 151,883 |
As you can see, the project has been evolving aggressively, and I have not been afraid to do large refactors when they were necessary to unlock future improvements.
More to come soon.