Live data from Hacker News

Donkey.bas is 45 Years Old – 131 line of Glory

donkeybas.com

91–100 of 153 posts

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#91
post #7

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 Mic…

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?

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#92
post #7

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 Mic…

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.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#93
post #19
post #12

Brings back memories of GORILLA.BAS! https://en.wikipedia.org/wiki/Gorillas_(video_game)

For those who don't know why GORILLA.BAS is so cool... Back in the day, computers were expensive and games weren't readily available. Sometimes a parent would buy a computer for word processing or spreadsheets or take kids to the office which also had business computers. Children were curious about the computers but there wasn't really anything fun to do with them besides banging on the keyboard... ...Until you found…

It sounds kind of crazy now but we genuinely used to buy computer magazines that had basic code printed in them, to try the game you would type the basic into a file, save and then run it.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#94

Earlier quoted context omitted.

Just as importantly - it was an all‑in‑one. I think a lot of people tend to forget that there were already plenty of earlier BASIC dialects (GW‑BASIC, Apple II BASIC, C64 BASIC, etc). However QBASIC was likely the first freely available, all‑in‑one "batteries included" environment that came bundled with MS‑DOS 5 with a relatively friendly IDE that had built‑in help for every single command. GORILLA.BAS and NIBBLES.BA…

Basic and Qbasic represent a part of computer culture that has been lost a little bit. It was the idea of making computers programmable to almost anyone without having to have a deep knowledge of how the system works. I'm not saying we should go back to BASIC but that spirit of easy to build has been lost a little. Nowadays you need to pull in like 40 dependencies before things can get really moving. Yeah it is OK af…

100%. I actually loved Flash for what it was. I get that it could definitely become convoluted especially when you were jumping between various keyframes, some of the control flows could get really messy.

But just like QBASIC, it was a “batteries included.” environment. That’s what made it so compelling.

QBASIC was the same way. It's a literal siren song for inquisitive kids to just experiment, because everything is right there. Like you said, there’s no importing libraries. It’s a completely self-contained sandbox of possibilities.

If you have a question, you just slap that F1 on your buckler-spring mechanical keyboard and boom there’s documentation/examples.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#95

A greyscale photo of a donkey appears if you lose badly enough. Surely that wasn't possible in basic with 16 colors?? EDIT: That must be the easter egg mentioned in the repo.

A dithered, meme-y photo of Bill Gates appears if you win 10 times. That probably wasn't in the original, I'm guessing?

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#96

Earlier quoted context omitted.

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

You absolutely should! I’ve already sunk hundreds of hours into building out the fidelity of QuickBASIC (everything down to emulating memory access so you can simulate realistic PEEKing and POKEing), so I don’t have the sanity points left to tackle any other variants myself, but I’d love to see a GW-BASIC version.

Got grounded for “breaking” the computer by POKE’ing random numbers to 0 to 65535. In my defense, I was 11.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#97
post #85
post #7

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 Mic…

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.

I remember an old company called "Access software" that had something called "Realsound" with which they played really high quality audio on the PC speaker. Their games were things like Countdown, Martian Memorandum etc.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#98
post #2

Inspired by the 45th anniversary of the IBM PC, I got my slopmachine cracking on a port of DONKEY.BAS to work in a browser. Pretty happy with the result. As a young person I remember being fascinated that you could make a game like this with so little code.

> I got my slopmachine cracking on a port

For 131 lines?

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#99
post #96

Earlier quoted context omitted.

You absolutely should! I’ve already sunk hundreds of hours into building out the fidelity of QuickBASIC (everything down to emulating memory access so you can simulate realistic PEEKing and POKEing), so I don’t have the sanity points left to tackle any other variants myself, but I’d love to see a GW-BASIC version.

Got grounded for “breaking” the computer by POKE’ing random numbers to 0 to 65535. In my defense, I was 11.

Haha same. I definitely crashed our family's PC quite a few times as a kid by forgetting to set the segment address to &HA000 and then poking, mistakenly assuming I was hitting mode 13h VGA memory.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#100
post #19

Earlier quoted context omitted.

For those who don't know why GORILLA.BAS is so cool... Back in the day, computers were expensive and games weren't readily available. Sometimes a parent would buy a computer for word processing or spreadsheets or take kids to the office which also had business computers. Children were curious about the computers but there wasn't really anything fun to do with them besides banging on the keyboard... ...Until you found…

Just as importantly - it was an all‑in‑one. I think a lot of people tend to forget that there were already plenty of earlier BASIC dialects (GW‑BASIC, Apple II BASIC, C64 BASIC, etc). However QBASIC was likely the first freely available, all‑in‑one "batteries included" environment that came bundled with MS‑DOS 5 with a relatively friendly IDE that had built‑in help for every single command. GORILLA.BAS and NIBBLES.BA…

Only if you ignore the 8 bit home computers, we got all BASIC interpreters and machine code for free with each one.

And there were "IDEs" that sometimes were offered in cover tapes, at the expense of even lesser RAM, I got one for the Spectrum.

And the 8 bit computers with at least 128 KB, already could run CP/M, which opened the door for better BASICs, including compilers.

Post reply on HN