Retro Challenge 2017/10 – Returning to Zork

After what felt like a lot of aimless bumbling around and poor progress on the first streamed game of Zork, I decided to take a peek at a walkthrough solution before playing this.

The last live stream finished off with me getting frustrated with not being able to undo a bolt at the Dam, despite having a wrench.  A peek at the walkthrough mentioned pushing a yellow button in the control room first.  Really?  Like, how was I supposed to know that?  Ok, I’ll admit that I hadn’t spotted any of the buttons in the control room (there was a lot of text bombarding me as I arrived in there), but if I had, I would have probably pushed all the buttons.  I don’t know if you must push only the yellow one, or if pushing them all would render the bolt still unturnable, but if this is the level of puzzle I’m supposed to solve, then it’s unlikely that I’m going to make too much progress after this part.

So, instead, I decided to print off the first couple of pages of the walkthrough, and planned to just follow along with it.

The live stream started at 7pm on Thursday evening, and the set up was the same as the previous one.  The only difference was that I’ve now upgraded from the free version of Wirecast to a licence one with no interruptions.  There was 5 viewers on YouTube and 4 on the text stream, although towards the end I spotted a tweet from a viewer that was unable to connect to the text stream (Sorry!), but I never found out if it was a problem at my end or his.

The first thing I wanted to do was test out the instructions on pushing the yellow button before undoing the bolt.  Sure enough, this worked!  However, there were a few other things that I’d missed out between the start and the dam.  I could have possibly caught up with those in a different order, but decided to quit this game and start afresh.

Progress went well, and within an hour I had completed around 50% of the game.  Some of the walkthrough was invaluable.  I can imagine I’d have ended up stuck in the maze for ever, and probably unable to map it too, but when the walkthrough tells you to just go northwest, south, west, up, west, southwest, and northeast, it is much more enjoyable.  Even following along on the map this was hard to work out.

I feel like I’ve successfully completed the Retro Challenge I set myself, and I’m happy that things went pretty well.  As I’ve mentioned before, I’m not much of a text adventurer, and I don’t think this experience has changed that.  Zork was actually better than I thought it would be, and at some point I’ll play through the 2nd half of the walkthrough.  The best part for me, however, was the technical side of things, and hooking up an ESP8266 as a wifi link for the RC2014.  There seems to be a few different bits of ESP8266 software that will add value to the RC2014, so I’ll be developing a proper ESP8266 Module soon.

A big thanks to those that have followed along with this blog, via Twitter, and, of course, via YouTube and the text stream.

Transcript of this adventure here;

If you need to watch the YouTube stream, it can be found here https://youtu.be/K-Kv5saIHyE

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

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;

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

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;

to this;

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

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.

Retro Challenge 10/2016 – Still a work in progress

So, who remembers my entry for Retro Challenge in January?  It was quite devoid of effort and results I think you’ll agree.

Well, this time around, I’ve taken that theme and pushed it even further!  Even less effort and much less result.

Since January, I have had a few opportunities to carry on with the ZX81 Module.  Because I wanted this to be a Retro Challenge project, I deliberately avoided doing any work on it, so I could save it all for October.  Well, October started and I was overwhelmed with non-Retro Challenge stuff.  But after a couple of weeks, I had a spare afternoon, and decided to dedicate this to the ZX81 Module!

So, I dug out the PCBs I had manufactured in January and fired up the soldering iron;

retrochallenge10-2016_1

Time to wrack my brains and work out what my plans had been 9 months earlier.  I had failed to put any component values on the PCB, or even my Kicad schematics, so had to rifle through original ZX81 schematics to work out what these should be.

Now I knew what components I needed, it quickly dawned on me that I didn’t have very many of these at all.  This didn’t deter me though.  I fitted everything I had; IC socket, pin headers, some resistors and some transistors that may or may not be compatible;

retrochallenge10-2016_2

And that’s about it.  I have ordered the rest of the parts now, but not had an opportunity to fit them.  yet.

One thing I have learned from this experience though, is that if I get any opportunity or urge to work on this, then I will seize it.  Not wait until the next Retro Challenge.  If I’d done work on this months ago when I had the chance, then this would more likely be a trouble shooting / tweaking / developing challenge.

