Beta Testing a New Windows-enabled Colour Genie Emulator

Over the past month or so I've left my hardware alone and instead have been involved in two software projects. One was the Stringy Floppy adventure. The other project (and subject of this blog entry) was assisting software whiz Attila Grosz to alpha- and beta-test his new Windows-enabled Colour Genie Emulator.

A new emulator proposed

One of my Colour GeniesThe EACA Colour Genie is the younger sibling of the Dick Smith System 80 (aka Video Genie, or PMC-80), a venerable unit in this part of the world. Being a TRS-80 Model 1 clone, many good emulators are available for the System 80. However, this was not the case for the lesser known Colour Genie. A few old CG emulators for MS-DOS were kicking around the Internet . Windows users could run these in DOSBOX but it was a clumsy process. Besides, these MS-DOS programs were unsupported. A Windows version was sorely needed.

Attila Grosz had written a very capable System 80/Video Genie emulator (HT 1080z) which is available as freeware. Conveniently, both the System 80 and the Colour Genie use the Z80 processor. A few months ago in a fit of inspired enthusiasm, Attila decided to adapt the HT 1080z interface and Z80 virtual processor included in it, to emulate the Colour Genie.

I was very pleased about this. Maybe it was because I have two Colour Genies? Or perhaps it was because I have a strong historical interest in EACA machines? Maybe it's because I just love emulators! There is something about a computer running a virtual machine. I am in awe of those that can write such things, just as I am of those that can build the hardware.

Colour Genie AdAssistance with information

Attila made his intentions known through the EACA Google Forum and several of us regulars pitched into help him. Attila's main problem was that he didn't have a real machine to test software on! He needed one to assess the behavior of various parameters and to ascertain if observed behavior in the developing emulator was an emulator bug or an error in the Colour Genie program itself.

The discussion forum was great for this. During the process, both I and others could give Attila feedback on the emulator and how a real machine behaves. We could also share the documentation we had.

Extracting ROM images

Attila had a version of the upgraded 25-row ROM already from one of the older MS-DOS emulators, but not an original 24 row one. I had a machine with an original ROM, along with a unit with an upgraded ROM that showed a slightly different boot-up screen to Attila's. It was decided to extract these ROMS. This posed a series of problems for me though namely:

  1. What program could I use to write the ROMs out of the Colour Genie?
  2. How could I get the ROM image to Attila as a binary file?

I first looked at using BASIC to PEEK the values out and writing them out the cassette port using INPUT#1. I soon gave up on that idea after I calculated it would take me 9 hours to read the ROM and the resulting data file (in WAV format) would be gigabytes in size!

Colour Genie ROMS

Photo 3. Original ROM (left) and upgraded ROM (right)

The solution: Colour Monitor

Some of the MS-DOS Colour Genie emulators had software archives. In one of these archives I found a machine language monitor program called "Colour Monitor 3". I was sure this would have a facility to dump a specified portion of memory (like the ROM) to tape and thereby save it as a WAV file through the LINE IN port on my PC soundcard.

However, although this would solve problem 1, it had two problems of its own:

  1. I had no instructions on how the Colour Monitor program worked
  2. The file was in .CAS (i.e. emulator) format, so I couldn't just load it into my Colour Genie through the soundcard. I needed it in WAV format.

Problem 1 was solved by New Zealander, Norm Bowden from Christchurch. Norm just happened to have the manual for Colour Monitor 3! He OCR'ed it and sent me the file. Problem 2 was solved by Attila himself who wrote utilities to allow WAV to CAS conversions. These worked and I soon had a WAV version of Colour Monitor 3 which I could load into my Colour Genie via the PC soundcard and then write out the ROM contents in cassette SYSTEM tape format.

Colour Monitor

Photo 4. Colour Monitor Screen while writing the ROM

These ROMS were duly uploaded to the EACA discussion group where Attila had access to them.

Would the real Palette please stand up!?

Much of Attila's time developing this emulator seemed to involve palette issues. After we had three different ROM versions and at least three REAL machines for testing (one upgraded unit in Germany, and one original and one upgraded in New Zealand), something became clear. Not all Colour Genie's were created equal! Each machine seemed to show a different palette? This appears to be due to differences in the hardware needed to accommodate the televisions in the country of sale. For example in New Zealand, TV sets of the day were VHF only whilst in Europe they were UHF. For technical reasons I don't fully understand, this meant that the values attributed by BASIC's COLOUR command could differ. The most important one I came across was COLOUR 16 which when used in the European machine showed white, but in my two Colour Genies showed black? As you can imagine, this causes software incompatibilities. Try reading letters on a black background on a New Zealand machine where a European author has used COLOUR 16 for the text!

Colour Genie palette differences

Photo 5. Differences in the Colour palette in my two Colour Genies. Numbers at the left correspond to the parameters for the COLOUR command in BASIC. Note that number 16 is black which is why both the letter and bar are invisible!

In the end , Attila accommodated ROM and palette differences simply by allowing the user to choose which ones they wanted. Do you want a Southern Colour Genie, or a Northern one? (-:

Testing programs

In the final stages of debugging I went through over 170 programs I'd collected from around the Internet. Of these I found 21 were damaged and didn't work on my REAL Colour Genie let alone the emulator. However of the remaining, only ONE (a word processor) didn't work in Attila's emulator.

That's pretty good going.


Photo 6. Eliminator in the Genieous Emulator

Attila has finished working on his emulator (called Genieous) for the time being and has released version 1.0. It emulates a cassette-based machine only (for now), and the external ports are not emulated. However, it's pretty close to the real thing and seems to run over 99% of the software. If you you want a retro experience with this emulator, go to the bottom of my Colour Genie page. There you'll find links to download the emulator, pick up some programs, find some documentation and generally have a blast!

Here is Attila's take on the project (in his own words):

I guess I somehow have a soft spot for old, ill-fated 8-bit computers, machines that never really "made it". I don't really know why? I guess it has to do something with the fact that for a long time I had to put up with computers that were in a sense sub-par or for other reasons disliked by the greater public.

It was the Video Genie that lured me into the world of computing during my childhood. I've remained trapped ever since! The first emulator I ever wrote was for the similarly ill-fated Commodore 264 family (C16, plus/4).

The main reason I finally took on the challenge to write a Colour Genie emulator is that after having a brief look at the technical manual and commented ROM listings they all looked quite concise, and it appeared that in one way or another I already had all elements in my earlier emulators. It seemed I could reuse the skeleton of my Video Genie emulator (the very aptly named "HT1080Z") as well as drop in some source code from my Videoton TV Computer (that has a CRTC video controller IC) emulator. Since the Hungarian version of the Video Genie had an AY-3-8190 PSG, it was not difficult to add that either. I felt that our EACA Forum group would also embrace the effort and provide support through testing and feature requests. This is what happened and I am thankful for that.

It also seemed a natural extension of what I had already done with the HT1080Z. At first I considered extending this emulator to incorporate the Colour Genie as well, but it appeared quite early on that a separate build would be more efficient.

So far I have been unable to make the disk controller emulation work. We have very little hardware information on the interface and ideally I'd need a commented ROM listing of the DOS. This is allegedly being prepared by one of the EACA Forum members (kudos for that!). It takes a lot of patience!.

- Attila Grosz

It's been great to see this come together. This was a fun experience and illustrated the power of the Internet for collaborative projects. As a bonus, the existence of Attila's CAS/WAV transfer utilities mean my REAL Colour Genies now have about new 150 programs they can use!


28th July, 2009

comments powered by Disqus