“Zelda IV”

Funny story. About nine months ago, Ian Higton, one of Eurogamer’s video guys blocked me on Twitter because he posted a video that had the wrong aspect ratio and I tweeted #stopaspectratioabuse at him. Fair enough, but it’s a valid crusade. It’s also not like there’s anything else going on in the world that is a bigger cause to work with anyway.

But then last week, Ian needed my help. But he’d blocked me! Oh noes!

He was after scans of an issue of Total magazine from the 90s, specifically the “Zelda IV”, now known as Link’s Awakening, review. And since I have scans of almost every magazine known to man from that era, I was his only hope (well, until someone else piped up with their own copies I suppose).

He was putting together a video and needed them for it. Thankfully word got to him, he unblocked me, and we all lived happily ever after. Here’s the video (with the reference to me at about 5:53 in):

Crayon Syntax Highlighter broken on WordPress on PHP 7.3

When I came to post the previous post on my blog, I found that my host’s recent upgrade to PHP 7.3 broke what seemed like everything. Turns out it’s just one plugin – Crayon Syntax Highlighter, which is really useful for styling code in posts.

Unfortunately, the developer hasn’t updated his plugin in three years or so, and it seems to be changes to how regex is used that has broken it. You may get the same error I did: “PHP Warning: preg_replace(): Compilation failed: invalid range in character class”.

The quick fix is bin the plugin, but obviously I’d still like to use it. Thankfully, some other people have taken it upon themselves to release a fixed version, which you can get from here: https://github.com/Crunchify/crayon-syntax-highlighter/releases

Deactivate the current Crayon plugin (don’t delete it as you’ll have to configure everything again!), install this one (manually – upload the zip from that link to your site), and enable it. Once confirmed working, you can delete the old version of the plugin.

Resizing a Linux partition running under Hyper-V

We’ve all been there. Setting up a new machine and giving it a 20GB hard drive because it’ll literally only need 4GB ever and then, two years later, it’s somehow full and won’t boot. Unlike Windows based guests on Hyper-V, which can have their drives resized easily by the Hyper-V tools, Linux guests are a little different.

You can certainly resize the disk image in the same way (turn the VM off, choose Edit Disk, and then Expand), but Linux doesn’t see the extra space. To make things worse, if – like me – you set the VM up originally as a Generation 2 machine (with all the UEFI bells and whistles) then some Linux tools and rescue images like gparted and fdisk don’t work properly (with boot errors like ” efi: EFI_MEMMAP is not enabled”). Plus my machine wouldn’t boot to install or run them because, as I said, it was full.

Anyway, here’s how I resized it. This all relates to a Debian 9 guest on Hyper-V on a Windows Server 2016 machine, but the process should be the same for most Linux variants.

Firstly, after turning the VM off, I resized the image in the Hyper-V Manager as above – using Edit Disk.

Then, I made a copy of the disk just in case. Turned out this wasn’t necessary, but better to be safe.

So, since I couldn’t use the current VM to fix my drive (Gen 2, tools don’t work, won’t boot), I set up a new temporary VM in Hyper-V, making sure I chose Gen 1 this time. I added the hard drive image from the real VM as the drive, and then set it to boot from an ISO of gparted. This allowed me to access the drive and resize the partitions. Before I did that, however, gparted had detected a change in drive size and asked if I wanted to fix it – I said yes.

Since I had three partitions (/dev/sda1 to sda3) but it was the second (sda2) that needed expanding, I had to move sda3 to the end of the drive first. It’s all pretty straightforward in gparted – just remember to actually apply your changes when you’re done as otherwise nothing happens!

This temporary VM was then turned off, the drive image was reattached to the original VM and… it didn’t work.

Hyper-V threw immediately threw up a permissions error, as it couldn’t access the disk image any more. ” An error occurred while attempting to start the selected virtual machine(s)”, and this:

Hyper-V Virtual Machine Management service Account does not have sufficient privilege to open attachment 'D:\PathToImage\DriveName.vhdx'. Error: 'General access denied error' (0x80070005). (Virtual machine ID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Luckily, this is fixable. Make a note of the Virtual Machine ID in the error, and then run this command in an admin console substituting the ID for all the Xs and the actual full path to the image:

icacls "D:\PathToImage\DriveName.vhdx" /grant "NT VIRTUAL MACHINE\xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx":(F) 

With this done, I could finally boot my original virtual machine successfully. In my case, it did a quick disk check itself automatically, and then everything was working normally only I’ve a lot more disk space to play with!

I’m Stylish

It’s hardly proper fame, but look at my tweet ending up in a news story on Stylist:

The 2018 Gaming Expenditure Horror


I’m sure I get round to this later and later each year. Maybe the 2025 report will be in 2028 or something. Anyway, the figures from previous years and then the 2018 Horror:

2010 – £590.32
2011 – £888.22
2012 – £834.48
2013 – £342.82
2014 – £464.92
2015 – £932.92
2016 – £964.02
2017 – £734.87
2018 – £271.60

Wait what? Less then £300? In an entire year? That’s the lowest I’ve ever spent in a year since I started recording this back in 2010, and I suspect it’s the lowest ever since I got a full time job. So what happened there, then?

Well, the main thing is that I didn’t buy any hardware. No new consoles. Last time that happened was back in 2013, and you can see that 2013 was my previous spending low tide. More than this though, I really didn’t buy very much at all in 2018.

In fact, the biggest expense was Pokémon. As in, both Let’s Go games, and a Pokéball – these totalled £110.90, not far off half my entire year’s spending.

Anyway, time to breakdown the figures.

Not really a surprise to see that in a year when I bought virtually no hardware, the hardware slice is very small.

What about which platforms I spent money on?

The first thing to notice is what is missing. No iOS, 360 or PC/Mac this year. There’s a slight drop (from 74.1% to 63.6%) for the Switch, but bear in mind that figure last year included the Switch itself! The Wii U still being there surprised me, but then I remembered I bought a second copy of Hyrule Warriors as I wanted a physical disk and my existing copy was digital.

Something to bear in mind is that I did actually get games from other platforms – but I didn’t pay anything for any of them. Some were presents, some were bought with digitial store vouchers given as presents, and quite a few were given out free from places like Humble Bundle on on giveaways on Twitter.

A final chart:

This was also a surprise, until I look into it deeper. The vast majority of the games I’ve bought in the last year were indeed downloads, but the majority of those were essentially free. Or indeed, very cheap. Plus those pesky Pokémon games skew things again too – they were both physical copies.

Previously I’ve also looked at the number of games I’ve bought. In 2016 it was 198, and in 2017 it dropped to 155. In 2018 this number fell even further to “just” 96. I also completed 86 games last year, so I’m getting close to completing more than I buy – and this is a target for 2019. Yes: I’m trying to not buy any games for as long as I can hold out, and complete more than I buy. I’ll never make a dent in the Pile of Unplayed, but at least I can try and reverse the trend, right?

It’s also worth pointing out that in 2018 I purchased my 3000th game. That’s a lot of games.

Veeam VeeamZip “Failed to process [isFileExists]” error when backing up Hyper-V

When backing up to a Synology NAS using VeeamZIP via PowerShell, the job was failing with an “isFileExists” error. Here’s the solution.

I have a Windows Server 2016 server with a number of Hyper-V virtual machines running on it, and Windows Server Backup wasn’t backing them up for reasons known only to Microsoft. Various forums and reports on Microsoft’s Technet suggest there’s a fix needed for Server 2016 which, two years after first complaints, still hasn’t been forthcoming. Everywhere seemed to suggest using something like Veeam Backup & Replication instead, so I installed that.

I only need a simple “backup the VM periodically” function, and Veeam B&R has this option in the free version in the form of VeeamZIP. This is all well and good, but it’s ad-hoc backup only – no scheduling unless you fork out for the paid versions. Luckily, Veeam themselves have a PowerShell script that you can schedule, which makes use of the Start-VBRZip command.

Sadly, it wouldn’t work for me, and it turns out it’s because I’m backing up to a Synology NAS.

If you look at the script, you’ll see this:

# Directory that VM backups should go to (Mandatory; for instance, C:\Backup)
$Directory = ""

If I set $Directory to a location local to the server (e.g. “d:\”) then it works. Set it to the NAS (e.g. “\\synonas\share\backups”) and I get the error “Failed to process [isFileExists]”.

Looking on the NAS, the logs say the server connected – with working credentials – but no files are created. After the usual head-scratching and log searching, I realised something: The script is running with the correct credentials, but the Start-VBRZip command in it is not.

On the PowerShell command line itself, you can specify which credentials Start-VBRZip can use with the -NetworkCredentials parameter. You can read more about that here.  However, there are two steps needed to get that working:

  1. Create a set of stored credentials in the Veeam Backup & Replication GUI, using the “Manage Credentials” option.
  2. Retrieve that in the form of an array in PowerShell and pass it to Start-VBRZip.

The second step is necessary because the parameter expects an array not a string. If you have a set of credentials for (e.g.) “DOMAIN\Admin” stored in Veeam B&R, you can’t just pass -NetworkCredentials “DOMAIN\Admin”.

What you can do, however, is extract the array necessary with this command:

$cred = Get-VBRCredentials -Name "DOMAIN\Admin"

and then pass $cred to Start-VBRZip’s -NetworkCredentials parameter.

Only there’s another snag: the provided PowerShell script doesn’t do anything with credentials as the parameter is missing. We can fix that by adding it ourselves.

In the script, there’s a line that says “DO NOT MODIFY PAST THIS LINE”. To hell with that! Immediately after the “Ansp VeeamPSSnapin” line, add

$cred = Get-VBRCredentials -Name "DOMAIN\Admin"

then rewrite these lines:

  If ($EnableEncryption)
    $EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | ConvertTo-SecureString)
    $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention -EncryptionKey $EncryptionKey
    $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention

to include the missing parameter:

  If ($EnableEncryption)
    $EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | ConvertTo-SecureString)
    $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention -EncryptionKey $EncryptionKey -NetworkCredentials $cred
    $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention -NetworkCredentials $cred

Save the file, add it to Task Scheduler as per the Veeam instructions, and it should now work!

Was I ready to go Mac only?

Ten whole Earth years ago, on this very blog, I asked myself the question: Am I ready to go Mac only? Today, I finally answer it.

Back then, I was certainly ready to try a Mac-only lifestyle. I already owned two, but my main computer was still a PC. I looked at the things I used regularly on it that might cause an issue if I were to move over to the Apple Ecosystem completely, and eventually took the plunge and spent an absurd amount of money on a shiny new iMac.

A shiny new iMac which is still going strong today, albeit at someone else’s house as I bought a replacement a couple of years ago. Yep, I’m all Apple now.

Looking back at my original post, I thought it interesting to see how I solved the issues I predicted facing, so I’ve listed them:


I had a Dell printer/scanner at the time, which wouldn’t work on a Mac. Or so I thought! It turned out there was a way of making it work using a Lexmark driver. Unfortunately (or fortuitously?) it actually died soon afterwards, and I bought a very similar but supported Canon device, which is still working now.

I also had a Samsung laser printer, which I gave away. It turns out I rarely needed to laser print after all, as I never replaced it. In fact, I don’t do much printing of any kind, and the Canon printer/scanner is mainly for scanning.

At the time, my phone was a T-Mobile Vario II, running Windows Mobile or CE or something which I managed to get working with the Mac (to sync various things) with some cheap third-party software. I replaced it with a Vario III, which synced in the same way, but ultimately moved to an iPhone 3GS and I’ve been iPhone’d up since. So that inconvenience went away.

The last concerns I have were with my Game Boy and Game Boy Advance homebrew devices, which used parallel connectors not usable on Macs. I replaced the latter with a USB version, and have never actually needed the former again.


Outlook 2003 was my mail client of choice back in 2008, but I moved over to Mail on the Mac reasonably easily. I even managed to bring all my mail over, albeit via an import into Thunderbird first. Calendars moved to iCal, contacts to Address Book.

I coded webpages in PHP using RapidPHP on the PC, but soon moved to Dreamweaver and now, mostly, it’s WordPress anyway so I’ve managed this changeover without hassle. Dreamweaver also negated the suspected need for a SitePublisher alternative, as it does that site upload/syncing job of that too.

I used Agent!, an ancient piece of software (and I was about 3 versions old at the time!) for Usenet access back on my PC. I’d intended to move to Thunderbird on the Mac, and did for a while, but then I discovered MacPorts and got the *nix mail and news client pine working. I’d used pine ten years prior to that at university, so understood it. Sure, it’s like a trip back to the Dark Ages even compared to Agent!, but it suited me fine. More recently, however, I discovered I could actually get Agent! running on a Mac under wine, so I do that now instead.

I survived!

However, I did cheat a little. On my original iMac, I actually managed to get a complete working replica of my old PC running in Parallels. For the few times I really needed Windows, I could pop into that. In reality, I rarely did so. A few times to run some games, the odd tool, to do some coding in VB for work, or to run Access, but that was it. Over the years the frequency of using it dropped too.

On my new iMac, I installed Windows 10 in Bootcamp, and I have to admit I’ve used that more than I did Parallels previously, but in reality only to play games in Steam. There’s Steam on the Mac of course, but half my Steam games are Windows only. Again though, booting into Windows is still a pretty rare occurrence. Not least because every time I do there’s hours of updates to install.

To answer my ten year old question then: yes. I was ready.


In the comments on my original post, I also discovered I’d lose Corel Draw and PhotoPaint – now replaced with InDesign and Photoshop – and PictureShark (which I used to watermark images), now replaced with Star Watermark.

How to make a PICO-8 game: Part 10

The last animation

It’s time to put the final touches to our game, namely animating the player sprite. Previously I’ve shown you how to do this for the enemies, and also how to create the enemies as objects, so we’re combining those for this task.

Part 10: Player Animation

As before, we need to draw some frames of animation to use. I’ve created some additional frames in sprite slots 2, 3 and 4 to carry on from 1.

Again, it’s pretty simple but is just for illustration.

Now, we need to create the player as an object. We could have a function to house this, make_player() like we have make_enemy(), but we only need to create one player so that’s overkill. Instead, we’ll create it in one go in the _init() function, replacing the x and y we had there before:

 -- create player object
 player = {}
 player.x = 64
 player.y = 64
 player.sprite = 1
 player.frame = 0
 player.framemax = 3
 player.ticks = 0
 player.ticksmax = 4
 player.draw = function(this)
  this.ticks += 1
  if this.ticks == this.ticksmax then
   if this.frame == this.framemax then
    this.frame = 0
    this.frame += 1
   this.ticks = 0
  spr(this.sprite+this.frame, this.x, this.y)

You’ll notice I’ve put a player.draw function in there, which works just like the enemy draw function from last time.

Continue reading “How to make a PICO-8 game: Part 10”

%d bloggers like this: