February 2022

27Feb22

Pupdate

As we neared the end of the month it was finally warm enough for the boys to walk without their coats, and whilst they might look cute and snuggly in the coats they seem more energetic and free without them.

Pi Stuff – MWC Demo

All of that time spent playing with Raspberry Pis over the past decade is now being put to good use at work. The @ Company has been working with Internet of Things (IoT) connectivity specialist ZARIOT to provide end-to-end encryption for things, and we’ve been putting together a demo for Mobile World Congress (MWC). The demo system is a Pi 4, SSD, 4G/LTE HAT, TFT HAT and MAX30101 sensor. It lets us read heart rate and O2 saturation from somebody’s finger, and send the data to @ Platform apps. At the IoT end the @ sign private key can be stored on the SIM card (since there’s no secure element like we’d usually use on a phone/tablet). If you want to see it without making the trip to Barcelona, I did a quick preview on Flutter Hump Day.

MAME stuff

I already wrote a couple of posts about the Grant Searle Simple Z-80 Machine on MAME and RC2014 Mini on MAME, but things have moved on quite a bit since then. My upstream pull request has led to a lot of changes, and a lot of learning. I’m now planning to do a series of posts on that process, so hopefully it’s easier for others to find their way into MAME development.


TL;DR

Getting an RC2014 Mini working based on the Grant Searle Simple Z-80 Machine driver was pretty trivial, but it’s been enough to get me going with MAME development and persuade me to try some other things.

Background

I know there are already emulators out there already for the RC2014, I’ve used EtchedPixels/RC2014 a bit in the past. But I’ve seen people doing cool projects with MAME, which already has a broad range of hardware emulated, and I thought RC2014 would provide an easy on ramp. I chose the Mini version, because that’s the first RC2014 I made, and it’s pretty self contained.

VERY similar to gsz80

As I mentioned in Grant Searle Simple Z-80 Machine on MAME there’s already a ‘driver’ in MAME for a machine that looks much like the RC2014, because Grant’s Simple Z-80 provided inspiration for the RC2014.

What I hadn’t realised is that (for 56k BASIC at least) the RC2014 uses the same ROM as Grant’s machine. So from a MAME perspective there’s really no difference.

I created a revised rc2014mini.cpp driver, but it’s pretty much a search/replace of gsz80 with rc2014mini.

It did at least give me a chance to try out the tooling chain….

Building

I installed the Windows combined 32-bit/64-bit tools from mamedev.org/tools and followed the installation instructions there.

Phill recommended the following changes, which I also put in place:

set ARCHOPTS=-march=native -fuse-ld=lld
set OVERRIDE_AR=llvm-ar
set IGNORE_GIT=1
set PROMPT=

With my fork of MAME cloned (takes a while) and my driver file created I was ready to build it:

make -j 4 SOURCES=src\mame\drivers\rc2014mini.cpp SUBTARGET=rc2014mini

This created an rc2014mini.exe for me, which didn’t work because I’d forgotten to add anything to mame.lst. Once I added this:

@source:rc2014mini.cpp
rc2014mini                      // RC2014 Mini

I had an executable that worked:

ROM

As the ROM is just the same as gsz80.zip I could just rename that (and gsz80.bin) inside it. Though I went through the motions of downloading K0000000.hex from the RC2014 Factory ROMs page on GitHub, then converting it as before:

objcopy --input-target=ihex --output-target=binary K0000000.hex rc2014mini.bin
zip rc2014mini.zip rc2014mini.bin

Next…

I’d like to try getting RC2014 boards hooked up, particularly the TMS9918A Video Card for RC2014.

But I’d also like to get a TMS9995 system working in MAME. There’s already an eval module (evmbug.cpp) driver, which should give a good starting point for a breadboard system, though I’m a little worried that the TMS9902 serial driver isn’t in the shape it needs to be.

So far I haven’t done a pull request to upstream MAME for the RC2014 Mini driver, but I might do that soon.

Update

23 Feb 2022 – I did an upstream pull request, which led to me being asked to fold the changes into gsz80.cpp rather than having a standalone driver for RC2014. I also realised that the Mini should only have 32K RAM, and the corresponding BASIC, and I’ve added the Small Computer Monitor (SCM) ROM.


TL;DR

I’ve been wanting to try emulating some RC2014 stuff using MAME for some time, and I think I’ve found my way into it with the MAME driver for Grant Searle’s Simple Z-80 Machine.

Background

