BigDumbDinosaur wrote:
[color=#000000]
spageen wrote:
Hello! I am in the process of creating ’BeebEater’: a thin layer of assembly over the original BBC Basic binary to make it compatible with Ben Eater’s 6502 breadboard computer build. I’ve implemented handy things such as the serial terminal, LCD, and the PS/2 Keyboard...
First off, welcome to 6502 Land.
I think you may have a little confusion going on. BBC Basic is not an operating system. It is a language interpreter. An operating system, more specifically, a kernel, is the software that directly interacts with the hardware. A language interpreter, such as BBC Basic, runs on top of a kernel, through which it gets services to access files, drive the display, etc.
In the 6502 universe, kernels tend to be very specific to the machine, even though the MPU itself is the same in the many different systems that were designed around the 6502 and its derivatives. There is no uniformity in machine architecture, which has been a 6502-sort of problem for some 47 years.
BBC Basic can’t run without the low-level support services of the computer on which it was designed to be used. Obviously, to store and retrieve data from within a running BASIC program, a filesystem is needed, which means some sort of kernel is needed to manipulate the filesystem, as well as control other hardware features, such as video. Many homebrew 6502 systems lack such features.
BBC Basic (like EhBASIC) requires support to interface to the host hardware and Acorn originally supplied an operating system with the Acorn/BBC Micro to go this. As I understand it, this is what @spageen is writing - enough support to make BBC Basic work on the BE hardware.
Others have done the same (including myself) and the process is extremely well documented. The interface to the original Acorn MOS (Machine Operating System) was published back then and is even more understood and documented now
To make BBC Basic work you don't need to do much at all - there are a few calls you need to implement (character IO, get memory sizes, read a line of text - you know, the same you might have to implement for EhBASIC) and that's about it. That's how I started mine - I just grew it after that to support more machine stuff (like, asynchronous 'escape' detection, sound, files, etc.)
(Even sound and graphics are a function of the OS)
Even the filing system isn't cast in stone - BBC Basic is filesystem agnostic, tape, disk, network it doesn't care nor, does it know - it provides the commands and those commands call standard, documented entry points into the operating system and the OS does the rest. Currently my Ruby system is using FAT32 and that's just fine although I started writing my own FS but wanted better interoperability with my laptop.
Is it a fit for a small 6502? Absolutely, and why not? BBC Basic is a 16KB ROM and the minimum support it needs might be under 1KB, so why not? Minimum RAM you might need is in the order of 4KB.
So if you want a BASIC that's almost 2x faster than any MS Basic out there, has more features, (long variables names, recursion, named functions/procedures, local variables, built-in assembler, 5-byte floats, 32-bit ints, et. etc. etc. ) then why not?
I also suspect that there may well be more people actively running and developing code under BBC Basic than any other 8-bit BASIC right now too - thousands of people are still using it on original BBC Micros or emulators and BBC Micros sell very quickly on ebay - several people including myself buy, refurbish and sell BBC Micros and there's no lacking in demand for it.
EhBasic became popular because there wasn't an easy choice. It assembles to about 10KB and you need the rest of the 16KB ROM space for a monitor. There's no reason a Ben Eater system can't support more ROM/RAM, so go for it. It's not like its expensive these days... When I got back into the 6502 again I looked long and hard for a more modern BASIC and found nothing. I implemented EhBASIC because everyone does but meh... I'd already written my ideal BASIC (in C) and wanted something better for my 6502 so I made BBC Basic run and a side-effect of that was the ability to run other Acorn ROMs unchanged - like Comal, Forth and BCPL. The word processors and spreadsheets escape me as they do more hardware poking than they should.
I have ported my RubyOS to 3 different 6502 systems now - I've no plans to do another. I did look at it for my 134-SXB project and had a RAM version going some time back, I never bothered with BBC Basic because that hardware would make running BBC Basic harder without me re-assembling it as Zero page is used for IO in the 65c134.
So lets embrace it!
Quote:
Would BBC Basic be a good fit on a low-end, homebrew system like what Ben Eater promotes in his Youtube series? I’m inclined to think not. His system is essentially a copy of the basic circuit Garth Wilson presents on his website. Garth’s reference system, while functional, is not something that will work at the level required to properly support BBC Basic.
Can we get over this whole "copied Garths design" thing? So what?
As for a good fit? You think it's any better or worse fit than someone putting EhBasic on an Apple 1?
Quote:
The need to maintain a comfortable footprint on a small 6502 homebrew system is one of the reason EhBASIC became popular. If you can meet such a requirement with BBC Basic, you may see interest.
I do not think this is remotely true. EhBASIC got there because there was little/no choice and people are lazy.
Even Lee was lazy, disassembling Microsoft Basic then passing it off as his own. I lost all respect for him when I found this out.
As for minimum? What exactly do you need? Some ROM, some RAM, a 6502, UART, decode - that's 5 ICs. Substitute the UART for a VIA and you have an interface to a parallel keyboard and LCD and its completely self-contained.
My original Ruby 6502 is a 5 IC system - CPU, RAM, Host µC, VIA, Glue IC. Quite minimal and it runs BBC Basic very well.
Sláinte,
-Gordon