News:

Welcome to RetroCoders Community

Main Menu

Do you have any project write-up anywhere about SpecBAS ?

Started by CharlieJV, Aug 12, 2023, 05:54 AM

Previous topic - Next topic

CharlieJV

Things like when you started it, why (goals), that kind of thing?

ZXDunny

Not really :)

Back when I was a kid, about ten years old, I got into BASIC programming on my Sinclair Spectrum 48k. It was slow, but great fun. Machine code was way out of my reach and would be for many years, so I often dreamed of having a very fast z80 processor to run BASIC on as if it were machine code.

Many years later and I'm finding that I could probably learn to code a BASIC interpreter. I ask a friend how, and he recommends I write a z80 emulator and use that to run the ROM BASIC from back in the day. So I do that - ZXSpin is the emulator I wrote. It's still pretty popular.

But it wasn't an interpreter and it was basically just the same as back when I was ten - slow and well, BASIC. So I wrote a new emulator and added in ROM hooks to jump into and out of x86 at various parts. This resulted in BASin, an IDE for Sinclair BASIC in Windows. Almost what I had in mind, but... not quite there yet (and yes, BASin is still very popular in Sinclair BASIC circles).

Then I (quite by chance) discovered the shunting-yard algorithm for converting infix expressions to postfix. I realised that if I just add in statement keywords at the end of the expression stack, I have a crude interpreter. So SpecBAS was born. This was 2010. I've been at it since, and it's all I ever wanted and more.

Faster, better graphics with more primitives, sprites, sound and music, windowing with a suite of controls, texturing, procedures, more flow control options and still (very close to) full Spectrum BASIC compatibility - barring obvious issues that arise from having more RAM, more graphic depth, more everything.

That's about it.

As for goals.. Fix bugs, refine the interpreter, write cool stuff in it. Add new features. That sort of thing.

No roadmap so to speak.

CharlieJV

Man, do I ever love these kinds of stories.  That should be on a BASIC wall of fame somewhere.

You've got to put copies of that in a few places for visibility and safe keeping.

Thanks for taking the time to write that!  Such good stuff.