Archive for December, 2013


Adding CGA to Bob’s Fury

Bob's Fury Title Screen

Bob’s Fury Title Screen

As a small project I decided to add CGA graphics capability to my DOS platform game, Bob’s Fury. I have already implemented EGA, VGA (mode 13h) and VESA (640×400) modes. I had hoped to be able to run the game on older machines including 286 class machines as a minimum specification. The trouble being that the EGA mode tends to be a bit slower because of the way its video memory is laid out (planar mode). VGA mode 13h works quite well, but machines of that vintage do not necessarily have a VGA card.

Bob's Fury gameplay

Bob’s Fury Gameplay

Early 286 machines were about 6-8Mhz, but had speed advantage over 8086/8088 machines because of being a more advanced processor. Later 286 machines got to about 16-20Mhz on average, but as high as 25Mhz about the time the 386 came out. This makes the 286 class an interesting beast as performance can vary quite a bit not only based on the processor, but also the speed of the RAM and chipset. It also spanned quite a change in graphics capability as it started when CGA was standard and lived until the early days of VGA.

Hence my desire to add CGA support.

EGA Screenshot

EGA Screenshot

I haven’t written my own graphics drivers for the game, partly because that’s tones of work especially if you want to support multiple video cards. I’m using Borland’s Turbo Pascal 6.0 and I used the Graph unit built-in. It uses drivers stored in BGI files so you can write an application that works with a number of video cards and modes. This has made the programming relatively easy to add new graphics modes, which is part of the reason I started adding support for older cards. I have heard the disadvantage of the BGI/Graph system is that is can be slower performance wise compared with assembly code.

My main problem adding CGA support is the same as before, converting my existing VGA artwork to a 4 colour palette. I had solved this problem for 16 colours when I initially added EGA support with a horizontally doubled resolution, but because the only CGA modes with colour are 320×200 I wasn’t going to be able to do the exact same thing again.

CGA in game.

CGA in-game.

I eventually worked out technique that I’m happy with. It’s a little bit more complex than the technique for EGA because of the very limited number of colours. I allocate CGA colours to the most commonly used VGA ones, then using the neighbouring pixels work out what the best CGA colour would be for the remaining VGA colours.

Whoa thats a lot of green!

Whoa that’s a lot of green!

The end result is ok for CGA, but clearly not as good as the other modes. After testing I found it was quite a bit faster than EGA, but not as fast as VGA as expected. It means the game should run on a 286 of pretty much any type now. Whether they are slow or fast and have CGA,EGA, or VGA.


Amstrad NC100 Laptop

Amstrad NC100

Amstrad NC100

Today I’m looking at one of the micro computers in my small collection, the Amstrad NC100 laptop. It was released back in 1992 arguably after Z80 machines were no longer relevant. However because it was small and inexpensive it sold quite well because PC laptops of the time were quite expensive.

The machine is faster than other Z80 portables of similar vintage running at 6Mhz! It has 64K of battery backed up RAM which can’t really store all that many programs or data. Fortunately the built in software is quite good for basic tasks such as word processing and managing a diary and address book. The built in RAM can be expanded with PCMCIA SRAM cards and I am fortunate enough to have the maximum upgrade in the form of a 1Mb card, now if only I could get a 2325 battery to replace the dead one in it.

Expansion Card

Expansion Card

You can transfer files to and from the machine using XModem transfer over serial. The machine was frequently used by journalists in the field to write documents and be able to submit their reports via modem. It’s also useful for transferring programs to the machine or to PC for backup. There is a serial terminal built into the ROM so it could be used to access BBS services or act as a terminal for a larger machine.

The machine has BBC Basic on it, which was one of the better interpreters of the micro computer era. There are a number of statements that don’t work however, but it’s all fairly well documented which is fortunately available online. A number of people have developed different games and applications for it. The interpreter is of course not as fast as machine code, so if you know Z80 assembler that’s a better way to code for the machine.

It uses standard AA batteries and has quite a generous running time on a fresh set. The display is a simple 80×4 character text LCD with graphics capability, so the screen doesn’t use up tones of juice. It can be a bit hard to read depending on the light, but there is a contrast control to help make it more readable. The keyboard is a bit mushy, but quite usable and certainly better than some of the really cheap keyboards around.

I found the Amstrad NC100 a fascinating machine to use. It’s built in ROM makes creating documents and basic organiser functions quite easy, and the program-ability of BBC Basic makes it quite versatile. It is however quite limited in many aspects such as the display and amount of memory, but for the time it was one of the best portables around. I got mine of Ebay some time ago, and I frequently use it as an easy to store and use serial terminal for my bigger Sun machines. I would like to own a NC200 for the larger screen and floppy, but those appear less frequently at a price I’m willing to pay.

