I ran @coprolite9000's program and got this.
Source: https://bbcmic.ro/?t=9ctpk #bbcbasic
@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?
@coregaze @arx @bbcmicrobot
'A while', I imagine?
(If you've got access to original hardware, Owlet's got an audio export thingy which might be handy, saving a bit of typing. I'd love to see a photo of the poor Electron doing its stuff - I *think* the program will work unmodified?)
@coprolite9000 @coregaze @arx I’m going to wager 5 hours on an Electron! I’m cheering it on
@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 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.
@coprolite9000 @bbcmicrobot @arx
But it's real.
My other Electron has a 2021 WDC 65C02S in it, it feels like that would be somehow less genuine; this Synertek part came from (another) Electron.
I don't know why I like the Electron so much. It makes me happy.
@coprolite9000 @bbcmicrobot @arx Seven hours! In the home stretch now.
@coregaze @coprolite9000 @bbcmicrobot @arx thats so pretty!
@donkeyblam @coprolite9000 @bbcmicrobot @arx
And that's a wrap!
It took about eight hours and 40 minutes.
@coregaze @donkeyblam @coprolite9000 @bbcmicrobot @arx
Congratulations on completing frame 0!
How long for the full animation?
https://youtu.be/Vdh-fPX1gSk
@coregaze @donkeyblam @coprolite9000 @bbcmicrobot Well done, little Electron. <3
@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). https://www.amazon.com/gp/product/B07QXKKHRF
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.
@arx @coprolite9000 @donkeyblam @bbcmicrobot I mean, apart from the fact that the Electron doesn't have a user port...
@coregaze @coprolite9000 @donkeyblam @bbcmicrobot D’oh… hmm… any other way the Electron could interface to it? I suppose the expansion port but then the Plus 1 etc couldn’t use it.
@arx @coprolite9000 @donkeyblam @bbcmicrobot Not really. I've already got the ElkSD128 attached to it.
@coregaze @coprolite9000 @donkeyblam @bbcmicrobot Still, even if it’s not controllable from the Electron, if the palette conversion is specified in a simple config file on the RPi then it’d be fun to experiment, especially with fractals and games.
@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.
@arx @coprolite9000 @donkeyblam @bbcmicrobot I started it again at 8am because I went to sleep before it was done.
At four hours, the WDC 65C02S and the Master BASIC is way out in front of the stock Electron with the Synertek 6502A.
@coregaze @coprolite9000 @donkeyblam @bbcmicrobot I wonder just how much quicker it could be if rewritten in machine code with lookup tables.
@arx @coprolite9000 @donkeyblam @bbcmicrobot I don't know, the BASIC 4 floating point code is pretty close to the limits of what a 6502 can do, and this program has to be spending most of its time doing that.
@coregaze @coprolite9000 @donkeyblam @bbcmicrobot Troo but it still has to interpret the BASIC at runtime and that’s pretty expensive.
@arx @coprolite9000 @donkeyblam @bbcmicrobot Surprisingly not that expensive on the Electron, since the only time the CPU can run at 2 MHz is when it's running code out of ROM...
This finished at about ten past one, giving a total render time of about five hours and fifteen minutes. The Master BASIC with the 65c02 is significantly faster than the Electron BASIC!
@coregaze @arx @donkeyblam @bbcmicrobot
Intriguing!
Looks like BBC BASIC 4.32 had lots of floating point optimisations? Probably fairly minor in isolation, but in a horrendously floating-point-heavy program like this...
https://beebwiki.mdfs.net/6502_BBC_BASIC
(Now I'm wondering what a BBC Micro would do with this BASIC.)
@coprolite9000 @coregaze @arx @donkeyblam would it be worth making it an upgrade for the bot... a BASIC 4.32 option with an emoji
@bbcmicrobot @coprolite9000 @coregaze @donkeyblam You’d prolly need to accompany it with a 65SC12, too, as it uses its new instructions.
@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...)