Using a Raspberry PI Zero W to hold disk images for the BBC Micro

At Christmas I treated myself to a new machine, a BBC Master 128. It’s that new that it was manufactured somewhere between 1986 and 1993 – if you are into retro-computing you know what this is like.

Anyhow, this machine is in very good condition. It’s been refurbished with new capacitors in the power supply (something you must check on the BBC’s as they can go bang if you aren’t careful).

BBC Master 128 with GoTek drive to the left & another project sitting on top of it so ignore that 😉

It also came with a GoTek USB floppy emulator. This is a device that connects to the BBC (and others like the Amiga) as if they were a real floppy drive but instead of a disk it uses a standard USB stick which can contain images of the original disks. So many you could probably have a copy of every bit of software for the BBC micro ever produced on floppy on one stick!

Now this is perfectly fine if you have your software collection on it & rarely add anything but if you are doing any development and need to regularly add or update disks it’s a pain as you have to unplug the USB stick, put it in to your main development box, mount it, copy a 200K file (thats the capacity of a standard BBC DFS 40 track disk!), unmount it then plug it back into the drive.

You can tell it’s tedious and if regularly done could cause additional wear & tear to the contacts!

So to make this far easier I took a Raspberry PI Zero W and used it as the flash drive. In the above picture you can see a white USB cable in the GoTek, thats got the Zero on the other end of it.

If I needed to add or update a disk I can simply use SCP to copy the file to the pi and the GoTek then sees the new disk, I select it & the BBC can read it. From upload to opening it on the BBC can literally be a few seconds.

So, how to set it up? Well the MagPi has an article from about 2 years ago which tells you how https://magpi.raspberrypi.org/articles/pi-zero-w-smart-usb-flash-drive

This is a good article so I’m not going to repeat it here except you don’t need to do all of them & there’s a few errors in that article which I will repeat here:

  • Step 4 is not needed if you used a minimal Raspbian image – i.e. no need to use the full desktop one, use the lite image as the base.
  • For step 6 use the GoTek as the power source not the TV as used in the article & yes for now it is being powered solely by the drive it’s being used on.
  • You can ignore Step 9 as we won’t be using multimedia – you could use a bbc disk image here instead
  • Step 10 has the errors. Here it mentions gmassstorage this is wrong & I think it’s the formatting on the site that’s broken it. Replace all references to that with g_mass_storage not the _’s, some CMS’s use _ to say underline which you can see on that page.
  • Steps 11 & 12 are optional – I did them but don’t use them

That’s effectively it, except a comment about powering the PI (which is in step 6 of that article).

Now I am using the GoTek to power the Pi – so there’s just a single USB cable from the GoTek to the usb port on the PI (not the PWR IN). This is fine as my GoTek has it’s own power supply.

However if you were to use an external supply for the PI, then you must cut the red wire inside the micro USB cable else you’ll feed additional power from the PI to the GoTek as well as the PI suddenly having two 5V supplies feeding it – which will cause damage to both devices!

What Could Have Been, and Why It Probably Should Be Again…

Interesting thoughts on if the old 3rd rail 750V supply to trains should be replaced with the newer overhead wires – although the latter do get pulled down a lot

It's Sunnier On The Southern Region

Twitter can be a very handy thing, and is full of interesting & knowledgable people*. One of the many feeds I follow belongs to @TurnipRail, the Twitter handle of Dr. David Turner, the Associate Lecturer in Railway Studies at the University of York. Today he tweeted this little gem:

* – I should note that Twitter also has it’s fair share of barking cockwomble fucknuggets. I’ve met a few of ’em (fortunately not in person.)

Yes. Wires. The Evil Electric Knitting. Can you hear my blood curdling, dear reader? The thing is (horrors) the LB&SCR were thinking ahead, and they were on to a good thing. Revenue on the commuter routes between Victoria and London…

View original post 925 more words

Getting up an ADS-B receiver on a Raspberry PI

This post describes how I setup a basic ADS-B receiver on a Raspberry PI Zero W using a USB RTL2832U based Software Defined Radio so that you can see any ADS-B equipped aircraft in your local area and present it on your own website.

Continue reading “Getting up an ADS-B receiver on a Raspberry PI”

(Almost) time to say goodbye…

Well done Oppy, you did way more than originally planned, but we knew this day would eventually come… RIP

The Road To Endeavour

oppy 1f b2

This is a very hard post to write. It’s one I’ve been dreading, for years, literally years, but there’s no putting it off any longer.

Overnight last night the final, Final, FINAL ‘Wake up, please?’ commands were sent to Opportunity, the absolutely last throw of the last dice. Its been 8 months since we last heard anything from her, and even as those last commands were being beamed from Earth we all hoped against hope that Oppy would stir, and bleep back a last minute “Ha! Had you fooled! Surprise!!” reply –

But Opportunity didn’t answer.

So.

Barring some kind of miracle it looks like this evening’s (7pm) NASA press conference will be for the announcement that Opportunity’s mission is finally over. This day was always going to come, and it’s important for everyone to remember that Oppy – which we hoped would last for 90 days after landing –…

View original post 1,263 more words

Publishing messages to RabbitMQ from PostgreSQL

One part of the rewrite of all of my sites is to make dynamic content more real-time, specifically using Websockets, so that content is as close as live as it’s possible. For this I’m using the current RabbitMQ release running within a docker container with the web_stomp plugin enabled. With this I can then have a webpage connect over websockets directly into the message broker and listen for messages.

Now the problem. Most events are defined as some change within a database so I now need a method to allow a database trigger to be able to send a message to RabbitMQ without hindering performance – more so when some tables are being updated 20-40 times a second.

Fortunately PostgreSQL provides us with asynchronous notifications via the LISTEN and NOTIFY commands, so we can add a notify command to the trigger to a named queue and then have a separate process listen to that queue. All I needed to implement was an application that did the listening. Continue reading “Publishing messages to RabbitMQ from PostgreSQL”

Slowly catching up with things…

It’s been a busy 6 months, trying to update all of my websites whilst commuting etc & it’s taking a long time especially as the front end’s are being done from scratch. If someone ever tells you it’s simple to move from a classic website to one using microservices, don’t believe them – it will take some time.

Anyhow, progress is progress. Here’s the current status:

  • The blog is now on it’s own domain, new layout, still not happy about how it looks though.
  • Documentation and API’s are now on the area51.onl site with more being added as I finish them.
  • departureboards.mobi is almost complete, just got some minor layout issues to solve.
  • uktra.in is next. Most of the backend stuff is done, just got to port the CMS over and rewrite the timetable search & real time search pages.
  • map.lu is running to the point it’s now providing maps again to the other sites.
  • maidstoneweather.com & the weather station are still sadly down. I’ve got the replacement electronics ready but again it’s finding time to fix it – it’s only taken a year so far :-S
  • trainwatch.uk is still dormant – not found a use for that domain yet.

So there’s still plenty to do. When you spend 20+ hours just commuting on top of the working week it’s a problem, but I’m getting there.

John Cleese’s “Letter to America”

This was from 2008 but again it applies to today’s potentially disastrous result

Things Are Looking Up...

Originally uploaded by Browserd.
Dear Citizens of America,

In view of your failure to elect a competent President and thus to govern yourselves, we hereby give notice of the revocation of your independence, effective immediately.
 
Her Sovereign Majesty, Queen Elizabeth II, will resume monarchical duties over all states, commonwealths and other territories (except Kansas, which she does not fancy), as from Monday next.

Your new prime minister, Gordon Brown, will appoint a governor for America without the need for further elections. Congress and the Senate will be disbanded. A questionnaire may be circulated next year to determine whether any of you noticed.

To aid in the transition to a British Crown Dependency, the following rules are introduced with immediate effect:

1. You should look up “revocation” in the Oxford English Dictionary. Then look up “aluminium,” and check the pronunciation guide. You will be amazed at just how…

View original post 745 more words