News for hackers. Stuff that matters.
Re:Raspberry Pi Boot to BASIC by musicale on Thursday January 06, 2022 @11:21AM (#29825528)
(2021)

RISC OS Pico [1] (I think it was short for Pi Computer) booted the Pi directly into BBC BASIC. It would be great if they'd make it a supported image on the current Pi boards.

The .zip archive is still available if you follow the links on archive.org (and even includes the book "First Steps in Programming RISC OS Computers" and associated demo programs.) Its 2.1MB boot .IMG is somewhat smaller than Ubuntu. Has anyone tried it?

[1] https://web.archive.org/web/20181109020010/https://www.risco...

Re:Raspberry Pi Boot to BASIC by vitovito on Thursday January 06, 2022 @03:22PM (#29829485)
Just did! Has only bootloaders from 2014, though, and firmware changes with the Pi itself mean it won't work on the latest Raspberry Pi models, nor will replacing the RISCOS.IMG from a current version with the Pico version.

When I tried RISC OS' own instructions to have the equivalent experience with their latest OS versions, they seemed to be missing a step, too, as I'd still boot to a desktop on a Pi 4: https://www.riscosopen.org/wiki/documentation/show/Raspberry...

Write the latest full RISC OS (through Raspberry Pi Imager or elsewhere). Edit CMDLINE.TXT per their instructions, and after it boots, on your keyboard, press F12 to open a command line at the bottom of the screen, type in the commands from their instructions, and then also type:

    Unplug Desktop
Then press Ctrl-Break to reboot. You don't need to copy files to other SD cards or anything. It will boot immediately into BBC BASIC in Mode 7 (40x25, Teletext pixels, 16 colors).

In swapping the SD card between a Pi 1/2 and a Pi 4, I was getting occasional misfires, though, and it wouldn't boot into BASIC, getting hung up on the wrong networking driver, or complaining about a missing desktop. Ctrl-Break to reboot should fix it.

Re:Raspberry Pi Boot to BASIC by incanus77 on Thursday January 06, 2022 @07:31PM (#29832898)
This worked great. One note: Ctrl-Break on the official Pi keyboard is Ctrl-PrtScn.
Re:Raspberry Pi Boot to BASIC by bencollier49 on Thursday January 06, 2022 @12:11PM (#29826298)
Yes! It actually runs games from the BBC Welcome disk pretty well.

https://www.bencollier.info/projects/electronics/emulation/f...

Re:Raspberry Pi Boot to BASIC by Kim_Bruning on Thursday January 06, 2022 @11:26AM (#29825597)
Else it's just an F12 -> *BASIC away, right?
Re:Raspberry Pi Boot to BASIC by pmyteh on Thursday January 06, 2022 @11:41AM (#29825833)
Yes. Or, assuming the old mechanism still works, using *Configure Language to boot into BASIC by default every time the machine starts.

My guess is that the RISC OS version of BBC BASIC will also have slightly better compatibility with things like old printed program listings than BBC BASIC for Linux, so may be a better choice for the full nostalgia hit.

Re:Raspberry Pi Boot to BASIC by klelatti on Thursday January 06, 2022 @12:18PM (#29826425)
The Colour Maximite is a modern computer that boots into its own specially written Basic. [1]

I think using a Cortex M7 with its simpler memory model keeps it closer to the spirit of the 8 bit machines than is possible with a Cortex A series.

[1] https://geoffg.net/maximite.html

Re:Raspberry Pi Boot to BASIC by boznz on Thursday January 06, 2022 @02:00PM (#29828180)
Agree, probably the easiest out there, a port for a RPi is well overdue.
Re:Raspberry Pi Boot to BASIC by jameskeim on Friday January 07, 2022 @01:42PM (#29842971)
MMBasic is the actual basic used on the CMM2. It is really a great system with some advanced features for BASIC. https://www.mmbasic.com/downloads.html

I do recall that there is a port of MMBasic for the Raspberry Pi floating around somewhere. I think it is on the forums at https://thebackshed.com but I couldn't tell you how to find it. I do think it runs under Linux and not on bare metal but I might be mis-remembering.

Re:Raspberry Pi Boot to BASIC by jameskeim on Friday January 07, 2022 @01:59PM (#29843214)
Actually dug through because I only had a vague recollection. So the Pi-Cromite version I remembered has been discontinued. However, there is a MMBasic for Linux that cribs some code from that project. And, it can be compiled for the Raspberry Pi. I might venture to suggest that this might be one of the most fully featured Basic implementations that can found for the Raspberry Pi. Link here: https://github.com/thwill1000/MMB4L
Re:Raspberry Pi Boot to BASIC by LNSY on Thursday January 06, 2022 @11:09AM (#29825350)
The computer I learned to program on was an Apple II+ with rusted keys that you just had to slam. I still type loudly. It booted into basic.

I, of course, desperately wanted LOGO (and of course the robot turtle, too!), but my family couldn't afford it.

Re:Raspberry Pi Boot to BASIC by tombert on Thursday January 06, 2022 @01:45PM (#29827930)
My first computer was a hand-me-down C64 from my dad, and it's part of the reason that I started programming while I was so young. I never got good at programming it, but I thought it was so cool that you start programming immediately after booting up. This would have been ~1998-1999, WELL past the the C64 hayday, but I had a lot of fun playing with it.

I didn't really know how to use DOS on my parents' Windows computer, and so as far as I knew at the time, the only way to do programming there was to install a bunch of compilers and that scared me.

Simpler times!

Re:Raspberry Pi Boot to BASIC by philjohn on Thursday January 06, 2022 @03:12PM (#29829330)
If only you'd known DOS shipped with Q-Basic! After we got a Cyrix 386 back in the 80's I moved on from Commodore Basic (on the C128) to that, then Turbo Basic, Turbo Pascal and then Turbo C.
Re:Raspberry Pi Boot to BASIC by tombert on Thursday January 06, 2022 @03:28PM (#29829577)
Yep! Had I known about Q-Basic there's a very high likelihood I would have eaten that up, but this was really before I knew how to use the internet, and I wouldn't have even known what to look for on Lycos if I did know.

I played with C64 Basic for a few years, until eventually I got the courage to download Visual Studio Express and learn a bit of C++ when I was 13, and hop over to Linux full time and use Emacs + GCC when I was 14/15, largely because the heavy reliance on the command line for Linux reminded me a bit of C64 basic.

Occasionally I miss how integrated coding was with the operating system in the past. I think overall de-emphasizing coding is a good thing since I feel like the computer is useful enough to justify non-nerds having access to it, but there was something so cool about how accessible it was to, for example, make a game on the C64.

If I want to make a game now, I basically have two options: A) Start from "scratch" and learn OpenGL/DirectX/Vulkan/SDL and basically learn a masters-degree-level of information about graphics engineering, or B) Download something third-party like Unity or GameMaker [1] and work from there. I'm not going to say it's "worse" now, but it's definitely a steeper learning curve than just hoping into Basic and playing around with `poke`.

[1] To be clear, both of those things are pretty cool, not knocking them.

Re:Raspberry Pi Boot to BASIC by pjmlp on Friday January 07, 2022 @01:47AM (#29835843)
Only starting with MS-DOS 5.0, until then it was GW-BASIC/BASICA.

And the competition DR-DOS/PC-DOS lacked them (PC-DOS had the early versions though).

I also made a similar Borland progression, although Turbo C 2.0 only took a couple of months and was quickly replaced by Turbo C++ 1.0 on the same year.

After Turbo Pascal 6, dealing with C was a downgrade.

Re:Raspberry Pi Boot to BASIC by reaperducer on Thursday January 06, 2022 @11:47AM (#29825919)
I wonder if people, especially young children, would be more interested in programming if all computers booted directly into a programming language.
Re:Raspberry Pi Boot to BASIC by a9h74j on Friday January 07, 2022 @02:53AM (#29836286)
Make this part of an early-stage bootloader? On 5 sec timeout proceed to normal boot?
Re:Raspberry Pi Boot to BASIC by hereforphone on Thursday January 06, 2022 @03:15PM (#29829376)
One of my very first computers was an IBM PCjr. I got it way after it was obsolete, but my parents didn't have money so I took what I could get. With the cartridge inserted I could boot to 'gwbasic'. I started programming there, a long time ago, and I still program today. It's nice to see this part of history resurfacing.
Re:Raspberry Pi Boot to BASIC by bencollier49 on Thursday January 06, 2022 @11:59AM (#29826106)
This is the wrong way to do it! Just install RISC OS Pico, and avoid the many layers of indirection!
Re:Raspberry Pi Boot to BASIC by pjmlp on Thursday January 06, 2022 @01:57PM (#29828134)
Regarding the BASIC nostalgia, only recently did I became aware that the original BASIC (Dartmouth BASIC) was actually JIT based and it was the adaption of BASIC into the home computers that kind of made its interpreted version more widely known.

While there were several flavours of BASIC compilers there were never as widely spread as these interpreters.

I find it interesting, it could have been yet another what-if, had the compilers been as widely accessible.

Re:Raspberry Pi Boot to BASIC by boznz on Thursday January 06, 2022 @02:34PM (#29828720)
Boot-to-Basic Computers are great fun and excellent for learning but just do not have the stack to build real world applications in 2021 on eg SQL, sockets, SSL, etc

I would love to be able to just turn on the computer and have a simple basic program run a touchscreen interface to my factory SQL systems but we truly must stand on the shoulders of giants in this regard.

(talking about boot-to-basic here no basics that run on an OS and can access the whole OS stack)

Re:Raspberry Pi Boot to BASIC by a9h74j on Friday January 07, 2022 @02:51AM (#29836270)
Did a search to see if it has been done. Yes, there is an EFI Basic of sorts:

UEFI Basic

https://github.com/LHerrmeyer/UEFI_Basic

Re:Raspberry Pi Boot to BASIC by pjmlp on Thursday January 06, 2022 @02:48PM (#29828928)
Maybe you would enjoy to have a look at Meadow, they support VB.NET.

However it does rely on NuttX for the runtime services.

Re:Raspberry Pi Boot to BASIC by musicale on Thursday January 06, 2022 @12:09PM (#29826270)
Also see: https://github.com/steventroughtonsmith/rpi-basic

which is (or was in 2013) a minimal bare-metal BASIC for the Pi.

Via HN: https://news.ycombinator.com/item?id=8228763

Re:Raspberry Pi Boot to BASIC by kingcharles on Thursday January 06, 2022 @02:08PM (#29828310)
I always thought it was more fun to use a semicolon at the end of the line, like this:

10 PRINT "CHAZ WOZ ERE "; 20 GOTO 10

You can test it here:

https://bbc.godbolt.org/

Re:Raspberry Pi Boot to BASIC by zekica on Thursday January 06, 2022 @11:58AM (#29826093)
You can probably make it boot to basic a lot quicker. Don't need to wait for all services to start up. Even LibreELEC boots faster. If I'm correct and this uses SDL, SDL2 supports kms/drm.
Re:Raspberry Pi Boot to BASIC by mnd999 on Thursday January 06, 2022 @11:51AM (#29825990)
AMOS BASIC would be the best choice surely?
Re:Raspberry Pi Boot to BASIC by Narishma on Thursday January 06, 2022 @12:18PM (#29826423)
Isn't it proprietary?
Re:Raspberry Pi Boot to BASIC by mnd999 on Thursday January 06, 2022 @12:40PM (#29826757)
It was at the time, I think they released the source a few years ago.
Re:Raspberry Pi Boot to BASIC by unwind on Thursday January 06, 2022 @01:12PM (#29827353)
Yes, but it was (unsurprisingly) written in MC68k assembly [1].

[1] https://github.com/AOZ-Studio/AMOS-Professional-Official

Re:Raspberry Pi Boot to BASIC by mnd999 on Friday January 07, 2022 @03:50AM (#29836698)
Sure, but 68ks (and Amigas) are pretty well emulated these days, it wouldn’t be that hard.

Sure what you have then is an Amiga emulator that boots strait into AMOS but I think that’s fine as it would be a great beginner environment.

Re:Raspberry Pi Boot to BASIC by richardfey on Thursday January 06, 2022 @01:40PM (#29827870)
This shouldn't use X11 nor Wayland
Re:Raspberry Pi Boot to BASIC by incanus77 on Thursday January 06, 2022 @01:17PM (#29827463)
There are a number of ways to accomplish this today. All have trade-offs, but generally, the main illusion-breaker is when they are user space programs that run on top of Linux, mostly on account of random console spew (which can be remedied) and boot-to-prompt time (which can be made to generally about <10 seconds, at best — DietPi and TinyCoreLinux are both useful here).

Incidentally, the RISC OS Pico[1] mentioned is out of date and won’t run on the Pi 400 or other newer Pi’s.

Aside from the excellent PC-BASIC[2] and BBC BASIC[3] mentioned, another in that vein is MatrixBrandy[4], a fork of Brandy BASIC[5]. PC-BASIC is excellent if, like me, you grew up on an IBM PCjr, since that is a very specific brand of GW-BASIC with better graphics & polyphonic sound. But, being Python, it’s relatively slow when doing things like POKEing the emulated graphics buffer and the like. MatrixBrandy is C-based and very fast, but has a number of BBC Micro-era quirks in the spirit of emulating those old systems.

Another fun route is emulators that have been ported to a Pi bare metal mode, such as a fork of the C64 emu VICE[6] called BMC64[7].

Lastly, there are some fun from-scratch fantasy consoles like PICO-8[8], TIC-80[9], and LIKO-12[10], all of which are based on SDL under the hood. To my knowledge, the only one with a bare metal version is TIC-80’s[11]. There is also Pixel Vision 8[12]. Generally, you code in Lua in these.

[1] https://web.archive.org/web/20181109020010/https://www.risco...

[2] http://robhagemans.github.io/pcbasic/

[3] https://www.bbcbasic.co.uk/bbcbasic.html

[4] https://github.com/stardot/matrixbrandy

[5] https://sourceforge.net/projects/brandy/

[6] https://vice-emu.sourceforge.io

[7] https://accentual.com/bmc64/

[8] https://www.lexaloffle.com/pico-8.php

[9] https://tic80.com

[10] https://liko-12.github.io/

[11] https://github.com/nesbox/TIC-80/tree/master/build/baremetal...

[12] https://pixelvision8.github.io/Website/

Re:Raspberry Pi Boot to BASIC by sourcecodeplz on Thursday January 06, 2022 @02:03PM (#29828238)
Aaaah BASIC, my first love.

10

20

25

30

Re:Raspberry Pi Boot to BASIC by bellyfullofbac on Thursday January 06, 2022 @11:36AM (#29825768)
My PC XT didn't boot into BASIC, I wonder why. It's long gone now so I can't investigate what hardware it actually had.

This boots X11/Wayland and then an SDL app on top of it, I wonder what it would take to write a shell or init that the kernel loads straight after it's done loading itself up. Maybe The systemd folks can make systemd-basic...

Re:Raspberry Pi Boot to BASIC by drivers99 on Thursday January 06, 2022 @02:12PM (#29828377)
Sounds like it should have had it. https://en.wikipedia.org/wiki/IBM_BASIC#IBM_Cassette_BASIC

I still have my IBM PC (5150), taking up a lot of closet space.

Re:Raspberry Pi Boot to BASIC by thanatos519 on Thursday January 06, 2022 @11:49AM (#29825953)
I was thinking of using a framebuffer version of VICE as 'init' to boot directly to a C=64 environment.
Re:Raspberry Pi Boot to BASIC by jandrese on Thursday January 06, 2022 @12:01PM (#29826144)
I remember our school computers you had to start the machine without anything in the floppy drive to get dumped into BASIC.

Unfortunately it was a very limited BASIC. I guess there wasn't much space in the BIOS ROMS. It was pretty much always worth it to boot DOS and start GWBASIC.

Re:Raspberry Pi Boot to BASIC by AnIdiotOnTheNet on Thursday January 06, 2022 @12:10PM (#29826281)
> My PC XT didn't boot into BASIC, I wonder why.

Mine didn't either, it booted into DOS 3.0(?) and I got to BASIC by running BASICA.EXE.

If I had to guess, it booted into DOS if you had a hard disk and otherwise booted BASIC from a ROM?

Re:Raspberry Pi Boot to BASIC by bellyfullofbac on Thursday January 06, 2022 @12:20PM (#29826460)
Nah it didn't have a hard disk, and booting up without any floppies inserted resutled in an error message...