The modular nature of the RC2014 Pro, along with the vast array of colours that PCBs are available in these days has made me consider building a kit with all the colours of the Pride flag for quite some time. When it came down to it though, the colour choices were actually too limited. So I could either give up, or make the Pride Flag with the wrong colours… or find another solution.

Skip ahead to the tl;dr section if you want to jump past the theory, testing, and reasoning, and just want to see the process and settings I settled on.

Visit z80kits.com during June 2023 to buy an RC2014 Pro Pride or an RC2014 Zed Pro Pride. They are limited edition and raise money for two great Trans and LGBTIQ charities.

I started to search for different printing techniques and dye sublimation kept on cropping up, but mostly for things like mouse mats, t-shirts and mugs. After looking closer, I wondered if it was possible to use for PCBs. There are a few articles that seem to cover this, but they generally revolve around dye sublimation to make the mask to etch a PCB – and I didn’t want to go down that route! I eventually found an article by Ben Everard in Hackspace magazine which has a proof of concept. That was enough for me to dive deeper.

So What Is Dye Sublimation?

In scientific terms, Sublimation is the transition of a substance directly from a solid state to a gas state. It does not pass through the usual liquid state and only occurs at specific temperatures and pressures. The ink used for the process has this property, however, most inkjet printers cannot use this ink as they have a small heater on the print head. There are two types of printers that can be used for dye sublimation ink; dedicated printers made by Sawgrass which are really expensive, and Epson cheap crappy ones which can be converted. As Epson printers print cold, their print head won’t prematurely vaporise the ink, and conversion kits are available. Cheap and crappy is within my budget, although once the cheap printer is paired with a conversion kit, special ink, special transfer paper and a heat press, it isn’t all that cheap. All in, it was the best part of £500 investment – but I will be able to make my own mouse mats cheaply, so maybe that isn’t too bad!

The heat press is where the magic happens. With the blank (ie mouse mat, t-shirt or PCB) in contact with the ink on the transfer paper, applying pressure and heat will turn the ink in to a vapour that embeds itself in the blank. Once cool, it remains permanently* in the blank.

Initial tests

The article from Ben Everard said that he got his PCB covered entirely in white silkscreen, and it worked. Before ordering any PCBs, I wanted to try things out with some old scrap boards. I used a colourful printer calibration page to see how things came out. Obviously trying to dye blue boards didn’t work out great with the colour, but it was a lot better than I’d expected.

The thing that I was most relieved about was that the dye does not get absorbed by the metal. Yeah, it makes sense when I think about it, but a worry was that I’d have to mask off every component hole or else design the print around the holes and line it up super precisely. But that wasn’t a worry.

Even more important was that I was able to solder to the board and that the dye wasn’t conductive. More testing and things were looking good.

I had a couple of scrap boards with white solder resists, but the colour didn’t seem to work out too great.

Here a real PCB is compared to a printed image of that board on to white solder resist. It has taken the dye, but really not very deeply. To test things properly, I needed some boards specifically for running tests like this. So I ordered some boards each with white solder mask and no silkscreen and some that were totally covered on both sides by silkscreen. (Fun fact: I paid to have the batch number removed on the one with no silkscreen, but I figured there was no need for that one the one which was 100% silkscreen. Turns out I was wrong!).

After exporting the original silkscreen layer from KiCad in to Inkscape I set up some different colours and tried 8 different variations between the two types of board

This confirmed my suspicions that the solder resist only boards had a sharper image, but they didn’t take the colour anywhere near as well as the ones covered entirely with silkscreen. As the entire motivation behind the RC2014 Pride was colour based I now had a plan. 100% silkscreen coverage for the 4 modules that JLCPCB didn’t offer the colours for; Digital I/O (light blue), Compact Flash (pink), Pi Pico VGA (Orange) and ESP8266 Wifi (brown). Of course, for the full pride flag, there should also be a black module too – however, I was able to source all of my ICs in black, so the representation is there!

To make efficient use of the dye sublimation paper and heat press bed size I decided to panelise the boards in a 2×3 grid. The KiKit plugin for KiCad does a great job of this once you’ve dialled your settings in right (Spoiler: I didn’t quite dial them in right, and there’s a very slight lip on the top where the 45 degree and radiused corner meet the top. Sorry)

The original silkscreen layer and edge cuts from the panels was exported from KiCad in to Inkscape. From here I created a new layer above the imported layer and from here I could trace around the PCB shape and make my own artwork for it without being constrained to a single colour, font or any of the KiCad limitations. The Digital I/O module has the best representation of colour use, indicating which LEDs and switches go where. However, every board got its own bit of design flair.

With the printer set to high quality print, slow speed and mirrored, this is then printed to the transfer paper. The PCB panel needs to be aligned very carefully and held down with Kapton tape before going in the heat press, sandwiched between 2 sheets of Teflon. Trial and error on the settings earlier suggested that 180’C and 180 seconds worked best.

Here you can see an unused printed sheet at the top, a used sheet on the left and the dyed PCBs on the right. The colours on the unused transfer sheet are not representative of the final colour, but a .ics (image correction setting) file specifically for this ink and paper combination takes care of this and prints what is needed to get the colour you expect. You can see that some dye is left on the sheet after it has been used. Printing on to more absorbent items like mouse mats or t-shirts there is almost nothing left on the transfer sheet.

When I did the Compact Flash Module though, I encounter two big problems. When I supply the CF Modules I solder the surface mount socket beforehand as some people struggle with the 50 pin fine pitch connector. I use solder paste and a stencil, then a hot plate and hot air to reflow it.

Because the dye does not penetrate the plated pads, I assumed (wrongly) that this would be fine. However, I found it impossible to get the solder paste to stick to the pads. I don’t know exactly why this is, but I assume that the heat press somehow damages the plating. It may work better with ENIG plating, although I haven’t tested this.

I did find that a strip of Kapton tape fixed this problem, although it does add extra cost an labour to each board.

The other problem is heat. Using a MHP30 hot plate at 250’C under the board will leave a white 30x30mm square on the back where the dye has evaporated! Using hot air from above will evaporate the dye too!

