ColecoVision Games on RC2014

752 views
Skip to first unread message

J.B. Langston

unread,
Jul 1, 2018, 10:19:17 AM7/1/18
to RC2014-Z80
I posted a few teaser pics on the TMS9918 thread last night of Donkey Kong outputting the playfield graphics on the RC2014 (also attached here).  Getting this far was surprisingly easy (basically just poking the correct ports for the TMS9918 in the correct locations), but to temper expectations a bit, this is still a long way of from working. I started writing this reply to the TMS9918 thread but decided to start a new one since it goes far beyond just the TMS9918.

I spent several hours yesterday researching what it would take:

- Challenge #1: input devices.  I don't have a joystick card right now, but even if I did, the ColecoVision used some pretty unique controllers with a numeric keypad on them. It might be possible to emulate this by reading numeric input from the serial port though. 

- Challenge #2: sound.  The ColecoVision used a different sound chip (the TI SN76489A instead of the AY-3 or YM2149). I haven't investigated how hard it would be to change the BIOS to use the YM2149, but the chips did have similar capabilities, so it may be possible.  

- Challenge #3: interrupts. Donkey Kong hangs after drawing the play field. I believe this is because the ColecoVision had the TMS9918 video interrupt wired up to the Z80's NMI, rather than INT, as was more common, and I as I have done on my card. Most other games don't even get this far. The only other one I found that would display any graphics was Zaxxon.   A hardware solution would be to add a jumper to my card that allows selecting NMI or INT for the interrupt output.  However, I'm not really keen to do another hardware rev already, and that's assuming I could even find space for another jumper, which I'm not sure I could.

The ColecoVision was unique among early consoles in that it had a BIOS and games were written against that instead of talking directly to hardware, so in theory all of the above challenges could be worked around by writing a custom BIOS for the RC2014, and the games should just work.  It's going to be a lot more complicated than what I've done so far though.

So tl;dr, don't hold your breath.  This is probably not something I can do quickly, certainly without help.
IMG_1246.jpg
IMG_1243.jpg

phillip.stevens

unread,
Jul 1, 2018, 7:13:12 PM7/1/18
to RC2014-Z80
J.B. Langston wrote:
I posted a few teaser pics on the TMS9918 thread last night of Donkey Kong outputting the playfield graphics on the RC2014 (also attached here).  
I spent several hours yesterday researching what it would take:

- Challenge #3: interrupts. Donkey Kong hangs after drawing the play field. I believe this is because the ColecoVision had the TMS9918 video interrupt wired up to the Z80's NMI, rather than INT, as was more common, and I as I have done on my card. Most other games don't even get this far. The only other one I found that would display any graphics was Zaxxon.   A hardware solution would be to add a jumper to my card that allows selecting NMI or INT for the interrupt output.  However, I'm not really keen to do another hardware rev already, and that's assuming I could even find space for another jumper, which I'm not sure I could.

I'm not sure how widely known the intrinsic incompatibility between CP/M and the NMI is, so I'll point out that it looks like you've reached a bifurcation of the RC2014 graphics evolution... ;-)

After initially connecting the Am9511A APU to the NMI on my YAZ180,
I spent hours thinking about how to have both NMI and CP/M, and concluded that it can't be resolved with code.
  • The NMI interrupts to 0x66. This can't be changed.
  • The default CP/M FCB is from 0x5C to 0x6B. There is no easy way to change the default FCB location.
  • The NMI can't be masked to only occur when the CP/M FCB is benign (containing RETN) or managed to contain a correct jump instruction.
So how can such poor software design ever have happened?

CP/M was designed for the 8080 CPU, which did not have a NMI so it wasn't a software issue.
I'd point the finger at the Z80 designers, who probably had other things on their minds.

So for RC2014 graphics either we've got a games console, or a business computer outcome.

Cheers, Phillip

Mark T