Some pages that would be interesting to owners of the Amstrad NC100/NC200

Tim’s Amstrad User Site

Tear-down on EEVBlog for repair

Finally as it is that time of year, I’d like to wish everyone a happy holiday season, which-ever holiday it is that you celebrate.


Paku Paku for DOS

Having just got back from my trip away, I haven’t had much time this past weekend. I did backup some 5.25 inch floppies I brought back with me, but I was unable to get what I had planned for this week working. Step in Paku Paku which is actually a recently made DOS Pacman clone for the IBM PC. It uses the hacked CGA text mode to get 16 colours on screen at the same time in the same way that Round 42 does. Jason M Knight made it in 2011 as part of something known as the Retrochallenge winter warm-up. You can find his website here.

High Scores

High Scores

The graphics are very impressive and work on an impressive array of hardware, everything including CGA, EGA, VGA and Tandy/PC jr. Whilst the pixels are larger, the graphics are colourful, nicely animated and move as you’d expect them to. The graphics were programmed with a mix of Turbo Pascal 7 and assembler and Jason has included the source so you can write games/software that has the same graphics capability.

Getting fast now!

Getting fast now!

There are many different sound devices supported, including the PC speaker, Creative Music System (CMS), Adlib, and a few others. With so many devices to choose from you are sure to have something that will work quite well. I tried both the Adlib and PC speaker for sound and was astonished at how close to the arcade they both sound. The documentation says the CMS probably sounds the best, but I didn’t test this.

The controls are as you would expect, simple and easy to use. Turning corners is as you would expect, and the game responds correctly even in tight and fast sections of the maze. The ghost AI actively chases you and runs away at appropriate times, but with quick reflexes they can be outrun and outsmarted. The difficulty curve is not too harsh, and even I managed to get quite a respectable score.

Game Over

Game Over

Paku Paku is an impressive game, it fits 16 colour graphics and sound into about 66k of memory, about half being code. It runs incredibly well on old hardware such as the old IBM 5150, XT machines and clones. It’s not just impressive because of its technical features, it’s a well crafted clone of pacman. It’s obvious that great care has gone into the design of the graphics and sound. I’d recommend anyone with a Dos machine (or DosBox) and some time download it and give it a go.


Storage photo tour 2

This week I came back to my parents place to visit them. I keep some of my old computer parts and books here and I thought I would share some photos.


First up we have some processors, a 20Mhz 386DX along with the much rarer Intel Overdrive and 486sx that is mounted for use in a socket. The fourth processor I couldn’t identify because of a permanently attached heat sink.


This is my Dads old calculator that he bought back in 1975! Its got an LED based display and even came with a power pack for when the batteries ran out. It’s built out of a number of circuit boards and Dad couldn’t remember who made it. The only label on it says made in England.

MCA cards

These two cards came out of a Reply Corporation machine that my Dad bought. I believe they are micro channel architecture cards. IBM introduced the standard to try and make the main bus of PCs proprietary so they could charge clone makers royalties. It didn’t work out for them in the end. The top card is a IBM SCSI card with a card edge connector instead of the conventional one. The bottom one is a Madge Ringnode card, which is a token ring network card. This type of network was popular before Ethernet came along.

WD Hard disk controller

This is a Western Digital Hard disk controller from an old Epson computer an uncle gave my dad. I’m not sure if it’s for RLL or MFM drives but at least it seems to have a mask ROM that should have the low level format utility in it.

Epson Floppy Controller

This is the floppy controller from the same Epson computer, it has a Western Digital chip on it. It also has a serial and parallel port as was common on early PCs.

EGA Card

An EG-3000 EGA graphics card, it must be a later model as it’s quite small. The PCI VGA card is there for size comparison it’s a S3 Trio64.

NEC Floppy

This is an NEC FD1157 floppy disk again from the Epson computer, it’s an early 1.2Mb drive, you can tell by the stepper and spindle motor being larger and older style.


This is our old 386sx main board from our first PC, a Twinhead Superset 590. It has some damage from a leaky external battery, fortunately the board still works, but some connectors require replacement. The board has a chips and technologies chipset and a Paradise VGA adapter. The chassis was unfortunately ruined by the battery.


Dads floppy disk storage box and some KAO blank floppies in the box. I remember these primarily for how colourful they are.

Tandon Hard disk

A Tandon hard disk drive. I’m not sure but I think these drives like these could use different encoding methods, either MFM or RLL. The controller was largely responsible for most effort in encoding. This drive uses a stepper motor like many other old drives and is mounted inside a bracket with a faceplate and activity LED.

Basic books

The 30 hour basic book is what I first learned programming with, as you can see it was really for the BBC micro computer. I was using gwbasic on the 386sx pictured earlier. The gwbasic reference helped me learn more about the language and filled in the gaps. It meant I could achieve more with the graphics, until I ran out of memory.


Here is the main board manual and the Open Access handbook. The latter is for a office suite that we used before getting Microsoft Works.

Basic Manuals

Finally here is the gwbasic manual I was lucky enough to get with the Epson computer, it’s basically the same as the previous reference manual. When the Epson was built it was common for machines to come with programming manuals. Many early databases and basic commercial software was written using basic, gwbasic made porting these easier. Usually they came from CP/M machines.


Some NetBSD Games



Having recently upgraded the disk space on the Sparcstation I decided I would go about installing a bunch more useful utilities and some games. I installed some image processing and capture software called XV so I could capture screenshots on the machine, this is what I’ve used to capture todays screenshots. Todays games were too small to justify a whole post to themselves, so I thought I’d post about a few of them together.




One of the first games I built and tried was greed. It runs in a colour terminal and can be played via SSH or telnet. The game is very simple, you are an @ symbol in a playfield full of numbers. You move in the direction of one of the numbers which causes you to move that distance, erasing numbers as you go. In order to be allowed to move in a direction you must be able to travel the full distance specified by the number without hitting a border or an area you’ve already erased. The game ends when you can’t make any more valid moves.

You use the numeric keypad to move, which for me felt reasonably intuitive. The game has some nice in game help, and is simple to get running and play. It doesn’t take long to play so it’s good to for a quick distraction.




This game is modeled after missile command from the arcades, but with one difference, it’s in 3d. The vector graphics are quite nice but can be a little slow over a network connection for some reason. Fortunately the game has some built in commands to change the graphics settings. The controls are also a bit awkward, I found that it was too sensitive, such that small mouse movements often moved my targetting reticule way too far. Fortunately the difficulty curve isn’t too steep, but the control for this really let it down.




Xbomber is based on the bomberman series of games. It is interestingly a multiplayer game, but not implemented the way you might expect. The one program can connect to multiple X servers, allowing two players per server sharing the one keyboard. There is a maximum of four players over four X servers. You can also play solo against the computer AI, but it really is quite a weak player, it looks like it is just making random movements. It is probably not the easiest thing to set up the multiple displays, X authority stuff would surely get in the way, but I’m sure it can be done.




XJump is a simple platform game where you have to climb a tower. If you fall off the bottom of the screen the game is over. Controls are simply the arrow keys and work quite well. The part of game that will catch you out most often is the seemingly frictionless movement of your character. It is quite easy to jump and fly off the other end of the platform you’re jumping for. So it means you have to be quite careful how fast you move when jumping larger distances. Another game that is quite fun, but short.




I’m not sure where the name from this one comes from, it is a simple maze shooter, where you have to collect a number of animating stars around the level. You have to either avoid or shoot the badies around the levels, some of them will shoot at you. I’ve been caught out by bullets wrapping around the edges of the screen, I often shot myself! You can use this to your advantage, but more often than not it ends up hurting you. It’s a good little distraction, but the graphics could have been a little prettier.




Finally XWorm is basically a snake game plain and simple. It has some nice graphics, and simple controls that are easy to use. It plays quite fast, so you have to have pretty good reflexes to play for very long. There is only a bunch of mushrooms on screen to avoid, and a fence around the edge, so even Qbasic Nibbles has a bit more variety! Otherwise it plays quite well.

So there you have it, a few simple games that work on pretty much anything you can run NetBSD on with an X server (or from an XTerminal). Most of these were simple little distraction type games rather than anything you’d spend a lot of time playing. They are for the most part quite fun, and a reminder of what games under *nix like systems used to be like.

Blogs I Follow

Enter your email address to follow this blog and receive notifications of new posts by email.

Mister G Kids

A daily comic about real stuff little kids say in school. By Matt Gajdoš

Random Battles: my life long level grind

completing every RPG, ever.

Gough's Tech Zone

Reversing the mindless enslavement of humans by technology.

Retrocosm's Vintage Computing, Tech & Scale RC Blog

Random mutterings on retro computing, old technology, some new, plus radio controlled scale modelling.


retro computing and gaming plus a little more

Retrocomputing with 90's SPARC

21st-Century computing, the hard way


MS-DOS game reviews, retro ramblings and more...