Back when I was making my TMS9995 on RC2014 system part of my adventure into the lands of TI-99/4A fans took me to the Multi Emulator Super System (MESS). But MESS has been folded into MAME (once Multiple Arcade Machine Emulator) since 2015. I thought it would be cool to emulate some RC2014 stuff on MAME, but I found the project impenetrable and just couldn’t figure out how to get started (not helped by the fact that my C++ skills are almost non existent).

But then the London Retro Computing Meetup held a Using MAME as a development tool event, which showed how to get started.

Almost by accident, I noticed that Grant Searle’s Simple Z-80 Machine is now part of MAME (thanks to Frank Palazzolo). For me this was like finding the Rosetta Stone. Grant’s system is the basis for Spencer Owen’s RC2014. So if I can get the Simple Z-80 Machine going then I can probably hack together something RC2014ish.

Also Phill did a great job in the meetup of showing how to get started with MAME development, using a previous meetup project – Tom Storey’s Z-80 clock.

ROMs

MAME doesn’t come with the ROMs needed to run the machines it emulates. That’s just too much trouble from a Copyright perspective.

The source file for gsz80 notes:

ROM mapping is trivial, this binary was created from the HEX file on Grant’s website

So I grabbed Grant’s bundle, which includes ROM.HEX

At first I extracted the binary via my MiniPro EPROM programmer app. But then I thought there must be an easier way than that, and there is. On my WSL2 Ubuntu command line I used:

objcopy --input-target=ihex --output-target=binary ROM.HEX gsz80.bin

Then confirmed that the file was correct:

$ sha1sum gsz80.bin
e843e597ca6c319002dbf191528998e654656736 gsz80.bin
$ crc32 gsz80.bin
6f4bc7e5

The binary then needs to be put into a zip file for MAME to find it properly:

zip gsz80.zip gsz80.bin

Running it

With gsz80.zip copied to my roms directory I ran:

mame gsz80

And the system sprang to life:

Next…

I’m going to have a go at hacking something together to use one of Spencer’s RC2014 ROMs.

And after that I may have a go at doing an emulation of Stuart Conner’s TMS 9995 Breadboard or PCB System.


January 2022

31Jan22

Pupdate

Back to school for the rest of the family means back to the normal routine in the office with me for the boys.

Covid recovery

The PCR test that I went for on New Year’s Eve came back void, so I had to go for another, but sure enough I had the ‘rona. Under the new testing regime introduced a few days later I wouldn’t have even had to go for a PCR test.

I didn’t have much in the way of physical symptoms, but the brain fog that many people mention came along. And headaches. I don’t get headaches, but it felt like if I tried to think too hard I was pushing my brain past its limit. It was like my red line had dropped from 6,900rpm to 2,000rpm.

I’ve read a few accounts of people pushing themselves too hard too soon, so I backed off my normal exercise regime until I felt properly well again. Thankfully once I restarted exercise the headaches receded.

Vintage Port

When $son0 was born my colleagues in Global Web Services (GWS) bought me a bottle of my favourite vintage port – Dows ’80. Since it was (almost) 21 years old then, I decided to keep it for his 21st birthday.

It was really good. It was also nice to hear from many of the folk from GWS in what turned out to be my most engaged thread ever on LinkedIn.

Streaks

After some frustration in December it was good to get things back on track. So I finally got that Stack Overflow badge:

And the Apple Fitness stuff is back on track:


Dear Mims Davies,

I write to express my disgust at the Prime Minister hiding behind Sue Gray’s enquiry.

He may have spent his over privileged lifetime being able to pay people off, or litigate his way out of trouble. But he can’t pay off the British public, and litigation won’t work this time around. Nobody cares whether Gray can find a technicality that lets him off. He’s done the wrong thing, and if he won’t fall on his sword it’s time for you and your colleagues to pull out the knives for the 1922 Committee process.

Yours sincerely,

Chris Swan


December 2021

31Dec21

Pupdate

Max’s second Christmas and Milo’s first, the outfits came courtesy of their mums’ doggy mum, and caused much excitement when they arrived as they brought the distinctive smell of her house.

A very Covidy Christmas

As I was drafting this post I left myself a note to comment on getting a booster jab, but that all got overtaken by events.

My wife called from outside the school where she teaches on Thu 16 Dec to say that she’d tested positive on a lateral flow test, and needed to book a PCR test. We weren’t at all shocked when the confirmation came through, but our plans to host her family for Christmas were ruined.

Two days later it was my daughter’s turn, two days after that my son’s. We scheduled Christmas 2 for Sun 2 Jan.

And now that won’t be happening as planned either, as I’ve just had to go for a PCR test. How it took me two weeks in a house full of infectious people to succumb will probably remain one of the mysteries of the universe.