One other good thing that has come out of this though, is that when I started this in January, I had a few design changes or additions required for the RC2014 for it to work.  The Backplane 8 has the ability to add resistors between the CPU and the RAM.  The Universal Micro Keyboard has the right connections to work with a real ZX81 or this ZX81 Module (including diodes).  The CPU Module also now has BUSRQ, WAIT, NMI and WAIT pins broken out which is required for this.  These changes should all make things much easier.

Despite my poor efforts this time around, I have thoroughly enjoyed seeing what everybody else has achieved with their Retro Challenge.  Good work everybody else!

Retro Challenge 2016 – My Dog Ate My Homework

So, all the way back in deepest darkest December, I announced I would enter the Retro Challenge 2016 competition that ran throughout January.  Those of you that followed by blog or Twitter account when I did this in 2014 will know that I blogged and Tweeted relentlessly for the whole month, but, this time around, almost nothing.  Obviously, I’m keeping some secret about an amazing breakthrough or something, right?  Well, truth is, I’ve done almost nothing.

Things started well, and on 1st January, I designed a new backplane for the RC2014.  Although I hadn’t studied the circuit diagrams for the ZX81, Jupiter Ace or ZX Spectrum yet, I knew that there were resistiors between the Z80 CPU and other devices.  The stripboard backplane I’d been using had served me well, but it was time to progress to a better solution, and one that could be adapted better to my needs.  Knowing that PCB delivery times could be against me, I thought it best to crack on and get this  ordered.

Screenshot from 2016-01-31 16:01:00

The basic circuit is very very simple – however, I wanted to get this just right, not only for Retro Challenge 2016, but for other possible RC2014 uses.  Essentially, there are 8 40 way connectors that are linked straight through – however, the data lines and address lines for the leftmost 2 connectors and rightmost 2 connectors are separated by a pair of pads.  These can either be shorted together for up to 8 commoned connectors, or have resistors soldered across them.  I also added a power connector and the option of either running 5v directly in to the board, or regulating a higher voltage down via a LM7805.

(more…)

Retro Challenge January 2016 – Preamble

So, you may well remember that I entered Retro Challenge 18 months ago, and what a fun crazy busy time that was!  Well, the January Retro Challenge competition is about to kick off in just over 2 weeks.

If you’re not familiar with Retro Challenge, shame on you!  But you can de-shame yourself by heading over to http://www.retrochallenge.org/ and seeing what it’s all about.  Essentially, it’s a month long bi-annual competition where the entrants set themselves a goal based around old school computing and blog, tweet and share their experiences.  The goals are pretty loose, as long as they are based on something from last centuary (modern emulators of old kit is fine).

The challenge I set myself was to take a breadboard based Z80 computer and bring it to life in modular PCB form in such a way that I could spell out my name on.  Have a look back through my blog to see how I did.  Spoiler —->

IMG_20140730_205950

(more…)

RC2014 Bootloader for SD Cards

So, the RC2014 is great.  I can run Microsoft BASIC and program it from there, and as long as I am using a terminal emulator, I can copy & paste to save and load programs.  Alternatively, I can write Z80 code using an online compiler then download it, copy it to USB stick, move it to my old Windows 2000 laptop (which has a parallel port) so I can burn it on to EPROM to see if it works, make adjustments and repeat with another EPROM.

I will be the first to admit, however, that this is probably not the most efficient workflow.  Not to mention the time and effort involved in wiping the limited stock of aged EPROMS.

So, I am in the process of designing an SD Card based bootloader.

i (2)

(more…)

RC2014 with ZX Printer interface

My original plan had never been to design and build my own computer.  I had, however, planned to build a clone of the Sinclair ZX80, which has been on my bucket list of things to own for year, and which I had found plans for online.  Whilst collecting the parts and reading up on simple Z80 computers I got kind of sidetracked and ended up with the RC2014.

The print out shown was what was left from the last time this was connected to a ZX Spectrum!

The heart of the RC2014 is a Zilog Z80 CPU, which is the same one that Sinclair used in the ZX80, ZX81, ZX Spectrum and Z88.  If the ZX81 and ZX Spectrum can run a ZX Printer, then surely it follows that the RC2014 will be able to too?

(more…)