Amazing. This is nostalgia heroin for me.
How far does the HAL go? Screen 12 and 13, and writing directly to VRAM? WAIT for vsync? Call absolute for mouse usage?
Amazing. This is nostalgia heroin for me.
How far does the HAL go? Screen 12 and 13, and writing directly to VRAM? WAIT for vsync? Call absolute for mouse usage?
Thanks! I went so far with it that I was honestly questioning my own sanity.
The HAL has a virtualized CPU, and I spent more time than I’d care to admit precisely timing instructions on various period-accurate hardware (386SX, 486DX). I even tuned it to the point where programs that take advantage of it actually run faster on the 486 because of the built‑in math coprocessor.
> Writing directly to VRAM? WAIT for vsync?
All screen modes are supported including the ability to draw to hidden pages. It’s got a fully emulated VGA hardware layer and even a synthetic VGA beam clock, so you can do tricks like `WAIT &H3DA, 8, 8` for vertical retrace to minimize flicker.
> Call absolute for mouse usage?
Yup! Int 33h is fully supported, we basically use a virtual TSR driver which is pointed to by the interrupt vector table. I actually tested it with an old pixel art editor I made in the 90s!
PEEK/POKE and much of the BIOS are fully simulated, so you can use more advanced QuickBasic 4.5 features like calling interrupts (including silly stuff like rebooting the computer via int 19h).
There's a ton more (including a Hayes compatible modem plugged into COM1) as well.
I basically dug out a stack of my old PC books from the late ’80s and early ’90s, and they’ve been my bibles for the past several months (Undocumented DOS, The Programmer’s PC Sourcebook, etc.).
It’s about 99% done at this point. I’m hoping to do a Show HN in the next couple of weeks.
Wow, I didn’t expect this kind of reply at all. What a labor of love. Can’t wait to try it out! What made you decide to emulate things at this level instead of using a more off the shelf hardware stack?
So I wanted to build more than just a simple online QuickBasic simulator - I've seen a few of them but they all kind of fall apart at the last mile.
You really can't create a QuickBasic interpreter with any expectation of accuracy unless you also flesh out the corresponding hardware that would have accompanied it back in the day.
What I’m really aiming for is to recreate the world we grew up with as kids in the late ’80s and ’90s. I want to tap into that feeling of discovering QuickBASIC on a computer for the first time and realizing you could bring your own creations to life.
For me, and I bet a lot of kids back then, QuickBASIC was the closest thing to sorcery: you could conjure whatever was in your imagination and watch it traced out pixel by pixel on your 14-inch VGA monitor.
This comment is peak HN!
In depth, thoughtful comments about someone deeply passionate about technology were the reason why HN became the place on the web for hackers.
Thanks for keeping the spirit alive!