CONTENTS

Home
Projects
More Projects
Resume
Computer Skills
Music
Links To Friends
Pictures
About Mike

Random Link
J2ME



Parallax Propeller Atari 2600 Emulator

Related pages on www.mikekohn.net: atmel rs232, atmel probe, picarus, msp430 guitar processor, 6581 Sound Chip, VGA On An FPGA

Introduction

I was looking for an idea for a cool Parallax Propeller project to work on and I figured I'd try out an Atari 2600 emulator. This chip seems like a good microcontroller to do this on since it has 8 core running at 80MHz, plus a library for outputting to a TV or VGA monitor. I already had C and Java code I wrote for emulating a 6510 CPU (close enough to the 6507) so I wrote a c2spin program to convert the C code to the built in Spin language of the Propeller. I thought about doing assembly language like I typically do on micros, but on this chip the assembly language would need to fit in 512 32bit addresses of each cog (Parallax's word for a Propeller core).

Links

Parallax Propeller
Propeller demo board I'm using
Java and C versions of m65xx

c2spin

Since I already had the 65xx CPU emulated in C and Java I decided to write a program that converts the C code for it to Spin to avoid so much typing. This is a hackish, ugly parser/converter actually, working just enough to convert a more raw version of the m65xx.c program into Spin. Basically I deleted all unneeded functions and variable declarations and did a pretty much 1 to 1 conversion at that point. The original C and new Spin code can be viewed below:

m65xx-1.c
m65xx-1.spin

Stella

The Atari 2600 was basically a 6507 processor and a video chip called Stella. I figured the Propeller would be a good emulator chip (assuming it can process 6507 instructions fast enough, which I'm not sure is possible) since the CPU can be emulted in 1 cog while video is emulated in another, sound in another, and anything else in a 4th. Now that the CPU is emulated, I just need to emulate the rest and see if works :).

Download

c2spin-2008-02-05.tar.gz


Copyright 1997-2008 - Michael Kohn

Please visit my many other projects, including free J2ME Java games for Mobile phones, graphics and sound programs, chat software, and much more at http://www.mikekohn.net.

This page was designed to work with all standard HTML compatible webbrowsers including Firefox, IE, Safari, and Links.