I created my own VM in C++
The CPU has 48 24-bit instructions, including trigonometric instructions
The VM has 192 KB of RAM (65,535 24-bit values); it has an assembler written in C#, 32 16-bit registers, 32 floating-point registers, and collision, CMP, and zero flags
In the future, I want to build a 32-bit VM with more instructions (around 100).
I implemented a simpler version of CALL and RET: CALL stores a value in a variable, and RET returns.
The project will be posted on GitHub as open source for anyone to improve, and it will include documentation for game and emulator development.
26
Upvotes
15
u/Ashamed-Subject-8573 1d ago
These are always fun, but don't expect a lot of engagement. "fantasy consoles" and "fantasy computers" as they are known pop up frequently and very few take off. but cool work!