Category Archives: Retrochallenge

Retrochallenge 2016 – First look.

151231-IMG_20151231_174248Let’s start at the very beginning. It’s a very good place to start – Apparently.

According to the documentation, the VT180 is a VT100 serial terminal with a VT18X add on board. This add on is a Z80 single board computer that talks to the VT100 though one of its communications ports. this make for quite a nice combination for the day.

You can use the VT100 as just a terminal to your corporate mainframe or mini-computer and when required, fire up the Z80 into CP/M-80 and compute like there’s no tomorrow.

Mine is computing like Yesterday was a little rough.


At this point I am working without the VT-18X board present. I don’t think I need it yet. My understanding is that the VT100 side should come up cleanly without it. I could of course be wrong but I’m going down this road for a while.

The photo above shows what I’m dealing with. The keyboard has sensible lights on but I don’t know yet if that means anything.

My first job as always is to try and re-seat all of the socketed chips on the board. I’ve don’t that and it made no difference. Oh well.

Going in.

Next step, are the voltages correct? The VT100 has an Intel 8080A processor on board and that needs care and feeding.

Off with its head.

One thing I’ve always liked about DEC equipment is the way they built it. Their kit always feels like it was ment to br built and stay together but they also kept in mind that you will need to service it.

160102-IMG_20160102_140931The photo on the left shows one of four plastic “poppers” that hold the case halves together. There are also four bolts to hold the steel frame in but that’s it. Dead easy.


Check the power supply.

Using the diagrams in MP00633_VT100_Schematic_Feb82.pdf I checked the voltages on all of the pins. Everything is OK with the exception of the 12V line. I can see that there should be 12V on the orange wire but there is hardly anything there at all 0.4V and just ain’t enough.

Is that my problem?

Hmmm. The CRT uses the same 12V supply and you can see from the top photo that the CRT is working. When I tested the voltages I didn’t have the CPU board in and the CRT didn’t come on. When I plug the CPU board in, the 12V comes back.

Doh! Red herring.


Retrochallenge 2016 – Setting up my stall.

On the eve of ‘challenge I have retrieved my VT-180 from the “shelf of good intentions”. I have taken photos of the two main boards and powered the machine up to see what happens.

151231-IMG_20151231_112224 151231-IMG_20151231_112314The first board basically the Z80 board. The second is a VT-100 terminal (if I remember correctly) and they talk to each other over the flat ribbon cable in the second photo.


At the moment I don’t have the processor board in place as I think the VT side should come up without it. However, the current state of play is less than ideal.

151231-IMG_20151231_174248Roll on Tomorrow 🙂


Retrochallenge 2016. Step forward VT-180.

7ed07f63f5e5d6b2074f8a85a85c287eI was given this VT-180 machine a few years ago and after a quick look, I put it on the shelf to get round to later.

Retrochallenge 2016/1 is the later it’s been waiting for.

My aim this January is to mend this rather under rated but rather splendid CP/M-80 machine and get it to live, breathe and jump again.

Quick, to the Bat Cave.

Retrochallenge 2016 – Decisions decisions.

Retrochallenge 2016 will soon be upon us. This month long chance to dust off old kit and play about a bit is always great fun and a chance to get round to stuff I’ve wanted to have a crack at for ages.

Tradition dictates that I try in all earnestness to achieve something but I don’t hit my target. I’m not sure that it matters.

So, what to go for this time around? I’m not too sure yet. I certainly have a number of loose ends to tie up. I also have a whole load of new threads to pick at.

I quite like the idea of getting a SCSI/SD card adapter working on my PDP-11. I’ve got as far as plugging it in. Could January be its month?

Last month I found out about DEC’s T11 chip. This was

"a microprocessor that implements the PDP-11 instruction set architecture (ISA) developed by Digital Equipment Corporation. The T-11 was code-named "Tiny". It was developed for embedded systems and was the first single-chip microprocessor developed by DEC."

I’ve found a few designs for systems that use it, including DEC’s own development board, and I rather like the idea of building a small single board computer based on that design. A bit like the designs that Grant Searle as published for other retro processors.

Also, I promised myself that I’d spend some time on the DEC Robin AKA VT-180 CP/M machine that’s been on the shelf of “good intentions” for a few years now.