Streaks

When my daughter has previously commented on keeping up app streaks whilst we’re on holiday I’ve scoffed at how silly it is. But my streaks are different…

Apple Fitness

Since early on in the pandemic I’ve been closing all three circles for move, exercise and standing, and doing a workout each day. Not travelling all over the place has been very good for consistency.

But on Dec 27 I neglected to do a top up VR workout after what must have been a not quite sufficiently vigorous dog walk, and that’s the end of a 651 day streak.

Stack Overflow

I created an account on Stack Overflow in 2014, and then found that I couldn’t do what I needed to do without jumping through many hoops to earn sufficient reputation. So it’s been fallow since. This month I found a topic to answer questions on (GitHub’s GraphQL API), so I’ve finally started earning some reputation and badges.

The ‘enthusiast’ badge for visiting 30 days in a row seems like an easy ask, but maybe not over the holidays. I’ve managed to drop the ball twice already.

iPad SSH

Just like the best camera is the one you have with you, the best device is often the one in your hands, and when I’m away from my desk my iPad is usually in reach. My main use of SSH from it is checking on my Raspberry Pi Sous Vide, but there are times I need to jump onto other hosts.

iSSH was one of the first apps I bought for my iPad 2, and it was excellent, but sadly the maintainer threw in the towel on keeping up with iOS updates. So when I got my iPad Mini 5 I started using Reflection, as it was free an perfectly adequate.

Sadly it seems that iOS15 has broken Reflection, making it very forgetful of keys and connections :(

So… time to try something new. I’d seen recommendations before for Blink Shell, and it’s a one off purchase rather than a subscription. I’ve not done anything to push it yet, but so far so good, it seems easy and intuitive.

Always Be Celebrating (ABC)

There’s a lot of dire stuff going on, but there’s also some great stuff happening, and it’s good to celebrate even the small victories life throws.

I’ll definitely be raising a glass of something fizzy to toast the start of 2022.


TL;DR

My ad blocker has been hiding things from me. Mostly things that I don’t want to see. But what we do see, and what we don’t see, is all part of crafting bespoke realities.

Background

My friend Ben Ford frequently says “What we perceive as reality is an internal simulation of our interaction with external events.”

Are we living in a simulation? Yes and no. Not a simulation, but billions of simulations, as each of us roams the planet with a different simulation running in our heads[1].

Sam Harris has done a number of interviews related to this on his podcast, and I’d particularly recommend ‘The Future of Intelligence‘ with Jeff Hawkins and ‘The Limits of Self Knowledge‘ with Stephen Fleming.

Until very recently (in evolutionary terms) at least those simulations were being fed from the same thing – the physical reality of planet earth. But now they’re not. The simulations are being fed by the screens in front of our eyes and/or the buds in our ears, and those things are serving up bespoke realities. Though I shudder to recommend anything to do with Joe Rogan, it’s a topic he takes on very well with Tristan Harris (of ‘The Social Dilemma’ fame) and Daniel Schmachtenberger in episode #1736 of his ‘experience’.

This is also a bug/feature of ‘Filter Failure at the Outrage Factory‘.

A glitch in the matrix

A little while ago I caught up with Charles Humble for lunch, and as always he was on the lookout for cool stuff for the Container Solutions blog. One of my suggestions was Swim.ai, and perhaps getting their CTO Simon Crosby to write something about it. Here’s the resulting post – Analyze Then Store? You’re Kidding Right?

As I started reading I was struck by something missing in the second sentence:

But the recent at Facebook

The recent what at Facebook? They’ve been so embroiled in scandal recently there’s plenty to choose from.

Charles is generally a top class editor, so how had this slipped by? I asked him, and he promptly replied with a screenshot from his phone of the article showing that the sentence read ‘But the recent name change at Facebook’.

I tried my mobile, and saw the same.

Then I tried another browser on my desktop, and the text was missing again. Computers are weird.

Use the source Luke

Time for a look at the source:

<p>If I bumped into Zuck’s avatar at the virtual water cooler I’d quit on the spot. But the recent <a href="https://www.googleadservices.com/pagead/aclk?sa=L&amp;ai=DChcSEwj13ObC_o70AhWGMyoKHd8TDxkYABAAGgJ0bQ&amp;ei=DVuMYfrcEs3e2roPg5GpyAU&amp;ohost=www.google.com&amp;cid=CAESQeD22EXOHXjBXtrAaLC0wn83SPHxjiEKX6UUkWvBKn-InbEn-AM1NXmThU8fqrpg9hlqxHPPp-zk5R237tZ_noAW&amp;sig=AOD64_1FVDus-IxiN-yxQFfAnBNn1UgMAw&amp;q&amp;sqi=2&amp;adurl&amp;ved=2ahUKEwi6l9_C_o70AhVNr1YBHYNIClkQ0Qx6BAgCEAE">name change</a> at Facebook,

‘name change’ is definitely there, but wrapped in a link to Google Ad Services, which my ad blocker (uBlock Origin) has chosen to drop from the page.

Targeted advertising is a defining part of our bespoke realities, and in this case the hole in the page where the advertising isn’t showed up as a wrinkle in my bespoke reality.

Conclusion

‘Surveillance capitalism’ is serving up bespoke realities to our eyes and ears. Even if you take measures to block it out, that still ends up crafting a different sort of bespoke reality. And then we take that input and feed it into our own little simulations of what’s going on.

Note

[1] Could the substrate for all those simulations also be a simulation? Maybe. Does it matter? No. I’ve run containers inside VMs. VMware will tell you that due to better scheduling their VMs run containers faster than bare metal.


November 2021

30Nov21

Pupdate

It’s been pretty mild for the season, but as we passed the middle of the month it was time for the boys to start wearing their coats out on walks.

I’ve bought a couple of extra latch clips to poke through the hole in their coats from their harnesses, otherwise it’s a right faff putting their leads on.

Heat pump

Back in April I got a quote for a heat pump system from local specialists H&D. It then took ages to get an electrician to put the external supply in place, then a further wait for an install date.

I went for a Daikin multi split system, with outlets in the kitchen/lounge/dining room (for heating in the winter), master bedroom, and office (for cooling in summer). Thankfully it was all done before the cold weather came, so we’re now able to enjoy a warm room in the evening without having to put a fire on.

The installers did a really neat job, inside and out:

Heat pump outside

Though there’s no hiding the ugliness of the external unit.

I’ve yet to see the impact on my electricity bill, but it’s claimed that the pump will give 3-4x input energy as heat, so I should get 2kW of heating for 500W of electricity.

I now need to wait for the summer to see if the cooling is effective and quiet.

So far I’m impressed with the system, but it does raise some practical questions about the proposed wider use of heat pumps in place of gas boilers…. That pump is ~6kW, my boiler is 24kW, so I’d need 4 pumps to produce the same output, which is a LOT of big boxes on the wall outside. There’s also a prevailing view that prices will come down and efficiency will go up as more people buy them, but these things (whilst new to most Brits) are commodity items in warmer climes that already sell by the millions.

Green Earl Grey Tea

When I gave up coffee in 2004 Twinings were doing a big marketing push for their flavoured green teas, and so I’d often get samples thrust at me on my commute to the office. It worked, I found that I really liked their Green Earl Grey. Sadly Twinings don’t do it any more, but thankfully Waitrose were selling an (almost) identical blend, so I had a reliable supply of my daily starter. Until they stopped, and my stockpile ran down…

I’ve been able to get some of Taylors blend, which I switched to the first time Twinings stopped making it, but it’s not as nice (too much green, not enough Earl Grey). So I’m now using the Nothing but Tea blend, which comes loose, meaning I have to make a pot each morning. It’s a faff, but worth it for the taste (though that’s not notably better than what I’d been getting from the Waitrose blend). I’d switch back to Waitrose (or Twinings) in a moment if they started making it again.

DIY jobs

Our house is coming up on 20 years old, so we’re at a stage where things routinely wear out or break. This month it was…

Garage door

The wire on one side of our Cardale door snapped. Thankfully pattern replacements are cheap and readily available. I was able to get CD45 cones and cables for £7.95 from Amazon, along with a punch to remove the old securing pins. Getting the parts was the easy part though. Fitting them was a bit of a nightmare, firstly because the pins took a LOT of hammering to remove, and then I had to release the tension from the spring system to allow the mechanism to be moved away from the wall to switch cones; followed by lots of re-tensioning afterwards. Hopefully it will be another 19 years before I need to do that again, though I fear the door itself might rot before that (despite my best efforts at repainting every few years).

Toilet seat

Last time (about a decade ago) the hinges went on the Roca Giralda seat in the downstairs loo I replaced it with the fancy ‘soft close’ version, which if nothing else seemed more robust than the regular version. But it turns out that the hinge caps are made of plastic, and they don’t last for ever. I thought I’d need another whole seat assembly, but they sell replacement (metal) hinge caps so I just got a pack of those (at roughly a third of the price of a whole seat). I suspect those new parts might now outlast the other components around them.

Aerial Amplifier

The TV in our bedroom started playing up, first with dropouts, then no signal at all. Although the TVs in other rooms still seemed OK it became clear that the LabTech distribution amplifier installed when the house was built 19 years ago wasn’t performing as it should (as bypassing it returned a perfect picture again). This was the easiest fix of the month, a new SLx Amp arrived next day from Amazon, and it was a few minutes work to unplug the old one then wall mount and plug in the new one.

Of course I took apart the old amp to see what had gone wrong with it. Nothing obvious. No burning or bulging capacitors. It made me wonder what makes a bunch of mostly surface mount transistors ‘wear out’ over time, and it turns out the IEEE has the answers. Though if I was betting on it I’d go for the 7815 rectifier being the culprit, as it was (literally) taking all the heat.

Raspberry Pi

After 4 years since backing the Curious Chip Pip on Kickstarter mine (serial number 0030) finally arrived.

I’ve not had the chance to properly play around with it yet, but I can think of all sorts of things to do with a Pi powered device in a handheld gaming package

Aeron chair

I bought myself a used Aeron back in 2014, and it’s served me well. I got a second one a couple of years later for the loft conversion office, but that disappeared into my daughter’s room during lockdown. So there was a gap to be filled, and I work from home all the time now, and when I took a peek at the Herman Miller site they had a Black Friday Sale.

The new lumbar support system seems nice. Everything else is pretty much what I’m used to (including the slight axis wobble that I always thought was down to age with my used chair, but seems to be an inherent flaw).

Reading

I’ve read a LOT more fiction than usual this month.

Anne Currie asked me to do a launch day review of Heliotrope, which meant finishing Dystopia X and Mars Insurgent. When launch day came I had only just started on my advanced review copy. Things hadn’t been helped by the launch of Charles Stross’s Invisible Sun, though I devoured that in a matter of days – I’ve loved the Merchant Princes books and then the Empire Games sequels.

Back to Stross again now with Dead Lies Dreaming, which is off to a great start.


###
Letter #16 Delivered 28 Nov 21

Hi Craig,

I expect this will be my last letter to you by this means, as you look forward to your release in a few days time. Hopefully we can continue our dialogue by email, though I expect your time and attention for the next few months will be mostly on family and catching up on the things you’ve missed. Out of habit I’ve attached a reply sheet, though I’d be surprised if you have the time to reply. It was nice to get a bonus reply this week to one of my earlier letters :)

This week has been a nice return to normality after the disruption of getting an air sourced heat pump installed last week. The dogs just wouldn’t settle with the installers coming and going, which then made it hard to concentrate on much else. At least the system was in place before the recent cold snap. My wife’s very happy to return to a nice warm home after spending her day in a freezing classroom with doors open to the outside to keep Covid at bay.

Thanksgiving week is also a special time for anybody working with Americans as it means a couple of precious days without the interruption of meetings, which provides a good opportunity to focus on stuff and get things done.

My son asked me this morning what we’re going to watch now that Foundation season 1 has come to an end. I think we’re going to try Wheel of Time, as the reviews seem pretty positive, though I’m totally unfamiliar with the source material.

Apart from writing to you, last Saturday ended up being completely consumed with finishing Anne Currie’s ‘Heliotrope’ (the latest in her ‘Panopticon’ series of a near future post climate disaster world where society gets along with ubiquitous video surveillance). I was only 20% into the advanced review copy when my pre order landed, and I’m not sure I’ve ever read a novel so fast, but in the end it was a fun read, and I was on time for a launch day review. I’ve now started on Stross’s ‘Dead Lies Dreaming’, which so far seems to take the premise of his earlier ‘Laundry Files’ series – what if magic is real, and founded on a branch of maths, then we’d need a covert government agency to keep the lid on things – the Laundry; and then throws it at – what if the people in power got there by wielding paranormal abilities? Or put another way, what if Priti Patel really was an evil witch? It’s been very entertaining so far, and I can feel my engagement with it gathering momentum.

Best of luck for release day on Tuesday. I look forward to what you have to say and write.

Regards,
Chris


###
Craig’s reply 29 Nov 2021

Chris,

Well 5 days to go so my last message for you!

I am hoping that, when free, Julian will turn his attention to recovering freedom on the Internet. I share your analysis 100%.

It seems there will always need to be a primarily social or entertainment portal that can lead the way to political thought. Entirely high-minded initiatives just don’t tack enough of the population.

But attempts to use a similar model to Facebook and Twitter, minus the censorship (e.g. “Me We”) can’t get traction.

I don’t have a solution, just musing.

Craig.