The solution I found was to use a combination of a hot plate set to 125’C to pre-warm the board then the hot air only needs to spend a few seconds from above which is enough to flow the solder but only produces minimal evaporation around the socket. It isn’t ideal, but this part is hidden deep inside the RC2014 so isn’t exactly an eyesore!

The Pi Pico and ESP8266 modules are wide pitch surface mount parts, and although these seem to flow just fine with a regular soldering iron, I have played it safe and Kapton Taped over those connections too before going through the dye sub process. It adds quite a bit of time to the process, but feels important.

However, if you were doing a modern PCB with all surface mount parts then I don’t think it is feasible to use dye sublimation. Masking off every pad would be a nightmare, and there’s no way it would survive a reflow oven. So this isn’t a miracle solution that will give everybody gloriously colourful PCBs :-(

Another issue I came across was ghosting of the text. If you look at the first CF socket photo you might spot that the text isn’t too clear, although the lines are fine. The artwork was created in Inkscape on a Linux machine, but due to printer driver issues, I printed from Inkscape on a Windows laptop. I’m not exactly sure, but I suspect that there’s some kind of font incompatibility between the two machines. The workaround for this is to export as a PDF on the Linux machine with the “Convert Text To Path” option set. This PDF can then be printed from the laptop from Inkscape and the text is fine. I think this is just an issue with my setup and not anything inherently wrong with dye sublimation.

tl;dr Here’s How _I_ do it

  • Design the PCB in KiCad as normal, then cover the front and back with a filled in rectangle of silkscreen. Send this to JLCPCB to have the boards made
  • Remove the rectangles and export the front and back silkscreen layers with edgecuts to PDF file
  • Import the PDFs in to Inkscape. Add another layer above and use this to trace your board edge, component layout and text as you wish. Different fonts and colours and images can all be added here if required.
  • I exported this to another PDF then used Inkscape on a different machine to print this (this should be a redundant step though). Printed using high quality setting, mirrored and with fast mode turned off. Separate pages are printed for the front and back of the board.
  • Epson W2010 wireless printer has been converted to dye sub printing with a kit from City Ink Express, using their ink and paper
  • The white PCBs are prepared with Kapton tape over surface mount pads. Then the board is laid over the back image, aligned very carefully and held in place with Kapton tape.
  • The pre-heated heat press is set to 180’C. The PCB is set face down with the printed page on top, and a sheet of Teflon over the top. This is then pressed for 3 minutes then removed.
  • When cool, the PCB is removed from paper, flipped over and attached to the front image sheet and the heat process is repeated.

Problems and lilmitations

Whilst this offers a lot of possibilities with PCB design, it is far from perfect. Firstly is the upfront cost of the equipment needed to print and transfer the design. It is a very labour intensive process which uses specialised ink and paper, so these costs need to be taking in to account too. Alignment needs to be accurate too (unless you have a design that doesn’t need to be aligned). The image is not pin sharp, and there is a certain amount of feathering around edges due to the silkscreen, so fine details may not work too well. And lastly, the surface mount limitation is going to make it a non-starter for a lot of projects. But, with all those points in mind, if it works for you, the possibilities are endless.

Retro Challenge 2017/10 Zork First Stream

At 7pm UK time on Sunday (yesterday), I did the first Zork live stream.  This post is going to look back at how this went, from a technical point of view, from my point of view as a new YouTube streamer, and from the point of view of a non-adventure gamer playing Zork for the first time.

There was two aspects to the hardware.  The RC2014 running Zork was almost completely stand-alone.  It had it’s own keyboard and monitor, and the only connection to the outside world was via the ESP8266 module.  The ESP connected to the internet over Wifi, and streamed everything that was sent to the monitor via web sockets.  The Tx line from the ESP also went to a laptop so that I could monitor how many connections were open.

The laptop was also running Wirecast, and streaming it’s webcam and microphone to a live (live-ish.  About a 10 second delay) YouTube feed.  I could then talk, mumble, gesture, or use the chat feature, as well as read the chat messages as they came in.

Overall, this worked reasonably well – however there were a few things that could have been better.  About 20 minutes in, there were a couple of people complaining that they couldn’t connect to the text stream from the ESP.  The 3 people still connected were ok and getting updates, but nobody else could connect.  After a reboot everyone could connect and I was streaming to an audience of 5.  There was a report of odd characters being sent, although I think this was only when I used the delete key, which couldn’t be displayed properly in the live feed.  Also, there was still the issue with some lines being truncated.  If anybody viewing has kept a transcript, it will be interesting to compare with my transcript to see if they are both truncating at the same point (indicating a dropout between the web socket server and the ESP), or if they are different (indicating a dropout between the web socket server and the viewer)

I felt a bit awkward on YouTube.  It was kind of odd, and I couldn’t quite decide if I should just be playing Zork on my own and ignoring everyone looking over my shoulder – or if I should be ‘performing’ for the audience and involving them more.  As someone that isn’t that comfortable in front of the camera, and not good at text adventure games, I am beginning to question my life choices that lead to me narrating my fumbling through a troll filled underworld live on YouTube :-/

Although I had loaded up Zork a few times in the past, I had never gone further than randomly typing in directions, or going in to the house.  So I really was treading new ground here.  One of the things that surprised me for a 40 year old game is just how large the place is, and how much is going on.  I didn’t realise that there would be other characters that moved around, stole things from you and dropped things in different rooms.

The first game didn’t last too long, after picking a fight with the thief left me injured and a troll finished me off.  So I restarted the game, and decided to take a different approach in attacking the thief – but was surprised to find he wasn’t where he was in the previous game.

I did find myself questioning my motives here though.  Basically, I broke in to somebodys house, took all of their possessions, and tried to kill the first person I met.  I should be asking myself who the bad guy is in this game!

I had downloaded a map from the internet to make things a little bit easier for me.  It saved me from trying to go in directions that didn’t exist, and meant that I didn’t have to map things out for myself as I went along.  However it didn’t mean that I could just get to where I thought I wanted to go.  For example, once I went downstairs from the house, I couldn’t get back up again.  Well, one way up was up an unclimbable slope, one was up through the trap door that was locked behind me (probably by the house owner after I stole his lunch), and the stairs to the kitchen could only be climbed if I dropped most of what I was carrying.

Eventually I ended up at the Dam, and there was a control panel with a bolt and a green bubble on it.  In the Maintenance Room I found a wrench.  Also a tube of magical gunk.  So, surely these things were all related, and something good would happen if I could remove the bolt.  But no matter what combination of words I used, it just wouldn’t do anything.

I’d been playing for an hour by this time, so decided to call it a day for now.  I’ll resume again soon, although I can’t promise that I won’t have looked up how to remove the bolt before I try again :)

A transcript of my adventure can is below

G>ZORK1

ZORK I: The Great Underground Empire
Copyright (c) 1981, 1982, 1983 Infocom, Inc. All rights
reserved.
ZORK is a registered tn field west of a white house, with
a boarded front door.
There is a small mailbox here.

>OPEN MAILBOX
Opening the small mailbox reveals a leaflet.

>READ LEAFLET
(Taken)
"WELCOME TO ZORK!

ZORK is a game of adventure, danger, and low cunning. In it
you will explore some of the most ama
>SOUTH
South of House
You are facing the south side of a white house. There is no
door here, and all the windows are boarded.

>EAST
Behind House
You are behind the white house. A path leads into the forest
to the east. In one corner of the house there is a small
window which is slightly ajar.

>OPEN WINDOW
With great effort, you open the window far enough to allow
entry.

>ENTER WINDOW
Kitchen
You are in the kitchen of the white house. A table seems to
have been used recently for the preparation of food. A pasing on the table.
The glass bottle contains:
  A quantity of water

>GET BOTTLE
Taken.

>UP
You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

>DOWN
Kitchen
On the table is an elongated brown sack, smelling of hot
peppers.

>WEST
Living Room
You are in the living room. There is a doorway to the east, a
wooden door with strange gothic lettering to the wes
>GET LANTERN
Taken.

>OPEN TROPHY CASE
Opened.

>GET SWORD
Taken.

>I
You are carrying:
  A sword
  A brass lantern
  A glass bottle
  The glass bottle contains:
    A quantity of water
  A le
>W
The door is nailed shut.

>E
Kitchen
On the table is an elongated brown sack, smelling of hot
peppers.

>UP
You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

>USE LAMP
I don't know the word "use".

>TURN ON LAMP
The brass lantern is now on.

Attic
This is the attic. The only exit is a stairway leading down.
A large coil of rope is lying in the corner.
On a table is
>GET ALL
nasty knife: Taken.
rope: Taken.

>I
You are carrying:
  A rope
  A nasty knife
  A sword
  A brass lantern (providing light)
  A glass bottle
  The glass bott
>I
You are carrying:
  A rope
  A nasty knife
  A sword
  A brass lantern (providing light)
  A glass bottle
  The glass bottle contains:
    A quantity of
>I
You are carrying:
  A rope
  A nasty knife
  A sword
  A brass lantern (providing light)
  A glass bottle
  The glass bottle contains:
    A quantity of water
  A lea
>LOOK
Attic
This is the attic. The only exit is a stairway leading down.
There is a table here.

>D
Kitchen
On the table is an elongated brown sack, smelling of hot
peppers.

>W
Living Room

>D
You can't go that way.

>LOOK
Living Room
You are in the living room. There is a doorway to the east, a
wooden door with strange gothic lettering to the wes
>GET RUG
The rug is extremely heavy and cannot be carried.

>LIFT RUG
The rug is too heavy to lift, but in trying to take it you
have noticed an irregularity beneath it.

>MOVE RUG
With a great effort, the rug is moved to one side of the room,
revealing the dusty cover of a closed trap door.

>OPEN TRAP DOOR
The door reluctantly opens to reveal a rickety staircase
descending into darkness.

>DOWN
The trap door crashes shut, and you hear someone barring it.

Cellar
You are in a dark and damp cellar with a narrow passageway
leading north, and a crawlway to the south. On the wes
>S
East of Chasm
You are on the east edge of a chasm, the bottom of which
cannot be seen. A narrow passage goes north, and the pa
>E
Gallery
This is an art gallery. Most of the paintings have been stolen
by vandals with exceptional taste. The vandals left thr
>GET PAINTING
Taken.

>I
You are carrying:
  A painting
  A rope
  A nasty knife
  A sword
  A brass lantern (providing light)
  A glass bottle
  The glass bottle contains:
    A
>N
Studio
This appears to have been an artist's studio. The walls and
floors are splattered with paints of 69 different colors.

>GET PAPER
Taken.
Someone carrying a large bag is casually leaning against one
of the walls here. He does not speak, but it is clear fromaspect that the bag will be taken only over his dead body.
Your sword has begun to glow very brightly.

>TALK TO MAN
The thief is a strong, silent type.
The thief pauses for a moment, perhaps thinking that you
should re-read the manual.

>KILL THEIF
I don't know the word "theif".

>KILL MAN
What do you want to kill the man with?

>KILL MAN WITH KINDNESS
I don't know the word "kindness".

>L\KILL MAN WITH SWRO  OW RD
I don't know the word "l\kill".

>KILL MAN WITH SWR ORD
The thief is confused and can't fight back.
The thief slowly regains his feet.

>G
You charge, but the thief jumps nimbly aside.
The stiletto flashes faster than you can follow, and blood
wells from your leg.

>G
Your stroke lands, but it was only the flat of the blade.
The thief just left, still carrying his large bag. You may not
have 
>I
You are carrying:
  A ZORK owner's manual
  A rope
  A nasty knife
  A brass lantern (providing light)
  A glass bottle
  The glass bottle contains:
    A quantity o
>KILL MAN WITH KNIFE
You can't see any man here!

>LOOK
Studio
This appears to have been an artist's studio. The walls and
floors are splattered with paints of 69 different colors.
Strangel
>U
You can't get up there with what you're carrying.

>WESW T
You can't go that way.

>S
Gallery

>LOOK
Gallery
This is an art gallery. Most of the paintings have been stolen
by vandals with exceptional taste. The vandals left t
>W
East of Chasm

>N
Cellar

>UP
The trap door is closed.

>S
East of Chasm

>W
You can't go that way.

>N E
Gallery

>N
Studio

>UP
You can't get up there with what you're carrying.

>I
You are carrying:
  A ZORK owner's manual
  A rope
  A nasty knife
  A brass lantern (providing light)
  A glass bottle
  The glass bottle contains:
    A quantity of water
 
>READ MANUAL

Congratulations!

You are the privileged owner of ZORK I: The Great Underground
Empire, a self-contained and self-maintainie operation.



>READ LEAFLET
"WELCOME TO ZORK!

ZORK is a game of adventure, danger, and low cunning. In it
you will explore some of the most amazing terr
>DROP LEAFLET
Dropped.

>DROP MANUAL
Dropped.

>UP
You can't get up there with what you're carrying.

>DROP ROPE
Dropped.

>DROP BOTTLE
Dropped.

>UP
Kitchen
On the table is an elongated brown sack, smelling of hot
peppers.

>GET SACK
Taken.

>D
Only Santa Claus climbs down chimneys.

>W
Living Room

>OPEN DOOR
Which door do you mean, the wooden door or the trap door?

>OPEN TRAP DOOR
The door reluctantly opens to reveal a rickety staircase
descending into darkness.

>D
The trap door crashes shut, and you hear someone barring it.

Cellar

>S
East of Chasm

>E
Gallery

>N
Studio
There is a glass bottle here.
The glass bottle contains:
  A quantity of water
There is a rope here.
There is a ZORK owner's manual here.
A small
>GET ALL
glass bottle: Taken.
rope: Taken.
ZORK owner's manual: Taken.
leaflet: Taken.

>I
You are carrying:
  A leaflet
  A ZORK owner's manual
  A rope
  A glass bottle
  The glass bottle contains:
    A quantit  A brass lantern (providing light)

>U
You can't get up there with what you're carrying.

>S
Gallery

>W
East of Chasm

>N
Cellar

>N
The Troll Room
This is a small room with passages to the east and south and a
forbidding hole leading west. Bloodstains and de
>TALK TO TROLL
The troll isn't much of a conversationalist.
The troll pauses for a moment, perhaps thinking that you
should re-read the manua
>LOOK
The Troll Room
This is a small room with passages to the east and south and a
forbidding hole leading west. Bloodstains and de
>E
The troll fends you off with a menacing gesture.

>S
Cellar

>W
You try to ascend the ramp, but it is impossible, and you
slide back down.

>
I beg your pardon?



//////////////////////////////////////////////////////////////////////

This is where I reset the ESP8266 and waited for everyone to reconnect

//////////////////////////////////////////////////////////////////////


Connected to Serial on 192.168.0.14

I beg your pardon?

>I
You are carrying:
  A leaflet
  A ZORK owner's manual
  A rope
  A glass bottle
  The glass bottle contains:
    A quant
>I
You are carrying:
  A leaflet
  A ZORK owner's manual
  A rope
  A glass bottle
  The glass bottle contains:
    A quant  A nasty knife
  A brass lantern (providing light)

>LOOK
Cellar
You are in a dark and damp cellar with a narrow passageway
leading north, and a crawlway to the south. On the west is
I beg your pardon?

>
I beg your pardon?

>I
You are carrying:
  A leaflet
  A ZORK owner's manual
  A rope
  A glass bottle
  The glass bottle contains:
    A quantity of water
  A brown sack
  A nasty knife
  A brass lantern (providing light)

>
I beg your pardon?

>LOOK
Cellar
You are in a dark and damp cellar with a narrow passageway
leading north, and a crawlway to the south. On the west is tUSE ROPE
I don't know the word "use".

>ROPE
There was no verb in that sentence!

>CLIMB WITH ROPE
That would involve quite a contortion!

>N
The Troll Room
A nasty-looking troll, brandishing a bloody axe, blocks all
passages out of the room.
The flat of the troll'Conquering his fears, the troll puts you to death.
It appears that that last blow was too much for you. I'm
afraid you are deaRESTART
Your score is 29 (total of 350 points), in 91 moves.
This gives you the rank of Amateur Adventurer.
Do you wish to restart? 

>RESTART
Your score is 29 (total of 350 points), in 91 moves.
This gives you the rank of Amateur Adventurer.
Do you wish to restart? Y
Restarting.
ZORK I: The Great Underground Empire
Copyright (c) 1981, 1982, 1983 Infocom, Inc. All rights
reserved.
ZORK is a registered tOPEN MAILBOX
Opening the small mailbox reveals a leaflet.

>GET LEAFLET
Taken.

>S
South of House
You are facing the south side of a white house. There is no
door here, and all the windows are boarded.

>E
Behind House
You are behind the white house. A path leads into the forest
to the east. In one corner of the house there is a sOPEN WINDOW
With great effort, you open the window far enough to allow
entry.

>ENTER WINDOW
Kitchen
You are in the kitchen of the white house. A table seems to
have been used recently for the preparation of food. A pas
>GET BOTTLE
Taken.

>GET SACK
Taken.

>W
Living Room
You are in the living room. There is a doorway to the east, a
wooden door with strange gothic lettering to the w
>GET LAMP
Taken.

>OPEN TROPHY CASE
Opened.

>GET SWORD
Taken.

>E
Kitchen

>U
You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

>LIGHT LAMP
The brass lantern is now on.

Attic
This is the attic. The only exit is a stairway leading down.
A large coil of rope is lyi
>GET ROPE
Taken.

>GET KNIFE
Taken.

>D
Kitchen

>W
Living Room

>MOVE RUG
With a great effort, the rug is moved to one side of the room,
revealing the dusty cover of a closed trap door.

>OPEN TRAP DOOR
The door reluctantly opens to reveal a rickety staircase
descending into darkness.

>DOWN
The trap door crashes shut, and you hear someone barring it.

Cellar
You are in a dark and damp cellar with a narrow passagewS
East of Chasm
You are on the east edge of a chasm, the bottom of which
cannot be seen. A narrow passage goes north, and the paE
Gallery
This is an art gallery. Most of the paintings have been stolen
by vandals with exceptional taste. The vandals left tainting of unparalleled beauty.

>GET PAINTING
Your load is too heavy.

>GET PAINTING
Your load is too heavy.

>N
Studio
This appears to have been an artist's studio. The walls and
floors are splattered with paints of 69 different colors.
GET PAPER
Taken.

>READ PAPER

Congratulations!

You are the privileged owner of ZORK I: The Great Underground
Empire, a self-contained and self-maintaiDROP PAPER
Dropped.

>DROP LEAFLET
Dropped.

>S
Gallery
Fortunately, there is still one chance for you to be a vandal,
for on the far wall is a painting of unparalleled bea
>GET PAINTING
Your load is too heavy.

>I
You are carrying:
  A nasty knife
  A rope
  A sword
  A brass lantern (providing light)
  A brown sack
  A glass bottle
>DROP SWO   ROPE
Dropped.

>GET PAINTING
Taken.

>GET ROE PE
Your load is too heavy.

>N
Studio
A small leaflet is on the ground.
There is a ZORK owner's manual here.
A seedy-looking individual with a large bag just wandered
through the room. On the way through, he quietly abstracted
some valI
You are carrying:
  A nasty knife
  A sword
  A brass lantern (providing light)
  A brown sack
  A glass bottle
  The gl
>U
You can't get up there with what you're carrying.

>DROP BOTTLE
Dropped.

>UP
You can't get up there with what you're carrying.

>DROP SACK
Dropped.

>UP
You can't get up there with what you're carrying.

>GET ALL
brown sack: Taken.
glass bottle: Taken.
leaflet: Taken.
ZORK owner's manual: Taken.

>PUT ALL IN SACK
ZORK owner's manual: The brown sack isn't open.
leaflet: The brown sack isn't open.
glass bottle: The brown sack isn't open.

>OPEN SACK
Opening the brown sack reveals a lunch, and a clove of garlic.

>PUT ALL IN SACK
ZORK owner's manual: Done.
leaflet: There's no room.
glass bottle: There's no room.
brown sack: How can you do that?
nasty knife: There's no room.
sword:

>EAT U LUNCH
Thank you very much. It really hit the spot.

>PUT ALL IN SACK
leaflet: Done.
glass bottle: There's no room.
brown sack: How can you do that?
nasty knife: There's no room.
sword: There's brass lantern: There's no room.

>U
You can't get up there with what you're carrying.

>I
You are carrying:
  A glass bottle
  The glass bottle contains:
    A quantity of water
  A brown sack
  The brown sack c
>DRINK WATER
You'll have to open the glass bottle first.

>I OPEN BOTTLE
Opened.

>DRINK WATER
Thank you very much. I was rather thirsty (from all this
talking, probably).

>DROP BOTTLE
Dropped.

>U
You can't get up there with what you're carrying.

>I
You are carrying:
  A brown sack
  The brown sack contains:
    A leaflet
    A ZORK owner's manual
    A clove of garlic
S
Gallery
There is a rope here.

>W
East of Chasm

>N
Cellar
Your sword is glowing with a faint blue glow.

>N
The Troll Room
This is a small room with passages to the east and south and a
forbidding hole leading west. Bloodstains and deFIGHT TROLL WITH SWORD
Your sword crashes down, knocking the troll into dreamland.

>E
East-West Passage
This is a narrow east-west passageway. There is a narrow
stairway leading down at the north end of the roo
>E
Round Room
This is a circular stone room with passages in all directions.
Several of them have unfortunately been blocked by
>E
Loud Room
This is a large room with a ceiling which cannot be detected
from the ground. There is a narrow passage from east toGET BAR
bar bar ...

>I
i i ...

>
I beg your pardon?

>GET BAR
bar bar ...

>BARBRAANN
barbraann barbraann ...

>GET BAR
bar bar ...

>BAR BAR
bar bar ...

>BLACK SHEEP
sheep sheep ...

>GET BAR BAR
bar bar ...

>I
i i ...

>I
i i ...

>I
i i ...

>W
Round Room

>N
North-South Passage
This is a high north-south passage, which forks to the
northeast.

>NE
Deep Canyon
You are on the south edge of a deep canyon. Passages lead off
to the east, northwest and southwest. A stairway lNW
Reservoir South
You are in a long room on the south shore of a large lake, far
too deep and wide for crossing.
There is a p
>W
Stream View
You are standing on a path beside a gently flowing stream. The
path follows the stream, which flows from west toN
You can't go that way.

>W
The stream emerges from a spot too small for you to enter.

>W E
Reservoir South

>E
Dam
You are standing on the top of the Flood Control Dam #3, which
was quite a tourist attraction in times far distant. Ther
>GET BUBBLE
It is an integral part of the control panel.

>P EXAMINE BUBBLE
There's nothing special about the green bubble.

>EXAMINE BOLT
There's nothing special about the bolt.

>GET BOLT
It is an integral part of the control panel.

>GET BOLT
It is an integral part of the control panel.

>OXY OFF CONTROL PANEL
I don't know the word "oxy".

>I
You are carrying:
  A brown sack
  The brown sack contains:
    A leaflet
    A ZORK owner's manual
    A clove of garlic
HIT BOLT WOT  ITH SWORD
I've known strange people, but fighting a bolt?

>E
Dam Base
You are at the base of Flood Control Dam #3, which looms above
you and to the north. The river Frigid is flowing by
>GET PLASTIC
Taken.

>EXAMINE PLASTIC
There's nothing special about the pile of plastic.

>N
Dam

>LOOK
Dam
You are standing on the top of the Flood Control Dam #3, which
was quite a tourist attraction in times far distant. Ther>USE PLASTIC ON BUBBLE
I don't know the word "use".

