logoalt Hacker News

vunderbayesterday at 6:07 PM12 repliesview on HN

Nice job. The sound effects are a bit too advanced because early IBM computers shipped with pretty simple, magnetically driven dynamic speakers.

On a related note, I’ve actually spent the last four months working on a 100% faithful adaptation of both QBasic and QuickBasic 4.5 that runs entirely in the browser on a virtual CPU and hardware abstraction layer. It’s a love letter to everyone who learned to program on Microsoft’s BASIC interpreters in the ’80s and early ’90s.

The best compliment I’ve received so far is from friends who grew up in the same era I did: when I fullscreen the browser, a few of them assumed it was a virtual machine running the real thing.

A QBasic port of the original BASIC-based DONKEY.BAS was one of the first programs I got running in it:

https://mordenstar.com/share/qbasic-core-demos


Replies

codebjetoday at 2:09 AM

You used to be able to do surprising things with those old speakers using a timer interrupt: on an IBM XT it was possible to get 8kHz quality out of it, enough to make 4-channel MOD playback sound about as good as hearing it over a phone.

But your more typical use case was to play a single tone for some significant fraction of a second.

show 7 replies
daharttoday at 2:23 PM

> early IBM computers shipped with pretty simple, magnetically driven dynamic speakers

Yes the PC & donkey.bas were monophonic design, but the PCjr shipped with 3-channel polyphonic sound plus a noise generator. It might have been capable of doing the sounds in this port of donkey that took “some liberties”. ;)

I remember some sound demos on the PC that emulated polyphonic sound by fast/audible switching between notes in a chord. Hey it seemed cool at the time. :P I just looked and couldn’t find any quickly enough but bumped into examples of even better true polyphony on the PC achieved by assembly hacking.

show 1 reply
d3Xt3ryesterday at 9:07 PM

And for the slightly younger folks who have more memories of Visual Basic than QBasic, check out GAMBAS: https://gambaswiki.org/website/en/main.html

show 1 reply
HeyLaughingBoyyesterday at 6:38 PM

At my first job, our entire order-entry and inventory management system was written in QBASIC. I wish I had the source to try it out with this.

I know someone who might, if we could figure out how to get it off a DOS 5.25" floppy!

show 1 reply
mycalltoday at 1:26 PM

I once heard a digitized version of "Daisy Bell" (DAISY.COM) which sings through IBM PC speaker although of poor bitrate.

londons_exploretoday at 2:09 PM

It runs fairly well in dosbox in a browser though right? Why port directly?

show 1 reply
shakowtoday at 9:56 AM

How comes the modem panel is not “shader-ized” (scanlines + distortion)?

show 1 reply
physiclestoday at 3:16 AM

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?

show 1 reply
mysterydipyesterday at 7:01 PM

This is fantastic! As one of those kids who spent the early 90s in QBasic, thank you!

mosburgeryesterday at 7:24 PM

aw neat I'd love to try doing this for its predecessor GWBASIC (my first programming language on the Tandy 1000EX)

show 1 reply
NuclearPMyesterday at 10:35 PM

Do non-magnetically driven speakers exist?

show 1 reply
alana314yesterday at 10:52 PM

Nibbles!