unread,
Jul 1, 2018, 8:01:38 PM7/1/18
to RC2014-Z80
Just a quick look at the colecovision schematic but it looks like the /int line is not used. So would it be possible to just use /int instead of /nmi?

It might need a patch to colecovision software to remove any disable interupts and add a jump from the /int address to the /nmi address but this is probably easier than handling /nmi in cpm.

J.B. Langston

unread,
Jul 1, 2018, 8:30:08 PM7/1/18
to RC2014-Z80
>So for RC2014 graphics either we've got a games console, or a business computer outcome.

Well, I wasn't considering hardwiring NMI to the TMS9918 interrupt. If I did anything, I would make it configurable via a jumper, so if you wanted to run ColecoVision games, you could use one setting and if you wanted to use CP/M you could use another.  

Just a quick look at the colecovision schematic but it looks like the /int line is not used. So would it be possible to just use /int instead of /nmi? 

Yes, my preference is to patch the ColecoVision BIOS to use INT instead of NMI since the hardware option would require another board revision and I don't want to do that if it can be avoided.

Jodie R.

unread,
Jul 1, 2018, 11:06:39 PM7/1/18
to RC2014-Z80
Not that this has any real contribution, but...

In my collection, I have a brand-spankin' new, still in the box, sealed in plastic, Coleco Adam system.

Found it at a yard sale probably 18 years ago, asking $20, I "hauled it away" for $5.  It was still wrapped in brown shipping paper, had been stored in an attic since the early 1980s, never opened.

One of my prize pieces.

J.B. Langston

unread,
Jul 5, 2018, 11:42:05 PM7/5/18
to RC2014-Z80
Progress! The interrupt problem has been solved: https://www.youtube.com/watch?v=nfewbTAJ8RM

Just made a small patch to the Donkey Kong ROM to substitute the NMI interrupt handler for the INT handler, and add a ei instruction.

karlab

unread,
Jul 6, 2018, 7:55:43 AM7/6/18
to RC2014-Z80
Very Nice demo.
When will the video card be available? 
And what other cards are needed to run Coleco games?
karl

J.B. Langston

unread,
Jul 6, 2018, 9:40:31 AM7/6/18
to rc201...@googlegroups.com
It’s available now for you to manufacture yourself. I am not planning to sell it, ever. I make plenty of money at my dayjob and running a side business for pocket change is not my idea of a good time. There are links to the board files and a list of parts in the readme. Also if you look back through the TMS9918 thread, several other people were having them made, and a guy said he was going to offer kits. You may be able to buy from one of them. You will probably also want my z80ctrl board. I guess strictly speaking it’s not required but it makes tinkering a lot easier. Just to set your expectations, this is very much at a stage where you will need to be willing to tinker and figure things out yourself. It’s not playable yet and it may never be. If you build the board expecting to play games on it from day one, you’ll be disappointed. 

--
You received this message because you are subscribed to a topic in the Google Groups "RC2014-Z80" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rc2014-z80/d1iM0UVwYU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rc2014-z80+...@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/7947e438-034b-4fc0-ab99-553966cd1a97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Kamprath

unread,
Jul 6, 2018, 6:59:07 PM7/6/18
to RC2014-Z80
I'm the guy putting together kits for the video board. I have the boards in and all but one of the components, which I expect to come in from China mid-July. At that point, I can start sending out the kids. Cost will be $16 + shipping (everything at cost). I already have 5 reservations for kits, and can take 4 more. If you or anybody wants to reserve one of  the remaining kits, just send me a direct message.

Michael


On Friday, July 6, 2018 at 6:40:31 AM UTC-7, J.B. Langston wrote:
It’s available now for you to manufacture yourself. I am not planning to sell it, ever. I make plenty of money at my dayjob and running a side business for pocket change is not my idea of a good time. There are links to the board files and a list of parts in the readme. Also if you look back through the TMS9918 thread, several other people were having them made, and a guy said he was going to offer kits. You may be able to buy from one of them. You will probably also want my z80ctrl board. I guess strictly speaking it’s not required but it makes tinkering a lot easier. Just to set your expectations, this is very much at a stage where you will need to be willing to tinker and figure things out yourself. It’s not playable yet and it may never be. If you build the board expecting to play games on it from day one, you’ll be disappointed. 
On Fri, Jul 6, 2018 at 6:55 AM karlab wrote:
Very Nice demo.
When will the video card be available? 
And what other cards are needed to run Coleco games?
karl

--
You received this message because you are subscribed to a topic in the Google Groups "RC2014-Z80" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rc2014-z80/d1iM0UVwYU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rc2014-z80+unsubscribe@googlegroups.com.

J.B. Langston

unread,
Jul 6, 2018, 9:17:27 PM7/6/18
to RC2014-Z80

Donkey Kong is now playable (if you're generous with your definition of playable): https://www.youtube.com/watch?v=mmqBfibozR8. My "joystick" currently consists of 5 tactile switches on a breadboard laid out in a roughly d-pad like configuration. I tried hooking up an old C64 Joystick with dupont wires but the holes in the DB9 connector are too large for the wires to stay connected.  I've ordered a DB-9 to terminal block connector from Amazon which should be here Sunday, so I'll try a real Joystick then.

I'm using a MCP23S17 I/O expander to read the buttons (the same chip I used on my z80ctrl).  The z80ctrl reads it via SPI, and relays the results back to the Z80 over port 0xFC, where the Colecovision code expects to find them.  The Donkey Kong ROM is completely unmodified, and the only modifications to the Colecovision BIOS are enabling interrupts and patching the 038H vector to jump to a wrapper function that calls the NMI handler in the game and then enables interrupts again before returning.

I have also gotten as far as the title screen on Donkey Kong Jr., Burger Time, Zaxxon, Centipede, and Star Wars.  Unfortunately some of the newer games access the ports directly so hacking the ColecoVision BIOS won't be sufficient to get them running; the games themselves will have to be modified. Luckily to get video working, that just means poking a few bytes in the right places, but to get sound working will be a lot more complicated due to the different sound chip.



J.B. Langston

unread,
Jul 8, 2018, 2:01:24 PM7/8/18
to RC2014-Z80
I have a real joystick working now.  Strangely, my gameplay wasn't much improved by this. Clearly there is some kind of subtle incompatibility that makes these old games much harder than I remember them. ;)
IMG_1274.jpg

Stuart Smith

unread,
Jul 9, 2018, 11:51:36 AM7/9/18
to rc201...@googlegroups.com
Or it could just be that the older you get, the better you were…..    ;)



--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.

To post to this group, send email to rc201...@googlegroups.com.

J.B. Langston

unread,
Oct 20, 2018, 10:24:48 PM10/20/18
to RC2014-Z80
I got sound working now, as seen is this video: https://www.youtube.com/watch?v=cBD8SCSGs4g.  I am working on a PCB that will combine the sound chip with two controller ports. The controller ports will support Sega Genesis gamepads and Atari joysticks.  Perphaps ironically, it will not support the original Colecovision controllers because they're too hard to find and it was a choice between supporting them or supporting Sega Genesis controllers, for which reproductions can still be purchased new for around $6.  The controller ports use a 74HC541 tri-state buffer, same as the original ColecoVision, so it doesn't require my z80ctrl board to work unlike the previous controller port that I made using an SPI I/O expander.  Both the sound chip and the controller ports are mapped to the original ports used on the ColecoVision, so with this card and REV3 of my TMS9918A board, it will be possible to run ColecoVision games completely unmodified.

david david

unread,
Oct 21, 2018, 5:21:20 AM10/21/18
to RC2014-Z80
Very impressive work

karlab

unread,
Oct 21, 2018, 6:40:43 AM10/21/18
to RC2014-Z80
I agree, very impressive.
Karl

Mark T

unread,
Oct 21, 2018, 1:33:58 PM10/21/18
to RC2014-Z80
Watch out for the issue with address decoding to the 76489. If chip select is activated without the write signal it will hold the wait signal low and not release it. I added a wire mod to only enable chip select when write is active. This only showed up on some Sord M5 games, not all of them, as the interupt vector was the same as the 76489 address in some games. I could have gated with M1 to avoid interupt vector issue but would have still been possible to attempt to read from the sound chip and still lock up the system.

Mark

J.B. Langston

unread,
Oct 21, 2018, 4:13:11 PM10/21/18
to rc201...@googlegroups.com
I should be safe.  The way address decoding worked on the Colecovision, the write signal is used as an input to the '138 decoder. Writing to E0-FF will write to the 76489 and reading from it accesses the controller port. The '138's Y7 output is tied to both WE and CE on the 76489 so both signals are asserted at the same time. I also one of the decoder's enable lines tied to M1 so a interrupt acknowledge cycle will not activate it.  I have attached a WIP schematic.

--
You received this message because you are subscribed to a topic in the Google Groups "RC2014-Z80" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rc2014-z80/d1iM0UVwYU8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rc2014-z80+...@googlegroups.com.

To post to this group, send email to rc201...@googlegroups.com.
SN76489.pdf

J.B. Langston

unread,
Oct 22, 2018, 12:19:49 AM10/22/18
to RC2014-Z80
Board layout is coming along. 2D and 3D renderings attached.
board2d.png
board3d.png

J.B. Langston

unread,
Oct 22, 2018, 12:26:31 AM10/22/18
to RC2014-Z80
Updated schematic corresponding to the current layout.  For anyone wondering about the buttons and diodes, see this schematic of the ColecoVision controller: http://www.chromesphere.net/coleco/Documents/ColecoController.jpg. Since I'm not using actual ColecoVision controllers, I need some way to simulate the numeric keypad. The numeric keypad is not used for playing games but it is required for selecting a skill level when starting a game. So they're necessary to have, but having them on the PCB should not be too big an inconvenience.
SN76489.pdf

J.B. Langston

unread,
Oct 24, 2018, 11:46:00 PM10/24/18
to RC2014-Z80
When I went to route the board, I realized that I was trying to cram way too much on a single board, so I have split the sound card and controller interface into separate boards.  With the space now available on a separate sound board, I can now make fully decode the addresses instead of taking up  a block of 32 addresses and configurable, and also offer optional support for a second SN76489 chip for stereo sound.

This also allows the flexibility of using the sound card with alternative controller interfaces.  I'm not entirely happy with the compromises I had to make on the controller board in order to maintain compatibility with unmodified ColecoVision games.  I am also working on an IO Expander interface for my z80ctrl board, which I'll probably end up using to emulate a ColecoVision controller interface using a Sega 6-button controller.  This should allow me to map the unused A, X, Y, Z, Start, and Mode buttons on the Sega controller to buttons on the ColecoVision numeric keypad.  Because of differences in the ColecoVision controller and the Sega controller doing so would not be possible without the z80ctrl serving as an intermediary. 

Therefore I will probably not end up using the old-school controller board much myself, but I will make it available so people who don't want to use the z80ctrl will be have the possibility of playing z80ctrl games.

I've checked the designs into Github. I may still make a few tweaks to the sound board before I call it done, but I think the controller board is pretty much finished. 

J.B. Langston

unread,
Nov 9, 2018, 9:48:10 PM11/9/18
to RC2014-Z80
Well, the PCBs are in.  I screwed up pretty spectacularly on the controller interface but the SN76489 sound card worked out of the box. The problems with the controller board were multiple:

1) I was using a female DB-9 footprint when I needed to use male. I didn't realize the pin order was reversed, so of course nothing worked out of the gate.  I ended up cutting all the traces and soldering bodge wires for all the connections, but now it occurs to me I probably could have soldered the DB-9 connector onto the back of the board instead of the front and it probably would have worked.
2) I had tied one of the unused bits on the controller buffer to ground but the ColecoVision software wants it to be tied high for some reason.  I had to pull the pin on the 74HCT541 buffer out of the socket and tie it to VCC instead. 
3) I mixed up the address decoding for the player 1/player 2 ports, so I had to do a cut and splice to fix that.
4) The KiCad footprint I found on Mouser for the DB-9 connector didn't have solder rings around the mechanical support holes, so plugging and unplugging controllers puts a lot of stress on the solder joints.

I'm probably going to order another rev of the board next week after I test the remaining boards I haven't put together and make sure nothing is wrong with them.  I've attached some pictures of the sound card and the controller board (both pre and post-butchery).
IMG_1548.jpg
IMG_1549.jpg
IMG_1550.jpg
IMG_1551.jpg

J.B. Langston

unread,
Nov 9, 2018, 9:48:56 PM11/9/18
to RC2014-Z80
Google wouldn't let me attach all the photos at once, so here's your disaster porn.
IMG_1554.jpeg
IMG_1552.jpeg

James Knox

unread,
Nov 10, 2018, 1:01:53 AM11/10/18
to rc201...@googlegroups.com

 

 

Reminds me of the IBM PC Jr motherboard from all those years ago... I never saw one that did not have all those patch cables, and some of those ones where not even needed 😊

 

Sent from Mail for Windows 10

--

You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.

To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.


To post to this group, send email to rc201...@googlegroups.com.

J.B. Langston

unread,
Nov 20, 2018, 10:42:47 PM11/20/18
to RC2014-Z80
I've gotten back the new revisions of my controller interface PCBs and now all 3 of the ColecoVision boards are 100% functional.  I have written up the details on my Hackaday project, including video overviews: https://hackaday.io/project/159057-game-boards-for-rc2014/log/156175-full-colecovision-compatibility

I am working with Michael Kamprath, who previously made kits for the TMS9918 video cards available on Tindie. Hopefully we will be able to offer kits for the SN76489 sound card and controller interface as well.

Augusto Baffa

unread,
Jan 29, 2022, 10:15:29 AM1/29/22
to RC2014-Z80
Hi, 

 I'm reading this old thread 'cos I'd like to bring games to my RC2014 kit and I have a question.

 Marco Maccaferri created a videocard using Propeller and included a tms9918 emulator https://github.com/maccasoft/propeller-graphics-card/tree/master/tms9918
 It has vga output and maybe could replace the tms9918 original card (that has video compose). https://www.tindie.com/products/maccasoft/graphics-video-card-kit-for-rc2014/

 Does it could really be an option to replace the TMS9918A  Video Card?

Best,
Augusto Baffa

Marco Maccaferri

unread,
Jan 30, 2022, 2:33:32 AM1/30/22
to rc201...@googlegroups.com
Il 29/01/22 16:15, Augusto Baffa ha scritto:

> I'm reading this old thread 'cos I'd like to bring games to my RC2014
> kit and I have a question.
>
> Marco Maccaferri created a videocard using Propeller and included a
> tms9918 emulator
> https://github.com/maccasoft/propeller-graphics-card/tree/master/tms9918
>
>
It has vga output and maybe could replace the tms9918 original card (that
> has video compose).
> https://www.tindie.com/products/maccasoft/graphics-video-card-kit-for-rc2014/
>
> Does it could really be an option to replace the TMS9918A Video
> Card?

It depends, the emulated card doesn't support interrupts so anything
using it will fail, the 5th sprite and collision checks are not
supported, also timings are not correct at all, games that counts the
output lines to make some effects will not work as expected.

So it depends on what programs you want to run with it.

Best regards,
Marco
Reply all
Reply to author
Forward
0 new messages