>PUT PLASTIC ON BUBBLE
There's no good surface on the green bubble.

>GET BUBBLE
It is an integral part of the control panel.

>EXAMINE BUBBLE
There's nothing special about the green bubble.

>N
Dam Lobby
This room appears to have been the waiting room for groups
touring the dam. There are open doorways here to the no
>GET B MATCHBOOK
Taken.

>EXAMINE MATCHBOOK
The matchbook isn't very interesting, except for what's
written on it.

>READ MATCHBOOK

(Close cover before striking)

YOU too can make BIG MONEY in the exciting field of PAPER
SHUFFLING!

Mr. Anderson of MuddG

(Close cover before striking)

YOU too can make BIG MONEY in the exciting field of PAPER
SHUFFLING!

Mr. Anderson of MuddG

(Close cover before striking)

YOU too can make BIG MONEY in the exciting field of PAPER
SHUFFLING!

Mr. Anderson of MuTech I feel really important and can obfuscate and confuse
with the best."

Dr. Blank had this to say: "Ten short days ago alN
Maintenance Room
This is what appears to have been the maintenance room for
Flood Control Dam #3. Apparently, this room hasGET ALL
group of tool chests: The chests are so rusty and corroded
that they crumble when you touch them.
wrench: Your load is too hI
You are carrying:
  A screwdriver
  A matchbook
  A pile of plastic
  A brown sack
  The brown sack contains:
    A leaDROP W SWORD
Dropped.

>TURN OFF LAP MP
The brass lantern is now off.
It is now pitch black.

>DROP LA       LIGHT LAMP
The brass lantern is now on.

Maintenance Room
This is what appears to have been the maintenance room for
Flood Control Dam #3. Apparently, this room has GET WRENCH
Taken.

>S
Dam Lobby
Some guidebooks entitled "Flood Control Dam #3" are on the
reception desk.

>S GET GUIDEBOOKS
Taken.

>S
Dam

>LOOK
Dam
You are standing on the top of the Flood Control Dam #3, which
was quite a tourist attraction in times far distant. 
>U REMOVE BOLT WITH WRENCH
That sentence isn't one I recognize.

>UNDO BOLT WITH WRENCH
I don't know the word "undo".

>TAKE BOLT WITH WRENCH
That sentence isn't one I recognize.

>TAKE BOLT
It is an integral part of the control panel.

>UNSCREW BOLT WITH WRENCH
I don't know the word "unscrew".

>I
You are carrying:
  A tour guidebook
  A wrench
  A screwdriver
  A matchbook
  A pile of plastic
  A brown sack
  The READ GUIDEBOOK
" Flood Control Dam #3

FCD#3 was constructed in year 783 of the Great Underground
Empire to harness the mighty Frigid RiPUSH BOLT
Pushing the bolt isn't notably helpful.

>PULL BOLT
You can't move the bolt.

>MOVE BOLT WITH WRENCH
The bolt won't turn with your best effort.

>N
Dam Lobby

>N
Maintenance Room
There is a sword here.
There is an object which looks like a tube of toothpaste here.

>EXAMINE TOOTHA\  PASTE
I don't know the word "toothpaste".

>EXAMINE TUBE
---> Frobozz Magic Gunk Company <---
   All-Purpose Gunk

>GET TUBE
Taken.

>GET SWORD
Your load is too heavy.

>S
Dam Lobby

>S
Dam

>PUT GUNK ON BOLT
You don't have that!

>I
You are carrying:
  A tube
  A tour guidebook
  A wrench
  A screwdriver
  A matchbook
  A pile of plastic
  A brown sPUTTUB    TUBE ON BOLT
There's no good surface on the bolt.

>SQUEEZE TUBE ON BOLT
You can't do that.

>
I beg your pardon?

>EXAMINE TUBE
---> Frobozz Magic Gunk Company <---
   All-Purpose Gunk

>MAKE BOLT UNDO
I don't know the word "undo".

>MAKE BU OLT LOOSE WITH G TUBE OF GUNK
I don't know the word "loose".

>I
You are carrying:
  A tube
  A tour guidebook
  A wrench
  A screwdriver
  A matchbook
  A pile of plastic
  A brown sa  A brass lantern (providing light)

>LOOK
Dam
You are standing on the top of the Flood Control Dam #3, which
was quite a tourist attraction in times far distant. Thermounted. Directly above the bolt is a small green plastic
bubble.

>CUT BUBBLE WITH KNIFE
Strange concept, cutting the green bubble....

>TURN BOLT WTH    ITH WRENCH
The bolt won't turn with your best effort.

>PRESS BUBBLE
Pushing the green bubble has no effect.

>PU OUR TUBE ON BOLT
You can't pour that.

>DROP TUBE ON BOLT
There's no good surface on the bolt.
The robber, rummaging through his bag, dropped a few items he
found valueless.

>LOOK
Dam
You are standing on the top of the Flood Control Dam #3, which
was quite a tourist attraction in times far distant. TheThere is a sword here.

>GET SWORD
Your load is too heavy.

>DROP SCREWDRIVER
Dropped.

>GET SWORD
Your load is too heavy.

>I
You are carrying:
  A tube
  A tour guidebook
  A wrench
  A matchbook
  A pile of plastic
  A brown sack
  The brown sDROP GUIDEBOOK
Dropped.

>GET SWORD
Your load is too heavy.

>DROP SACK
Dropped.

>GET SWORD
Taken.

>GET D SACK
Your load is too heavy.

>LOOK
Dam
You are standing on the top of the Flood Control Dam #3, which
was quite a tourist attraction in times far distant. TheThere is a brown sack here.
The brown sack contains:
  A leaflet
  A ZORK owner's manual
  A clove of garlic
There is a touPRAY
If you pray enough, your prayers may be answered.

>SAVE
Load SAVE disk then enter file name.
(default file name is ZORK1.SAV).
Type <ENTER> to continue  > FIRSTGO

Load Game Disk if it was removed.
Type <ENTER> to continue >

Ok.

>

The YouTube stream can be found here https://youtu.be/Gdjq2Rb9y64 But, really, it’s probably not going to be one of those thing I expect anybody to sit through!

 

Retro Challenge 2017/10 – Live Zork Streaming Soon

Firstly, apologies that not much has happened recently.  I’ve been under the weather for the last few days, so only made minimal progress.  However, feeling a bit better, so Tonight I will try streaming Zork!

I am planning to go live at 7PM UK time tonight for around an hour (If you’re not in the UK, see this countdown timer).  If you missed it, I’m sorry – but I hope to have a transcript up soon, and will probably do it again shortly.

There will be a tweet beforehand with links to connect to, so if you don’t follow @ZXSpectROM on Twitter, click here to view

Essentially, there will be two aspects to the streaming.

  • Primarily, there will be a RC2014, running CP/M, with Zork on it.  This machine will have the ESP8266 Wifi bridge, and everything that is sent to the screen will also be sent to http://tzapu.github.io/WebSocketSerialMonitor/ via web sockets.  This machine will also be using one of the old parallel 80’s keyboards I investigated in the last Retro Challenge (It’s important to point this out so you’ll cut me some slack with all the inevitable typos that I know I’ll make with this keyboard layout).  This will be the live stream of Zork, which is essentially the goal of this Retro Challenge.
  • A live stream on YouTube will also take place.  Well, live-ish.  Apparently there’s a 10 second delay, so that might be a bit odd.  However, the main reason for this is to provide a feedback loop for those watching along at home via the YouTube Chat function.  I’ll have a laptop set up next to the RC2014 so I can see any comments as they come in.  So, if I forgot to pick up an object in a room, or you think I should go north instead of east, you can let me know.  It will be streaming video from a webcam too, but don’t expect that to be too exciting.  (Seriously, you’ll be watching a 40 year old ASCII based text adventure game being played by somebody that isn’t good at text adventure games, and the webcam footage will be LESS exciting!)

 

So, that’s the important stuff that you need to know to follow along tonight.

In other news, as I was happy enough with how the prototype PCB seems to be working, I’ve laid out a real board now.  The PCBs are currently being manufactured in China, although it isn’t looking likely that I’ll get them back before the end of this particular Retro Challenge.  But if I do, then expect an update here!  Here’s a sneaky peek at what they should look like though;

 

Retro Challenge 2017/10 Testing

The initial testing of the ESP8266 board with the RC2014 was pretty good, and fundamentally it worked.  However, it wasn’t quite right, and I suspected that the problem was to do with CR or LF.

The code I was using was found here; https://github.com/tzapu/WebSocketSerialMonitor (Thanks Tzapu!).  It uses web sockets, and allows an external web page to connect through to the ESP8266.  So, by going to http://tzapu.github.io/WebSocketSerialMonitor/ and connecting to ws://x.x.x.x:81/ws (where x.x.x.x is my external IP address and a firewall rule is set up to forward port 81 through to the internal address of the ESP) it will display everything the ESP receives on its Rx pin.  Well, almost everything, but not quie everything.

If, for example, I did a directory listing which was 2 full lines and a little bit more on the 3rd line, only the first 2 lines would show up.  If I’m playing Zork, sometimes it would show the whole chunk of text as it came in, other times it would miss the last line.

The code itself is fairly easy to read, although the complicated web sockets stuff is hidden away in libraries.  This is the part of the routine that reads the serial input until it detects a CR (the ‘\n’ part), where upon it then sends the line;

void serialEvent() {
  while (Serial.available()) {
    char inChar = (char)Serial.read();
    if (inChar == '\n') {
      stringComplete = true;
      return;
    } else {
      inputString += inChar;
    }
  }
}

I figured that adding a check for a LF would do the job;

