Sunday, December 5, 2021

RIBBBIT65: Why Is?

RIBBBIT65: Why Is?

The RIBBBIT65_COREplus

First and foremost, the RIBBBIT65 is an autodidactic exercise, wherein I learn how computers work at the "machine language and bus signal" level.

You see, I was at just about the right age to be in the target demographic when home computers started taking off -- the late '70s, early '80s.  It was really neat.  A friend of mine who was very, very smart, and was fortunate enough to have positive and encouraging parents, got a computer... I think it was for Christmas... an Atari 400.  ...and I was *fascinated*.  He got really, really good with the programming... so much so that he'd started not just writing little machine language subroutines that he'd call from BASIC... no.  He got an Assembler/Editor cartridge and was writing whole programs in Assembly.  At this point I had no computer.  I would shoulder surf and he'd show me programs he'd written in BASIC, and I could kinda make sense of them.  I could *get* BASIC.  I could probably make a computer do things.  

Well, another Christmas, another computer.  I don't recall if it was the *next* Christmas, but it wasn't long after the Atari 400 hundred showed up, that his parents had gotten him an Atari 800 (With a floppy drive!) as an upgrade, since he'd outgrown the 400.  I mean, fine... anyone could outgrow 16K or RAM... but 48K?  I'd like to see you try.  Well, his 400 found its way to the basement of their house and stayed there for a while.  

At this time, I was more or less a fixture at their house (I was more ubiquitous than the paint on the walls), and we would often play in their basement (because... outside?  what's that?!).  On the way down and on the way up, I would see that Atari 400 sitting there... unused.  Lonely.  Finally, I got up the nerve (and scraped together a little cash) and asked my friend's dad if I could buy the old 400...with its cassette drive.  $30 later, it was mine.  

Soon, I was writing BASIC like a banshee.... I guess.  I don't know much about banshees.  Anyway, I was printing, "Hello world" on the screen and flashing colors and doing all sorts of basic stuff.  It was neat.  ...but there was something about sprites and machine language that made them.... beyond me... somehow.  Maybe it was the fact that Atari BASIC supported them, kinda, but I didn't really get a good idea of the how of it.  I don't know if it was a cognitive thing or a psychological thing... but my young thinkymeat was having none of it.

Time and a half went by, and I'd upgraded my rig to an Atari 800XL with a floppy drive, and I was doing some cool stuff with that, but I never really got into Assembly.  Eventually, I made the leap into PCs.  That was 1991, and I've been getting farther and farther from the bare metal ever since.

In the intervening years, I've actually settled into a career in IT.  I've become a Linux nerd.  I've picked up several languages, but in the back of my mind, there was a little bugaboo; a tiny voice in the dark, telling me I didn't really get it.  ...not really.  It was that sad little 400 in the basement.

In 2016, not long after starting a job with a 3-hour round-trip commute by rail, I decided I would undertake a project to "get" machine language.  I decided I would write a CPU emulator.  Strictly speaking, it ended up being more of a "machine language interpreter"... but, it worked.  I wrote a monitor program (in bare Z80 machine language... not Assembly.... the actual opcodes) that was a little under 2K.  Why yes, the train was a terrible soul-crushing thing.

I got a couple "retro computer" type kits, and they were neat, but there was always something lurking in the background.... telling me I didn't really get it.  ...not really.  Most of these machines, like the RC2014, are kinda limited in scope, and while others have done cool expansions to them, I was hitting a roadblock.  The "working" part of the system was a sort of barrier.  For fear of breaking what worked, I didn't dare muck about.

Then, in 2020, I caught wind of Ben Eater's excellent series of videos about building a 6502-based computer from the ground, up.  Like Sir Robin at the Bridge of Death, after seeing Galahad's triumph, I thought, "This is something I could do."  I ordered Ben's 6502 kit, and got cracking.  I was having some trouble keeping all the wiring straight on the breadboards, and I was getting frustrated... I didn't know whether the problem was my wiring, the breadboards, or faulty parts.  From a number of sources, I'd become aware that there was a decent Open Source "Electronic Design Aid" -- KiCAD, and there were board houses out there that could do low-cost prototype manufacturing... so I put ham and cheese together, and went about re-implementing Ben Eater's design in KiCAD, and getting some boards made.  After finding and fixing the error I'd made on the board (there's always one, isn't there?), it was great.  I could actually do things.  I could write programs in Assembly, burn them to an EEPROM, and they'd actually work.

At this point, I'd arrived at the same sort of frustrating point I was at with the "retro computer" kits.  If I was going to move forward, I'd have to take the risk of wrecking it.  But, there was one significant difference.  I had made everything that worked, and I had spares.

I was finally free to think creatively and solve problems (which, I readily admit, had been solved countless times before, far more elegantly, by numberless people).  Like so many other projects which had engaged and held my interest, I had a basic set of essentially indestructible tools, a practically limitless supply of resources, and only the laws of physics to constrain me.  I could play.  I could try things out.  I could fail.  

So, I thought about the itches that needed scratching.

One thing that bothered me about the commercially-available "home computers" was that they were kind of closed black boxes.  Between FCC regulations, product safety regulations, building down to a cost, and various other pressures, machines like the Atari 8-bits, and the Commodores were kind of closed off and inaccessible to me.  Here's your feature set.  Like it.  The Apple ][ seemed more open, but was obscenely expensive, and, therefore, off-limits.  Many of the retro kits were even more constrained.

I wanted a lab computer.  Something I could pull apart and rejigger as I saw fit, to serve whatever purpose I had in the moment.  I wanted a machine that would afford me a lot of IO possibilities, because who knows what I might want to do with it?  Something like one of those old Radio Shack "hundred and one electronic projects" kits, but not lame.  I decided it should have a good, broad set of base peripherals - A console, some serial ports, a couple VIAs, I2C and SPI, storage, so that you could stand up a really usable computer... or pare it back if need be, to save space or power, or whatever. I also thought it should have some expand ability so an end user could put in whatever they want.

I wanted to go through the process of building up an operating system.  What kind of masochist would subject himself to such a thing?  This kind, apparently.  Device drivers, APIs and so on.  I wanted to build those things, so I could really understand what's going on under the hood.

People have asked me about graphics and sound and what games I want to be able to play on it.  For me, the goal is not to play games on the RIBBBIT65.  I have a Nintendo Switch Lite for that.  The RIBBBIT65 *is* the game.

So, today, the RIBBBIT65 is on its way.  I have a good, stable core machine, and an IO platform on which to build something useful.  I have a decent Monitor program, and I'm working on an IO handler to abstract the various underlying peripherals.  There are design aspects which folks have told me remind them of the BBC Micro, which I suppose is flattering, as that's a highly-regarded machine for its time.  

I have a plan to do a version of the RIBBBIT65 in a Mini-ITX form-factor to allow more "hands off" use of the machine, as well as unifying a "bench-top" version, where the guts are all accessible, but it mechanically fits together better than the boards I've done so far.

I'm thinking of doing a hand-held "pendant"-style console device for interacting with the R65 Monitor, with, say, a 24-key keyboard, and either a character LCD or 7-segment LEDs to show addresses and data bytes.  It would speak a stripped down dialect of the monitor command set (for example, "page dump" wouldn't really work on a 6-digit LED)

I'm not just building a computer, I'm finally building understanding.  The RIBBBIT65 is on the verge of being a mere byproduct... an artifact whose significance lies in the research and trial and error that bought me the understanding to build it in the first place.  This is far more satisfying than any work I've done for money in the last 20 years.  It's certainly not for everyone.  But it is for me.


No comments:

Post a Comment

RMVOD r0.9.3 is here!

 Hi folks!   Well, TV Series Playlists are here, as well as some fixes to Recommendations.  Here are the release notes: RIBBBITmedia Video O...