Close

Running ColecoVision Games

A project log for Game Boards for RC2014

Run classic video games on your RC2014

jb-langstonJ.B. Langston 11/25/2018 at 17:074 Comments

After you've added the sound, video, and controller interface cards to your RC2014, you will no doubt want to run games on it. 

You will need to extract the ColecoVision BIOS (coleco.rom file) and game ROMs from your original console and cartridges, or, well, I'm sure you know how to use Google.

Once you have the ROMs, they need to be loaded into memory and launched. There are two ways to accomplish this: Using my z80ctrl monitor or from CP/M. 

Loading via z80ctrl

To load the games via z80ctrl, put the ROMs on the SD card, and boot into the z80ctrl monitor.  

When using the z80ctrl, the Pageable ROM module should be removed and the 64K RAM should be used by itself. Enter the following commands to load and run the game:

z80ctrl>loadbin 0 coleco.rom
z80ctrl>loadbin 8000 game.rom
z80ctrl>clkdiv 5
z80ctrl>run 0

These commands load the BIOS at address 0, the game at address 8000, set the clock divider to 5 (4 MHz), and start the Z80 at the BIOS entry point.  At this point, if you have all your cards configured correctly, the game will start.  

If you are using the 512K RAM/ROM board with z80ctrl, you must take a few extra steps:

z80ctrl>base 80000
z80ctrl>loadbin 0 coleco.rom
z80ctrl>loadbin 8000 game.rom
z80ctrl>poke 73b9 c7
z80ctrl>clkdiv 5
z80ctrl>run 0

The base 80000 command sets the base address to RAM so you that you can load the ColecoVision BIOS and game there.  The poke command is a workaround to fix a problem that occurs when using the 512K RAM/ROM board.  The next paragraph explains why the workaround is necessary and how it works.  If you don't care, just skip it and remember that you need to do this.

When the Z80 is reset, the page register on the 512K RAM/ROM board gets cleared, so ROM gets paged in instead of RAM. The Z80 will read the first opcode from ROM before z80ctrl can switch back to the RAM.  This is OK if the first byte in ROM and the first byte in RAM are the same, but in this case it isn't.  If you have RomWBW flashed in your ROM, the first byte will be C3, which is a jump instruction.  The first byte in RAM when the ColecoVision BIOS is loaded is 31, which sets the stack pointer.  This is a problem because the C3 from ROM gets combined with the next two bytes in RAM, which form the address 73B9, so the first thing the Z80 does is jump to 73B9 and starts executing whatever random data is there.  Poking C7 at 73B9 inserts a RST 00h instruction, which causes the Z80 to jump back to 0 and correctly execute the first instruction from the ColecoVision BIOS this time.  If your ROM has something other than C3 in the first byte, then this workaround won't work.

A few games execute a halt instruction and wait for an interrupt. These games will cause the z80ctrl to stop the Z80's clock and return to the z80ctrl> prompt.  If this happens, you will need to run the following commands to disable automatic halting and continue running the game:

z80ctrl>halt off
z80ctrl>run

Note that if you disable automatic halting, you will not be able to stop the game using the z80ctrl's halt button; you will need to use the z80ctrl's reset button instead.

Loading via CP/M

If you want to launch the games from CP/M, you will need the 512K ROM 512K RAM module for RomWBW instead. The Pageable ROM board that comes with the RC2014 Pro kit is not compatible because of a port conflict with the video card. When the game tries to write to the video card, this pages in the RC2014 ROM instead of the RAM containing the game, and the game crashes. 

On the clock module, set Clock 1 to 3.6864 MHz. This is close enough to the ColecoVision's system clock of 3.57 MHz that games will work. Note that if you are using the standard SIO/2 module, reducing the clock speed will half your baud rate from 115200 to 57600. Make sure to adjust your terminal emulator accordingly.

In addition to a working installation of RomWBW, you will need the game loader I wrote.  This is a small CP/M program that loads a game ROM into memory and then starts it.

The loader needs the ColecoVision BIOS in order to build, so you will need to obtain the coleco.rom file and place that in the same directory with loader.asm.  Next you will need to cross-assemble the loader using sjasm.  This should create a file called loader.out, which you will need to rename to coleco.com and upload to CP/M via Xmodem (which comes standard with RomWBW):

A>B:XM R COLECO.COM

Now initiate the upload from your terminal program (TeraTerm recommended). You will also need to upload ROM files for any games you want to play using the same procedure.  

Once you have uploaded the loader and the games you want to play, launch a game using the following command:

A>COLECO GAME.ROM

This will take a few seconds to copy the game into memory and then print a message that the game has been loaded and the game will start. Once the game is started, you will need to reset your RC2014 to return to CP/M.

Discussions

Jorisclayton wrote 09/13/2023 at 17:53 point

Hello friend, Im building my own computer, its kinda simmilar to the RC2014 but Im doing all by myself from scrath, so I can modify anithing I want. I would love to run coleco vision games on it like you does but I only have at that time more two 32KB RAM chips and some 32KB ROM chips. I already build the memory board with the first 32KB addressed to ROM (that will be switched to other 32KB RAM when needed) and the seccond 32KB to RAM, Im not done with the bank swithing logic at that time. My question is abouth the 512KB RAM 512KB ROM Module and the address conflict with the coleco games, there is a way that I can map my existing memory and build the switching logic to abvoid this board? Could you give me a help with it?
I pretend to run CP/M on it sooner, but im building the Compact Flash interface and the SIO/2 serial interface yet.
Thank you very much by your work and help!

  Are you sure? yes | no

hackaday wrote 03/03/2021 at 00:16 point

Doh! Thanks!

  Are you sure? yes | no

hackaday wrote 03/01/2021 at 01:12 point

Where'd the 'base' command go? The latest z80ctrl firmware doesn't have it.

  Are you sure? yes | no

J.B. Langston wrote 03/01/2021 at 02:20 point

You must have compiled it without support for paging. Check your Makefile and make sure BANK_PORT is uncommented.

  Are you sure? yes | no