Jump to content


New emulator for the Mac (and shortly Linux); enjoy composite video!

5 replies to this topic

#1 ThomH OFFLINE  


    Chopper Commander

  • 123 posts

Posted Sat Mar 3, 2018 5:22 PM

Hi everyone. I know that there's no substantial need for another ColecoVision emulator, but here's a new one just in case.


It makes a very genuine attempt to:

  • be cycle accurate, including all TMS memory accesses and read/write availability;
  • produce and decode genuine composite video, for genuine composite artefacts (no RF implemented at the time of writing);
  • also otherwise generally emulate a CRT rather than just pushing frame captures: there's phosphor decay and the thing is pumped by the refresh rate of your monitor, not that of the ColecoVision. If you have a 120Hz or a 144Hz monitor, you should get 120 or 144 distinct frames a second, with the substantially reduced latency that implies;
  • similarly, audio is sampled at megahertz and low-pass filtered down to whatever your machine can output. So if you can output 192Khz audio, your emulated ColecoVision will generate 192Khz audio for you.

It's a multimachine emulator, so a lot of it is more battle tested than the sudden announcement might imply, but large parts of the ColecoVision implementation are entirely new.


The emulator actually has two established targets: the Mac, and anything UNIXy. However I'm being bitten by my historic laziness in dealing with joystick-type input so on the Mac the ColecoVision is controllable via the joystick, on UNIX machines there's no joystick input at all. But if you enjoy watching game title screens, this is definitely for you.


On the Mac it's a fully native document-centric Mac app with no extraneous interface. So when you launch it, nothing will be displayed. Use File -> Open... to open a game. Open twenty if you like — each will open individually, in its own window, for independent sizing. Full screen them, put them into tabs, do anything you'd normally do with a normal Mac app.


However, since I have not yet implemented support for physical joysticks, use the cursor keys and A/S (or space for left fire). 0–9 do what you want, but to type a * or a # you're going to need to actually type that. So on my US machine with a UK keyboard mapping, I press star by typing shift+8 and # by typing option+3. But just do whatever you'd normally do to type a * or a #. This is very work in progress.


For UNIX systems it's an SDL app with an arbitrarily resizeable window, but expects to be launched once per title you want to play simultaneously, from the command line. The expectation is that you'll just set up the correct file association, and double click from your favourite file manager to launch. Exactly as if the ColecoVision games were just native applications.


That's really the whole ethos of the thing: my assumption is that a user wants to play classic games, not learn about an emulator. So it seeks to be as discreet as possible.


Feedback is always strongly appreciated, no matter how critical.


Because it's pretending to be a real CRT, it's often hard to get a good screenshot. Some efforts are nevertheless attached. Like a real CRT, you don't really perceive it as the shots appear. Try it and see.

Attached Thumbnails

  • ColecoVision presents.png
  • Select game.png
  • Galaxians.png

#2 ThomH OFFLINE  


    Chopper Commander

  • Topic Starter
  • 123 posts

Posted Sun Mar 4, 2018 10:19 AM

To try to compensate for the look of the still images, here's a video. Suffice to say, I did not write this emulator because I am really excellent at Galaxian.

#3 ThomH OFFLINE  


    Chopper Commander

  • Topic Starter
  • 123 posts

Posted Sun Mar 4, 2018 4:44 PM

I've made a quick further release, available from the usual place.


The SDL version now also uses the keyboard as a joystick when running the ColecoVision. Much the same controls as documented above for the Mac target.


So, requirements are:

  • SDL 2.x;
  • SConstruct, to build; and
  • an OpenGL 3.2+-capable graphics card.

Then it should be usable under Linux, BSD, etc. The OpenGL requirement is a result of the composite encode and decode — both are handled by the GPU.


If there is a way to edit this thread's title that I'm failing to spot, please don't hesitate to let me know.

Edited by ThomH, Sun Mar 4, 2018 4:45 PM.

#4 ThomH OFFLINE  


    Chopper Commander

  • Topic Starter
  • 123 posts

Posted Tue Mar 6, 2018 9:49 AM

Minor update on this: it has come to my attention that I've drawn an incorrect conclusion in declaring within the emulator that .col and .rom are the only file extensions that might imply a ColecoVision cartridge. A forthcoming update will add .bin. It's very slightly more work than it sounds because that'll mean disambiguating files named .bin that are images of ColecoVision titles and files called .bin that are images of Atari 2600 titles. Shouldn't be too big a deal as the emulator already invests quite heavily in various mechanisms that should allow it to make that distinction*, but a small amount of finesse might be required. As I'm off on holiday from Friday, I guess look for that in a few weeks; until then renaming your files to .col or .rom is the trick.


* for the technical nerds: both static and dynamic analysis. It'll try and almost always succeed to make a decision up front before launching a machine but it also has the fallback of just trying all the possibilities simultaneously, presenting only the transiently most likely, and continuing until it's pretty obvious which was the right choice. In this case I'm confident that it'll be achievable statically by a simple ahead-of-time disassembly. But we'll see.

#5 ThomH OFFLINE  


    Chopper Commander

  • Topic Starter
  • 123 posts

Posted Wed Mar 7, 2018 4:01 PM

While attacking easily-completable tasks before I go away, I discovered a small error that could severely affect the precision of Super Game Module AY audio. So a new release is out. This really really probably is it for a few weeks.

#6 ThomH OFFLINE  


    Chopper Commander

  • Topic Starter
  • 123 posts

Posted Yesterday, 8:17 PM

It's almost embarrassing to have made the job so complicated for myself, but I've just provided a release that accepts ColecoVision .bin images. It also makes a fix to audio output so negligible that I don't think it would ever have been audio: I was pegging audio events to the start of the machine cycle rather than the proper moment of action. But consistently so, so unless you've a variety of code paths that hit the AY and which often intermingle, it would be unlikely to make any audible difference whatsoever.


Re: discerning ColecoVision .bin and Atari 2600 .bin, I gave up on doing this ahead of time in more than a negligible proportion of cases. So in practice what'll probably happen when you launch a ColecoVision .bin is:

  • emulator inspects, spots the 0x55/0xaa signature and decides a ColecoVision would accept this .bin;

  • lacking much useful information, it also can't rule out that an Atari 2600 would accept it too;

  • it therefore runs the .bin in both the ColecoVision and Atari 2600 simultaneously;

  • after a couple of frames or so, it realises that this definitely isn't an Atari 2600 game and stops running the Atari 2600.

So if you instrument it, you'll see a burst of processor activity when launching a .bin that you don't see when you launch a .col but it's so transient that you won't care.

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users