if (inChar == '\n' || inChar == '\r') {

But, sadly, it didn’t.  If anything, it made it worse.  So, instead, I tried just reading a set amount of characters (10 initially) and sending them regardless of a CR or LF, but that didn’t work either.  When I got it to send every character without checking, it worked much much better, although if I sent a very large chunk of text it would miss random bits of it.

So, the problem seemed to be speed related.  The checking for CR was a nice idea by the original author, but it wasn’t something I needed, so time to strip out all the surplus code.  It went from this;

void serialEvent() {
  while (Serial.available()) {
    char inChar = (char)Serial.read();
    if (inChar == '\n') {
      stringComplete = true;
      return;
    } else {
      inputString += inChar;
    }
  }
}


void loop() {
  serialEvent();
  if (stringComplete) {
    
    String line = inputString;
       // clear the string:
    inputString = "";
    stringComplete = false;

    //line += '\n';
    webSocket.broadcastTXT(line);
    Serial.println(line);
  }
  webSocket.loop();
}

to this;

void serialEvent() {
  while (Serial.available()) {
    char inChar = (char)Serial.read();
    inputString += inChar;
  }
}

void loop(){
  serialEvent();
  webSocket.broadcastTXT(inputString);
  inputString="";
  webSocket.loop();
}

Much simpler, and it seemed to work perfectly!

All the testing up until this point was done either on my laptop or mobile.  Although they are on the same wifi network as the ESP, it’s connecting out to an external web page before coming back in, so it should be a reasonable test.  But there’s nothing like real people connecting in to really see if it works.  So, I put a shout out on Twitter, and on Saturday evening, 4 willing volunteers sat there watching me do random things on the RC2014.

Feedback was pretty good, and it all seemed to work as expected.  Thanks Thilo for this screenshot;

I messed about with simple programs in BASIC, directory listings, and the opening moves in Zork, with success.  In a moment of madness, I fired up Wordstar.  When the RC2014 is connected to a VT100 terminal, it works great by using escape codes to set where things are on the screen and what colours are used.  However, these escape codes don’t render at all well on the web sockets interface.  Thanks Dave for showing my just how bad it looked!

So, yes, I should have known that Wordstar would be pushing it a bit far.  But otherwise, I was very pleased with the performance.

The biggest problem I had, though, was that of feedback when interacting with the “audience”.  I could type short sentences in to Zork that the viewers would see and understand, even if the Zork engine couldn’t interpret it.  But, of course, there was no live feedback from the viewers.

I’m not sure what the solution to that will be, but it could be as simple as keeping Twitter open on my phone.  Alternatively, things like IRC or Slack could be used (although I don’t want viewers to have to jump through hoops to get connected to me).  Skype might be an option too, although, at the moment, I think it’s more likely I’ll set up a YouTube live stream and use the chat feature in that.

For those wondering about the set up that I’m using, it’s pretty much a stock RC2014 Pro with a Pi Serial Terminal and the ESP8266 prototype I built for this project.  The Pi Zero is connected via a HDMI > VGA adapter, and then to a 17″ monitor.  The keyboard is this Cherry keyboard from the last Retro Challenge.  Note that the key layout is sufficiently different from what I’m used to that typos aren’t too uncommon yet.

The laptop is there to program the ESP, and to monitor it’s output.

I am aiming to have a live run through on Friday, so that gives me a few days to look in to the feedback options.

Retro Challenge 2017/10 Getting Started

So, the idea of streaming the RC2014 to the internet had been rattling around in my head for a while, but I’d never quite worked out how the software side of things would work.  Although the hardware side should be kind of straightforward, with my software skills, I need to find something I can copy & paste.  A couple of days ago I just happened to put the right search terms in to Google and it gave a result that looked like it would do want I wanted.  So, with that, my plan for Retro Challenge took shape!

A couple of years ago I played around with some EPS8266 Wifi Modules, but never really found a use for them.  However, for this, they would be ideal.  The code I had found was a Web Sockets Serial Monitor designed specifically to run on an ESP8266, so I decided to test it out just to check that it did what I expected it would.

Several hours later, it did!  Those hours, however, were spent trying to remember how to program these things.  My desktop machine didn’t have any of the ESP stuff in the Arduino IDE, but luckily, I still have my old laptop that I used a couple of years ago.  Despite getting all the right libraries, it just wouldn’t compile.  So, on to the new laptop, with a fresh Arduino IDE and all the ESP stuff and libraries, and it compiles.  Getting it to upload, however, was another challenge which actually involved burning myself on the USB to serial adapter at one point!  It turns out that of the two I tried, one of them was dead, and the other one spammed my Twitter account ever time it’s turned on (I didn’t know this until checking Twitter later… what!  86 new mentions!).  It also turns out they need more power than the adapter can supply.  And, in order to program them, the ESP needs to be pushed in to the adapter really really really hard!

The programming jig wasn’t really suitable for testing things out, so time to transfer this to a prototype board.  But first, lets work out a circuit!  The programming jig has the necessary support components and minimal connections, so that’s a good start.  The ESP works on 3v3, so I’m going to need a regulator to drop the 5v down.  And the Rx pin is only 3v3 tolerant, so a couple of resistors as a voltage divider will work fine as a level shift here.  The Tx pin won’t be connecting to the RC2014, although even if it was needed, 3v3 is sufficient enough to work.  GPIO0 is used to either put the ESP in to programming mode or run mode.  2 of the other GPIO pins (15 and 2) were tide to ground and 3v3 respectively on the programming jig.  I can’t remember why I did that, but that won’t be needed for this board.

Before hooking up the ESP to the power rails, I checked that the regulator I used (spare one I had lying around) did it’s job.  Yup, 3.299v, close enough!  On with adding the rest of the stuff.

So, from left to right, we’ve got a connector for 3v3 so it can be powered directly if needed (or use 3v3 elsewhere), and an FTDI header for my 3v3 adapter so the ESP can be reprogrammed.  Then there’s a reset button, the 3v3 regulator and caps, then the ESP itself.  There’s a 10k pull up resistor on the reset pin, and a program/run jumper below the ESP.  As yet, the resistor divider for the Rx pin aren’t fitted.  But it should power up and work just as it did in the jig, right?

Ummm… no.  Regardless if I used the power regulator, or fed 3v3 in directly, out of the serial header all I got was gibberish.  It was consistent gibberish, but not something I could make any sense of.  Maybe I damaged the ESP when soldering the wires on?  Hmmmm… maybe I should program another one just in case.  Well, long story short, it needs GPIO15 connected to ground to work!  I can’t see any logic why this would need to be the case, but, whatever, it works now.

I needed to add a rule on the firewall to allow port 81 through to the IP address of the ESP, and after that, I could connect from the outside world and see what my RC2014 was saying!

Things work pretty well, although there’s some kind of issue with carriage returns and/or linefeeds that’s causing some stuff to be dropped, but that’s enough success for one day.  We’ll sort that out tomorrow!

Retro Challenge 2017

Ok, with 5 days of October already gone, I know it’s cutting things a bit fine for putting my entry in for this seasons Retro Challenge – particularly as it started 5 days ago… but, better late than never, right?

So, what have I planned to do that is both retro and challenging? Simple, I’m going to play games! More specifically, I’m going to play Zork, on a CP/M enabled RC2014 that is connected to the internet so it can be streamed live to an audience of anybody that cares to watch me get eaten by a grue.

The first challenge is going to be hooking up the RC2014 to the internet, such that it can stream text. Kind of like Twitch, but in ASCII. Luckily, I’ve got a bunch of ESP8266 modules that have been sitting in a drawer, and I think these are likely to be ideal for converting serial data in to web pages.  I should be able to hook up something on breadboard, and find a bit of code that does the job – although it would be nice if I can get some real PCBs made up for the job.  With just over 3 weeks to go, though, that might be pushing it timewise.

Then there is the challenge of Zork itself.  I often use it as a test game to show people what the RC2014 can do, however, I’ve never done more than a bit of random North, North, East, Look, Get Lamp etc.  I’ve never really played many text adventures either, so this will be a big learning experience for me.  I can’t promise that I won’t use the odd cheat/clue here and there, but if there are actually people watching along online, I’ll happily take suggestions over Twitter.  If things happen to go really well, and I complete it in good time, then I will add Adventure as a stretch goal.