Tuesday, May 4, 2021

Backplate Musings

My original plan for the LINK_01... my first homebrew computer... was to ultimately have it built using a single PCB. But the more I think about that decision and the limits that would impose on the machine the more I want to go another direction.

I'm heavily influenced by the RC2014 Z80 based homebrew machine which has been going since 2013... and the backplate design which the RC2014 uses goes right back to the birth of home computers. Breaking a machine down into discreet modules and making them all connect to a standard connector is a great way of managing both development and post-launch expansion. As long as the backplate supports enough signals so that you don't limit yourself the sky is literally the limit. The extra connection length may mean that you can't crank the speed up quite as high as a single-PCB machine, but maximum performance isn't something I'm aiming for with this machine... I just want to get something working which I can build upon.

I'm also considering having a second backplate system for connecting external modules to the remaining pins on the Raspberry Pi Pico. Why hardwire the VGA circuit to the Pico when I can modularise it. The final machine would have two sides to it... the 5V 8-bit side and the 3V Pico side... each with their own modules.

So that's the current plan. The first step is to get the backplate design and modules working using stripboard (veroboard)... and the limit for that is 34 lines... which should be enough to get me started with a simple 6502 based machine.

I'm still waiting on a few parts... and I've still not nailed how my shifter array is going to give the Pico R/W access to the main bus... but I'm zeroing in on a plan piece by piece.

For anyone interested here is a link to the excellent RC2014 project.
Here is a video of Steve Furber, from Acorn, talking about his old prototype backboard-based machines from the 70s....

Thursday, April 29, 2021

Electronics Tinkerings

 I'd like to write some pithy blog articles about what I've been up to with the old electronics but I've not got the energy so I'm just going to post some pictures instead... here goes...

My first actual circuit that does something. This one drives a simple 1BPP VGA monitor signal using a few pins on a Pi Pico.

First shot of the LINK_01 BBC (BreadBoard Computer)... Here we have the Pico, which is in control of the whole thing, the VGA out, a bank of 3V3 to 5V voltage shifters and a bank of bi-directional shift registers, which I plan to use for letting the Pico read and write to RAM. There's a 65C02 up there too, buried behind my debug LED bank.

Initial work on adding the busses to the design. 16 bit address, 8 bit data and whatever else I think is worth bussing.

Now with added 8K EEPROM and RAM... I think it's the old 8K RAM I started with which has now been swapped out for a 32K one. You can see the bus sea-monstering it's way across the breadboards... I got a bit sick of the LED debug bank too and decided to use an Arduino Mega with an LCD display... this is V1. Building V2 would be a little side project on the way...

And here is V2... I bought a custom Mega shield off Amazon and soldered it all up so it's a bit neater. Added a couple of buttons so I can select stuff and a contrast knob. The display looks a bit funky here because it's changing quite fast and the light is shining right on it, which freaks it out a bit. Works though... I can snoop the data and address bus and also using the SYNC bit can show which instruction the 6502 is fetching. This data is also sent back to the Arduino serial link if you have it connected via USB. Quite pleased with that little side project.

Another side project - this time soldering. In my quest to become a competent solderer I need stuff to solder. And this calculator kit gave me a couple of hours of soldering practice and was an awful lot of fun. Recommend !

And finally a little video of it running... more stuff soon.

Monday, September 3, 2018

Rust, week 3

This week I are mainly been liking...
  • play.rust-lang.org
  • The Rust books are written using rustdoc - I like the 'eating your own dogfood' philosophy, and the Rustlang folks are certainly eating it.
  • Attributes... a clean way of doing meta stuff in your code. 
  • New Rustacean podcast - fabulous podcast about learning Rust. Started listening to these during my daily commute - grab every minute you can to learn new stuff.
  • Really good talk about driving a GUI system with Rust by Raph Levien

Friday, August 24, 2018

Rust, week 2...

The continued, albeit slow, adventures of someone who's been coding for 37 years and is now learning Rust...

Things I like about Rust, pt2...
  • std::option::Option - no more Null... force error check at point of creation
  • Inbuilt testing framework
  • RustFmt - code formatting !
  • Everything is on Github... and I mean everything... fantastic !
  • Safety is not sacrificed for simplicity. Yes, Rust is a complex language, but that's because decisions have been made which puts safety and control first rather than convenience.
  • The team provide editor integration plugins... including the mighty VIM !
Things I don't like about Rust
  • Opening curly brackets on the right... argh ! I know it's just convention, but argh ! 
There's something quite exciting about the Rust community... the deeper I delve into the language and how the project is organised the more excited I get. One major problem with older languages like C and C++ is that the ecosystem around how you develop software in those languages is a bit of a free-or-all. How may build systems are there out there for C++ projects ??? Loads... Code formatters ?... loads. Library managers...loads...etc. The C++ language itself may be well specified but the ecosystem in which it lives is all over the place. Modern language designers are not making this mistake.

Rust comes with a suite of tools to standardise the ecosystem of the Rust language... and this is a good thing. Go does the same. Having standard ecosystem makes the heavy lifting around learning a language much easier. If you want to buid a Rust project you plop yourself into the root of the project and type 'cargo build'... that's it. You're not mucking about with configs, makefiles, cmake or any other custom build system. This gets a thumbs up from me.

Anyway, more next week as I get further through The Book and keep prodding around in rustlang.

Saturday, August 18, 2018

Rust, week 1.

I've started looking at Rust again. I had a quick try of rust about 18 months ago when I was looking at modern alternatives to C++. At that time I learned a bit of Rust and also some Go. Both languages impressed me but to be honest I liked the feel of Go more... mainly because it was simpler to learn.

Time has passed and my mind has wondered back to Rust. This page is a scrap book of thoughts about Rust during my first week back.

Things I like about Rust...

  • Built-in a build system (cargo)
  • Immutable by default
  • Explicit data ownership semantics
  • Built-in documentation about the language and compiler errors
  • Sensible type inference
  • External module dependency versioning makes sense
  • No implicit bool conversion
  • Descriptive error reporting
  • Tuples !

Things I'm not sure about... note I'm not saying these things are bad... just that I'm unconvinced at this point
  • Allowing variable type changes via shadowing
Progress reading 'The Rust Book' - 6.1 Defining an enum.

Documentation is good and the community seem pretty tight and to know what they are doing. I've also watched a fair few Rust talks on YouTube now, which are easy to find. So go watch them !

More next week.

Tuesday, July 31, 2018

Windows UI Fail... Setting a New Password

I turned on my work PC this morning to be greeted with the 'Your password has expired, please enter a new one...' screen. OK, hit enter to be taken to a new screen with three text entry boxes. The top one labeled 'old password' was already filled out for me - good. The next two were labeled 'new password' and 'confirm new password' or something very similar... I can't remember verbatim.

The text entry cursor was already set to the 'new password' box so I typed in my new password and hit enter...

'ERROR: Passwords Don't Match'

Of course they don't match - I've only entered one you stupid machine. OK, press enter to try again. This time my old password was not filled out for me for some reason, so I entered my old password but this time, using my experience of how stupid computer UI's can be, rather than hit enter to complete my old password I pressed tab... this took me to the next text entry box... new password.... tab... new password again... then enter.... ah, now it's finally accepted it.

So what's the lesson here ? How on earth are new users meant to know that you need to press TAB to move to the next text entry box, and that if they do hit ENTER instead... as they do all the time... Windows will throw an error back into your face.

Gah, are UI designers still so clueless as to let this happen after all these years ??? So annoying and yet so easy to fix.

Backplate Musings

My original plan for the LINK_01... my first homebrew computer... was to ultimately have it built using a single PCB. But the more I think a...