Oh well, still a few of weeks to choose before kick-off on Jan the 1st.  Wish me luck.



Retrochallenge… Final score.

As another Retrochallenge comes to an end it’s time to see how I got on.

Close but no cigar.

This last week has not seen a lot of progress. Plenty of things happened under the skin of CellarScramble but nothing that shows.

I have split the code out from its monolithic file into a number of modules and started using Monkey Studio IDE for editing the code.

I have functions for rooms and tiles as before. I have added provision for multiple sprites and added vSync detection for controlling the timing.

Rather enjoyed this. I may continue with it of perhaps leave it until RC2016/01. I’m not short of retro projects to get on with in the mean time.

CellarScramble. A bit of progress

CSWalkThroughThe story so far.

As we wizz through the half-way stage there has been some progress.

I have written code to handle a collection of upto 256 8×8 tiles. I also have structures that arrange tiles into upto 255 rooms of 4×3 tiles each and routines that can draw a room and tell me what room I’ll end up in if I leave the current one in any direction. This means I have a complete map of 30 rooms at the moment, interconnected.

Next up I have some routines that can handle my player sprite. I can read the screen memory below the sprite (so I can put it back later), draw a sprite and then put the ground back (told you I’d need it later).

The little GIF is a walk through of part of the cellar (click on it to see the animated version).

Currently there is no collision detection, baddies, goodies and there is no timing and video blanking type work. But, not bad so far.



Retrochallenge – CellarScramble. Moving along.

I have decided to try a game on the Sharp-MZ-700 and called it CellarScramble.

It’s a top down dungeon run and as the Sharp only has character based graphics I’ve gone the route of defining 8×8 tiles and making the rooms out of these tiles.

I’ve now defined a map of 30 rooms and the tiles that make them up. I’m not going to show you the map, that would spoil the surprise. 🙂

Now I need some coed to move sprites and check for collisions. Hmmm.

Retrochallenge – A bit of a plan.

In my first post of this season’s Retrochallenge I did a bit of experimenting around memory-mapped screen access on the Sharp MZ-700. I’ve decided to try and come up with something a bit like “Atic Atac” a splendid top-view runing about game for the spectrum.

The Sharp doesn’t have dot-addressable graphics like the Spectrum so everything is character based. So it’s going to be different but we’re working with the tools we have.

So far I have written some code to draw rooms using tiles and so far, I’ve got one room…

Screenshot from 2015-07-12 16:17:00Now I’ve got code to draw rooms and a pallet of tiles, I can build a dungeon.

Welcome to…

Cellar Scramble

Mwaa Ha Harrr.

Retrochallenge 2015 – Here we go.

We’re four days into retro challenge and I’ve finally got started.

My plan is to do “something programmy” on a Sharp MZ-700. I’ve set up my stall and now for the programming. I’ve not used C on a Z80 before nor anything beyond “Hello World” on an MZ-700 so I need to find out some basics.

First I’m going to output a character grid using memory mapping (rather than standard output – printf) because I get further, memory mapped screen access will be needed.

I’m using Z88DK to write in and MZ-700 emulator under DOSBOX to test. I’ll try it on a real MZ-700 before I’ve finished.

First, some code…

 * charmap.c
 * A simple memory mapped display of the character and colour map on
 *  the Sharp MZ-700.
 * Andy Collins. July 4th 2015.

#include <stdio.h>
#include <stdint.h>
#include <string.h>

void main(void)
  u8_t  *screenRam = 0xD000;         // Start of screen memory. Top left.
  u8_t  *colourRam = 0xD800;         // Start of colour attribute memory. Top left.
  u8_t  xLoop = 0;
  u8_t  yLoop = 0;
  u8_t  currentChar = 0;
  const u8_t myChar = 0x41;

// Output a square with the complete character set.
  screenRam += 4 * 40 + 4;         // Move top left in a bit
  for(xLoop = 0; xLoop < 16; xLoop++)
    for(yLoop = 0; yLoop < 16; yLoop++)
      *screenRam++ = currentChar++;
    screenRam += 24;
