mastodon.me.uk is one of the many independent Mastodon servers you can use to participate in the fediverse.
Open, user-supported, corporation-free social media for the UK.

Administered by:

Server stats:

503
active users

Tiny BBC BASIC raytracer

@bbcmicrobot @coprolite9000 Ray tracing on an 8-bit computer, released 42 years ago, with a script short enough to fit in a Toot!

@arx @bbcmicrobot
It would take literally *hours* to run on original hardware - made implausibly faster by modern tech!

@coprolite9000 @arx @bbcmicrobot How long do you think it would take on an Electron, and do you want me to try it and find out?

@bbcmicrobot @coprolite9000 @arx I'm guessing more like eight, given that it has so far done this much, and it's been going for an hour and twelve minutes.

@bbcmicrobot @coprolite9000 @arx Two hours, and it is apparent that the Electron's aspect ratio is slightly taller than the BBC's. I guess they don't want to keep the CPU halted longer than 40 µs if they can avoid it...

@bbcmicrobot @coprolite9000 @arx Four hours and we're maybe halfway, or not quite halfway.

@coregaze @bbcmicrobot @arx
* Cheers on the little Electron *

(I wonder if it'll speed up a bit when it gets to the sky? The simpler gradient-only stuff might help a bit...)

@coprolite9000 @bbcmicrobot @arx It seems to be managing a little over a pixel per second, I think, so far...

@coprolite9000 @bbcmicrobot @arx the sky does indeed seem to be a little faster! Quite a bit, actually- maybe two or three times the speed. Five hours in and we're definitely past halfway!

@coregaze @bbcmicrobot @arx
Electron has achieved liftoff and is now soaring through the skies.

@donkeyblam @coprolite9000 @bbcmicrobot @arx

And that's a wrap!

It took about eight hours and 40 minutes.

@coregaze @donkeyblam @bbcmicrobot @arx
Good work, little Electron! I hope you’re having a nice long nap now.

@coprolite9000 @donkeyblam @bbcmicrobot @arx I wonder if it would be faster if I used my Electron with the 65c02 and the Master version of BASIC...

@coregaze @coprolite9000 @donkeyblam @bbcmicrobot Some of the graphics routines were optimised for Master BASIC, iirc. And the 65c02’s extra instructions help improve code density, so less memory access fetching instructions… so yeah, I expect so. Provided Master BASIC is compatible with the Electron, ofc.

@arx @coprolite9000 @donkeyblam @bbcmicrobot I've run the 65c02 BASIC on my Electron, so it definitely works; the Electron OS is closer to the Master's OS 1.2 than to the Beeb's 1.0, I think.

Hmmm, this could be a fun project.

@coregaze @coprolite9000 @donkeyblam @bbcmicrobot That’s an excellent screen you have there. What is it and how have you connected it to the Electron?

@arx @coprolite9000 @donkeyblam @bbcmicrobot It's a Waveshare 15.6 inch multitouch display (I don't use that last bit). amazon.com/gp/product/B07QXKKH

It's connected to the Electron via a Hoglet RGBtoHDMI based on a Raspberry Pi Zero.

@coregaze @coprolite9000 @donkeyblam @bbcmicrobot Cool, thanks :-) I need to get my Beeb out again. A fren kindly replaced the power supply. I need to check the real life behaviour arising from a hacked VideoULA palette register.

@coregaze @coprolite9000 @donkeyblam @bbcmicrobot How about using the RPi not only to convert the Beeb’s (edit: Electron’s!) RGB output to HDMI but also connects to, say, the user port so that programs can get the RPi to convert the colours using a 24-bit logical palette? Like a 21st century version of Mike Cook’s Chameleon. Maybe even get it to work with 2x2 pixel blocks so that it can do anti-aliasing. Massive cheat, I know, but fun to try! 😺

@coregaze @coprolite9000 @donkeyblam @bbcmicrobot Demo of a similar product from 1982! Signal from the RGB port. Colour remapping controlled via the user port. That RPi could SO do similar. 😺 youtu.be/Q5C0UOkDwVo?si=dGT9B7

@arx @coprolite9000 @donkeyblam @bbcmicrobot I mean, apart from the fact that the Electron doesn't have a user port...

@arx @coprolite9000 @donkeyblam @bbcmicrobot

Okay so I _may_ have spent a couple of hours making a ROM with the newest version of Electron MOS plus the newest version of BASIC 4 I could find.

@arx @coprolite9000 @donkeyblam @bbcmicrobot It's my Issue 2 Electron board that has the W65C02S fitted, so over to that...

@arx @coprolite9000 @donkeyblam @bbcmicrobot It is, it turns out, substantially faster than before? It's been going for about 45 minutes and this is how far it's got.

@arx @coprolite9000 @donkeyblam @bbcmicrobot Two hours and we're more than a third of the way in. I wonder what, if anything, running the Master BASIC in an Electron will break...

@arx @coprolite9000 @donkeyblam @bbcmicrobot Three hours and 22 minutes and I think it's actually getting faster.

@coregaze @bbcmicrobot @arx
Aww - excellent. (Also, really interesting to read about some of the peculiarities of the Electron's hardware!)

My first home computer was a heavily upgraded Atari ST - starting life as a family computer in ~1988 when I was a child, then eventually getting on to the internet in ~1997 when I was a teenager. It acquired a hard disk along the way, which I've imaged and is bootable in an emulator - but I really ought to get the real hardware working again...

@coregaze @bbcmicrobot @arx
Last trip out for the ST - back in 2007?

(PPP over a null modem connection to a Linux PC under the desk in this case...)