VinCBR900 wrote:
Re Mandelbrot, the bootbasic is a minimal basic and so any 'normal' basic program would need porting to make it usable e.g. unsigned 16bit integers, no GOSUB/RETURN, no FOR/NEXT, no CHR$ etc, but the intent is wouldn't it be cool to see a 1975 6502 variant CPU running a BASIC mandelbrot program, and see how long it takes...
Well.. This is a solved problem - we've been doing that for decades now.
However that listing you linked to earlier is interesting as it's using scaled integers. The one I put together for benchmarking some years back is here:
https://unicorn.drogon.net/mandel.basOutput here:
https://unicorn.drogon.net/mandel.txtHowever that does use floating point - the number at the end; 48.21 is seconds running BBC Basic on a 16Mhz 65C02 CPU, but myself and others have used it on various platforms to benchmark (mostly microsoft type) BASICs on 8-bit micros.
I've tried running yours under BBC Basic after converting all variables to integers (I -> I%, etc.) BBC Basic supports 32-bit integers. It's very very slow - I think the main issue is the pixel iteration count being quite large - 200 when you only have 10 "colours" to plot.
So what might be needed is a version that would run with 16-bit signed integers so we could all test it with the various Tiny/Integer BASICs out there including Apple Integer BASIC which is, I feel somewhat neglected these days.
(And as it happens I do have a version that will fit the bill and work in 16-bit integers, however it's currently in BCPL, so I'll make an effort soon to translate it into BASIC suitable for Tiny* systems and other systems that support computed GOSUBs...
Picture of your Mandelbrot running on my Ruby 6502 board under BBC Basic. I didn't time it, but it was several minutes:
Attachment:
Screenshot_2023-09-07_17-45-16.png [ 127.14 KiB | Viewed 17921 times ]
Cheers,
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/