// Now a square of the colour combinations
  screenRam = 0xD000 + 4 * 40 + 20;  // Start of colour square in screen RAM
  colourRam += 4 * 40 + 20;         // Move top left in a bit
  for(xLoop = 0; xLoop < 16; xLoop++)
    for(yLoop = 0; yLoop < 16; yLoop++)
      *colourRam++ = currentChar++;
      *screenRam++ = myChar;
    colourRam += 24;
    screenRam += 24;

And a screenshot…

Screenshot from 2015-07-04 11:44:43Tadaa :-).


Setting up my stall for Retrochallenge. Hello World on the MZ-700.

It has become a regular occurance in my life… The twice yearly Retrochallenge comes along and I am ill prepared and can’t decide what to do or how to do it.

To quote from the website…

In a nutshell, the RetroChallenge is a loosely disorganised gathering of RetroComputing enthusiasts who collectively do stuff with old computers for a month.

This is one real world example of it not being about winning but taking part. Really, I’m not kidding. Well for me it’s the taking part. Or it would be about taking part it I did. Of course, your mileage may vary.

I tried a few years ago. I set up a web server on an Apple Newton and did have some success but things conspired against me and the machine kept dropping off the net for reasons unknown.

This year things could be different. Maybe.

Now it’s still a couple of weeks to kick off but I think I’ll set up my stall and try and get a plan.

Enter the Sharp MZ-700.

I’ve had my Sharp MZ-700 for a while now but haven’t really done much with it but a post on the UK Vintage radio repair and restoration website (vistit now, visit often) made me dust off the old thing and fire it up.

Having fired it up and fired off a response to the original poster I have decided to do “Something programmy” with it for Retrochallenge.

Short of “Hello World” in BASIC I haven’t programmed on the Sharp at all so this is going to be intersting.

Z88DK – The cross compiler.

My plan is to do my “Something programmy” in C and use a cross-compiler to build it for the Sharp. To be honest, I’m not sure if that’s allowed as I’ll be using a modern PC to type on and build but I’m writing it for the Sharp and running it on the Sharp. I’ll see what people think.

A Z80 cross compiler seems quite rare but I found Z88DK and decided to use that.

There is a great introduction to setting up Z88DK here and that’s what I have done. Be careful with some of the steps as the text formatting is a little off in places but the information is there.

Hello World.

Having set up the build environment I tried a “Hello World” program…

#include <stdio.h>

  printf("Hello World\n");

Not exactly MISRA compliant but it builds.

$ zcc +mz -lm -ohello -create-app -Cz hello.c
cp /home/andy/z88dk/lib/mz_crt0.opt /tmp/tmpXX6cA7vl.opt
cp /tmp/tmpXX6cA7vl.opt /tmp/tmpXX6cA7vl.asm
zcpp -I. -DZ80 -DSMALL_C -DSHARPMZ -D__SHARPMZ__ -DSCCZ80 -I/home/andy/z88dk/include hello.c /tmp/tmpXXM4OudA.i
sccz80 /tmp/tmpXXM4OudA.i
copt /home/andy/z88dk/lib/z80rules.2 < /tmp/tmpXXM4OudA.asm > /tmp/tmpXXM4OudA.op1
copt /home/andy/z88dk/lib/z80rules.1 < /tmp/tmpXXM4OudA.op1 > /tmp/tmpXXM4OudA.opt
z80asm -eopt -ns -Mo -I/home/andy/z88dk/lib /tmp/tmpXXM4OudA.opt
z80asm -a -m -Mo -L/home/andy/z88dk/lib/clibs -I/home/andy/z88dk/lib -ohello -igen_math -indos -imz_clib -iz80_crt0 /tmp/tmpXX6cA7vl.opt /tmp/tmpXXM4OudA.o
appmake +mz -b hello -c /tmp/tmpXX6cA7vl

Now turn it into an audio file to play to th Sharp…

$ appmake +mz --dumb --audio -b hello.m12

Info: name found in header: HELLO

Info: file type:         1
Info: program location:  $1300
Info: binary block size: $352
Info: start address:     $1300

So now we have a .wav file or my hello world program. Pop in a cassette adapter and play the wav.

IMG_20150614_200225282A bit odd but wait a minute and look again. I said “Hello World\n” but forgot that the MZ-700 doesn’t have lower case. Let’s try again but upper case only and with a leading “\n”.

IMG_20150614_204250990Tadaaa!. My stall is set up. Roll on July!