Close
0%
0%

Game Boards for RC2014

Run classic video games on your RC2014

Similar projects worth following
This is a set of add-in boards that allow the RC2014 to run video games, including unmodified ColecoVision games:

- TMS9918A-based video card
- SN76489-based sound card
- Controller interface card

Each board has its own GitHub project with further details.

The TMS9918A-based video card allows the RC2014 to produce NTSC composite video using a classic chip from the 1980s.  This chip was used in the MSX and ColecoVision, and the board can be configured to be compatible with software from both.

The SN76489-based sound card provides music and sound effects for the RC2014. This chip was used in the ColecoVision and many other Z80 based computers and game consoles. It can be configured to use a wide range of ports for wide compatibility.

The controller interface card provides a DB-9 joystick interface compatible with Atari joysticks, Sega Genesis gamepads, and ColecoVision controllers. The joystick interface uses the same ports as the ColecoVision and provides buttons to emulate a numeric keypad when using non-ColecoVision controllers.

z80ctrl board is the easiest way to load games into memory and launch them. I have also written a launcher for CP/M that is compatible with the RomWBW 512KB RAM/ROM board for CP/M.  See these instructions for details.

TMS9918.pdf

REV3 Schematic (PDF format)

Adobe Portable Document Format - 79.91 kB - 09/24/2018 at 01:54

Preview
Download

rc9918_rev3.zip

REV3 gerber files

x-zip-compressed - 51.28 kB - 09/24/2018 at 01:51

Download

bold.zip

Bold MSX Demo

x-zip-compressed - 38.76 kB - 06/29/2018 at 01:11

Download

  • Running ColecoVision Games

    J.B. Langston11/25/2018 at 17:07 0 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. 

    To load the games via z80ctrl, put the ROMs on the SD card, and boot into the z80ctrl monitor.  Enter the following sequence of commands  to 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, you should see the game start up.  

    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.

    Unfortunately, the Pageable ROM board that comes with the RC2014 Pro kit is not supported 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. When using the z80ctrl, the Pageable ROM module should be removed and the 64K RAM should be used by itself.

    If you want to launch the games from CP/M, you will need the 512K ROM 512K RAM module for RomWBW instead. 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.  The game should now be running. Once the game is started, you will need to reset your RC2014 to return to CP/M.

  • Full ColecoVision Compatiblity

    J.B. Langston11/21/2018 at 03:22 0 comments

    This project began several months ago with the development of my TMS9918A-based video card.  With the recent addition of my SN76489 sound card and joystick interface, I have achieved full compatibility with unmodified ColecoVision games.  Check out this video to see what it can do:

    For those interested in all the gory details, I have produced a video with an in-depth explanation:

    Additional details for each board, including a bill of materials and technical documentation, are on their respective Github pages:

    z80ctrl board or RomWBW is required to load games into memory and launch them.

    Many thanks to JLCPCB for sponsoring the prototypes of these boards. Whether  you want to manufacture my boards for your RC2014, or you need to prototype your own electronic project, JLCPCB is an excellent choice. They produce top quality PCBs for an incredibly low price and their service is fast.  I routinely get 5 day or quicker turnaround on my projects, order placed to board in hand.

  • Kits Available

    J.B. Langston09/19/2018 at 13:42 0 comments

    Michael Kamprath has, with my permission, started selling ready-to-assemble kits on Tindie.  Michael sent me one of the kits, which I put together, and it works great. I had no interest in selling these kits myself, but I was happy that Michael wanted to make it easier for people to get one of my boards if they want one.  I offer no warranty or guarantee of support.

  • PCB Manufacturers Compared

    J.B. Langston08/14/2018 at 14:20 0 comments

    Now that I have experience with three PCB manufacturers, I would like to share my impresson of each of them.  The tl;dr is that having tried OSH Park, Seeed Studio, and JLCPCB, I will manufacture my boards with JLCPCB in the future.

    Full disclosure: JLCPCB offered me a free batch of PCBs in exchange for writing a review; however, they did not influence this review, and what follows is my honest opinion based on my experiences.

    Ordering Experience

    OSH Park has a very user friendly website and allows uploading KiCad and Eagle PCB files directly so you don't have to convert them to gerbers first.  They also make it easy to share your designs for other people to manufacture. This makes it much easier for a beginner to place an order.

    Seeed Studio's website is considerably less friendly than OSH Park's.  I had intended to order my second batch of boards from them but I encountered a problem with their online gerber viewer which made me nervous. The drill holes for all of the pads were not showing up in the correct place.  I emailed Seeed Studio about this and they said it was a bug in their gerber viewer, and to go ahead and order my boards since someone would review the layout for any problems before manufacturing.  However, the experience didn't inspire much confidence, and by the time they got back to me the next day, I had already placed my order with JLCPCB.

    JLCPCB's website is also not as easy as OSH Park's, and requires generation of gerber files, but the ordering process went smoothly and the images from their gerber viewer looked correct. JLCPCB is also affiliated with EasyEDA, a web-based PCB design suite.  I have played with EasyEDA some and it seems like a good tool, but all of my final designs have been done in KiCad.  Strangely, I could not find any way to directly submit PCB designs from EasyEDA to JLCPCB for manufacture, which seems like a natural advantage they could offer. But unless I missed something, you still have to generate gerber files and upload them.

    Price

    OSH Park is much more expensive than manufacturers based in China.  A batch of 3 boards cost $38.70 with free shipping. JLCPCB charged me $5 for a batch of 10 boards, and they had a special on my first order of 5 boards for $2. Even with $18.47 shipping from China factored in, it was more expensive to order 3 boards from OSH Park than was to order 15 boards with 2 separate designs from JLCPCB. Because of the expensive shipping, it makes sense to order multiple batches of boards from China at once if you can.

    This isn't a completely fair price comparison, since the JLCPCB boards were made with a leaded HASL finish versus OSH Park's more expensive gold-plated ENIG finish. JLCPCB offers ENIG, which was still cheaper than OSH Park, but much closer in price.  However, OSH Park only offers ENIG so you have to pay the premium for it even if you don't want to.  

    Seed Studio also offers HASL and ENIG options, and in general was slightly more expensive than JLCPCB for a comparable board. Since I didn't order from them, I don't have a record of the exact prices quoted.

    Lead Time

    Even though OSH Park is located in the US, my boards took longer to arrive than they did when I ordered them from JLPCB in China.  With OSH Park, I placed my order on Feb 15, the boards shipped via USPS on Feb 26, and arrived on Mar 1 (total of 15 days).  With JLCPCB, I placed my order on Jun 14, they shipped via DHL on Jun 19, and arrived on Jun 21 (total of 8 days).  Since I never actually placed an order from Seeed Studio, I can't comment on their turnaround time.

    Board Quality

    JLCPCB and Seed Studio offer a choice between leaded HASL (the cheapest option), lead-free HASL, and gold-plated ENIG (the most expensive option).  OSH Park only offers the...

    Read more »

  • Zero Vias

    J.B. Langston07/27/2018 at 01:42 0 comments

    I admit that this served no purpose beyond the indulgence of my OCD, but I'm still damn proud of this achievement.

  • New Board Revision

    J.B. Langston07/24/2018 at 01:36 0 comments

    I've been working on a new revision of my board that will work with unmodified ColecoVision games.  I had some success getting a few games to run by modifying the ColecoVision BIOS but many games bypass the BIOS and access the ports directly, so it would be a lot of work to modify them all for compatibility.

    The new revision will have basically the same BOM as before with the addition of more jumpers.  Based on feedback from Mark on the RC2014 mailing list, I have hopefully made it compatible with the Sord M5 computer as well.

    Here's how the address decoding works:

    • J4 configures address bits 7-5 which lets you select a block of 32 addresses: 00-1F (left) ... E0-FF (right). For ColecoVision, you would set this to A0-BF (6th position). For MSX, you'd set it to 80-9F (5th position).  For Sord M5, you'd set it to 00-1F (1st position).
    • J6 configures address bit 4. There are 3 options: ignore (left), 0 (middle), or 1 (right). This lets you use the entire 32 address range, the upper half, or the lower half, respsectively. For ColecoVision, you would set this to ignore (left). For MSX and Sord, you would set it to 1 (right).
    • JP1 configures address bits 2 and 1. In the upper position, they must both be 0. In the lower position, they are ignored.  For MSX, you would set this to the upper position. For ColecoVision and Sord, you would set it to the lower position.
    • JP2 configures address bit 3. In the upper position, it must be 1. In the lower position, it is ignored.  For MSX, you would set this to the upper position. For ColecoVision or Sord, you would set it to the lower position. This allows configuration of the correct ranges for all 3 systems:
    • MSX 1 (98 and 99)
    • ColecoVision (A0-BF, with BE and BF typically used)
    • Sord M5 (10-1F; with 10 and 11 typically used)

    For other Z80/TMS9918A systems, such as the SpectraVideo and MTX, it should at least be possible to configure a superset of the correct addresses, but it may not be possible to decode the addresses as precisely as the original system.  Depending on what other peripherals such a system has mapped to any partially decoded addresses, this may or may not cause a conflict. This is the best that I can do without adding any more decoding chips, which I don't have room for on the board.

    I also added a jumper (JP4) to output the TMS9918A's interrupt signal to either INT (upper position) or NMI (lower position) on the RC2014 bus. There is now a second row of bus pins to connect NMI to the RC2014 bus.  ColecoVision connects the video interrupt to NMI, so this change was necessary for compatibility.  MSX uses INT, and most other systems do as well.

    Finally, I added a header (J7) with pins for (left to right) CPUCLK, GROMCLK, EXTVDP, and GND. This should allow the CPUCLK and GROMCLK signals to be used via jumper cables with other boards the need them, for example on the Sord M5.  It should also be possible to daisy-chain multiple TMS9918A chips using the EXTVDP signal, or to genlock an external video source. I added a GND pin to use with an external video source if needed.  

    I am going to check these changes into Github now but I am waiting to design my SN76489A sound card and ColecoVision joystick interface boards before I have them manufactured.

  • ColecoVision Games

    J.B. Langston07/08/2018 at 18:33 0 comments

    I have successfully run a few ColecoVision games with only a small modification to the Coleco BIOS in order to change the port used for the TMS9918A and make the maskable interrupt handler redirect to the NMI handler because the ColecoVision uses NMI for the TMS9918A's vblank interrupt, whereas my board uses INT.  

    So far, Donkey Kong and Burger Time are fully playable. For some reason I haven't figured out yet, Donkey Kong Jr hangs after the skill select screen. 

    I'm using a second MCP23S17 I/O expander hooked up to the SPI bus on my z80ctrl board to read the joystick. The z80ctrl reads the joystick value via SPI, and relays the results back to the Z80 over port 0xFC, where the ColecoVision code expects to find them.

    Unfortunately some newer games talked directly to the hardware ports instead of going through the BIOS so I will have to individually patch those games.  I have gotten as far as the title screen in Centipede and Star Wars after patching their ROMs to use the correct video ports.

    None of the games have any sound currently because the ColecoVision uses a TI SN76489 instead of the YM2149 chip that I have in my RC2014.  I may design a SN76489 board for the RC2014, or it might be possible to patch the ROMs to use the YM2149 instead, since both chips had similar capabilities. I haven't researched what all would be involved in doing this yet.

    Inexplicably, I am terrible at all of the games I've played so far. Clearly there is some kind of subtle incompatibility that is making these old games much harder than I remember them. Yeah, that's gotta be what it is.

  • Attention Please

    J.B. Langston07/03/2018 at 14:02 0 comments

    The RC2014's killer app has arrived...

    That is all.

    (And Source code is available.)

  • Build Complete

    J.B. Langston06/22/2018 at 02:22 3 comments

    The printed circuit boards I designed for my video card arrived in the mail today, and I got it put together.


    It works great. The amount of noise in the video signal is vastly reduced, and I no longer have any glitches during memory transfers.  With the board, I have been able to successfully run the Bold MSX demo on my RC2014 with Graphics and Sound, 100% glitch free.

  • MSX Demos on Homebrew Hardware

    J.B. Langston06/20/2018 at 01:35 0 comments

    I've been able to successfully run the Bold demo for the MSX 1 on the RC2014 with my TMS9918A video card. 

    Since I have mapped the TMS9918A's RAM and register ports to 98 and 99, the same as on the MSX, the demo will output video 100% unmodified. Unfortunately there is no audio in the unmodified code because the YM2149 sound card for the RC2014 does not support the port configuration used by the MSX.  With a minor modification, however, It's possible to get sound working.

    Rather than trying to get MSX-DOS to run on the RC2014, which would be a much bigger undertaking, I used my z80ctrl board to load the demo binaries directly from the SD card into memory at origin 100H. The demoa.com and demob.com files were extracted from the bold.dsk image using openMSX with the following console commands:

    virtual_drive bold.dsk
    diskmanipulator export virtual_drive .

    One tiny modification was made to demoa.com: I poked a HALT (76) at address 152 in place of the RET that was there before. This is necessary because there's no other software to return to, so I needed to halt the processor when this part was done so I could load the next part of the demo.  demob.com was completely unmodified, and was simply loaded at 100H and run after demoa.com halted.

    To get sound working, I needed to modify the routine in demob.com that sends audio commands to the YM2149.  The unmodified version looks like this:

    06fa  0e a0            ..     LD C,A0H
    06fc  21 f9 07         !..    LD HL,07F9H
    06ff  ed 79            .y     OUT (C),A
    0701  0c               .      INC C
    0702  ed a3            ..     OUTI
    0704  0d               .      DEC C
    0705  3c               <      INC A
    0706  fe 0d            ..     CP 0DH
    0708  20 f5             .     JR NZ,-11
    070a  ed 79            .y     OUT (C),A
    070c  7e               ~      LD A,(HL)
    070d  a7               .      AND A
    070e  f8               .      RET M
    070f  0c               .      INC C
    0710  ed 79            .y     OUT (C),A
    0712  c9               .      RET
    

    Port A0H is the address port, and A1H is the data port used by the MSX for the YM2149.  The demo loads A0H into register c, then uses the out (c), a and outi commands to send data to the chip at the port address stored in c.  It switches c back and forth between A0H and A1H using the inc and dec instructions.  I had to be careful about modifying the code because any change to the length of the instructions would change the offsets of the rest of the program and cause absolute references to those addresses to become invalid. 

    I had initially devised a much more complicated scheme but thanks to neon reminding me that "out (c), a" is a 2 byte instruction, the same as "out (nn), a", I was able to simply replace the "out (c), a" instructions with "out (nn), a" instructions that send data directly to the desired port.  I still had to load c with the data port address to use the outi instruction, but I no longer needed to switch c back and forth between ports, so I changed the inc c/dec c instructions to nops.  The modified version of the code that uses the default D0/D8 ports for the RC2014 YM/AY sound card looks like this:

    06fa  0e d0            ..     LD C,D0H
    06fc  21 f9 07         !..    LD HL,07F9H
    06ff  d3 d8            ..     OUT (D8H),A
    0701  00               .      NOP
    0702  ed a3            ..     OUTI
    0704  00               .      NOP
    0705  3c               <      INC A
    0706  fe 0d            ..     CP 0DH
    0708  20 f5             .     JR NZ,-11
    070a  d3 d8            ..     OUT (D8H),A
    070c  7e               ~      LD A,(HL)
    070d  a7               .      AND A
    070e  f8               .      RET M
    070f  00               .      NOP
    0710  d3 d0            ..     OUT (D0H),A
    0712  c9               .      RET

    I used z80ctrl's scripting facility to load both parts of the demo into memory and then automatically patch and run them.  With this script, it's possible to run the unmodified demo binaries simply by typing "do bold" (assuming the script has been saved in a file called bold and copied to the z80ctrl's SD card along with both demoa.com and demob.com).

    page 20
    clkdiv 4
    loadbin 100 demoa.com
    poke 152 76
    run 100
    loadbin 100 demob.com
    poke 06fb d0
    poke 06ff d3
    poke 0700 d8
    poke 0701 00
    poke 0704 00
    poke 070a...
    Read more »

View all 10 project logs

  • 1
    Visit GitHub

    Visit GitHub for BOM and build tips.

View all instructions

Enjoy this project?

Share

Discussions

David Kuder wrote 07/01/2018 at 15:08 point

Thanks for the inspiration to make my own TMS9918/AY-3 card for Z-80 STDBUS. I’m also working on a joystick interface that is compatible with the RC2014 AY-3 card aswell.

  Are you sure? yes | no

J.B. Langston wrote 07/01/2018 at 15:42 point

Cool! Let me know once you have details about the project posted. I am actually trying to get some ColecoVision games running on the RC2014 so that Joystick interface would be very handy. (See thread here: https://groups.google.com/forum/#!topic/rc2014-z80/d1iM0UVwYU8)

  Are you sure? yes | no

David Kuder wrote 07/02/2018 at 01:44 point

I've got a first attempt up here:
https://bitbucket.org/z80std/pcb/downloads/

GPEX*.zip is the adapter for MSX pinout joysticks.

For Atari joysticks you would need to swap a few pins around.

Additionally, some bodge resistors are likely to be necessary to pull the data lines high when buttons aren't being pressed.

  Are you sure? yes | no

J.B. Langston wrote 07/08/2018 at 23:21 point

For my ColecoVision project, I ended up building a joystick adapter out of a MCP23S17 I/O expander and having the z80ctrl board pass along the values via the expected port for the Colecovision.  I posted a few more details about it in a project log today.

  Are you sure? yes | no

David Kuder wrote 07/09/2018 at 18:41 point

Nice,  I got my boards in and have been working on getting all the chips together.  I'm hopeful that the 10.7MHz crystal will be in before this weekend so I can fire mine up without having to resort to using a signal generator.  The MSX gamepad interface boards are in and I'll assemble one of them when I get a hold of a PSG chip.

  Are you sure? yes | no

David Kuder wrote 07/21/2018 at 02:27 point

Mistakes were made, but some success was wrought.  I have the Nyan, Ascii & Mandelbrot demos working on my ProLog Z80 computer now.  I ordered the wrong type of crystal (I couldn't find parallel cut 10.73866MHz crystals, and had to build a 74ls04 clock generator with the serial cut crystal.  I have to track down a variable cap to tune the frequency in better (20KHz too fast for the color burst = no color).  Between the help from this project, and smbaker's rc2014 projects, I have managed to get CP/M working with a TV console in the span of a month.

  Are you sure? yes | no

J.B. Langston wrote 07/24/2018 at 02:12 point

Glad to hear you got it working. I'd love to see some pictures of your project when you finish with it. Are you making a hackaday.io page?

  Are you sure? yes | no

David Kuder wrote 07/29/2018 at 00:02 point

I've thrown one together here https://hackaday.io/project/160055-grizzly-stdbus , but I've not gotten all the boards & info there yet.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates