CONTENTS

Home
Updates
Software
Electronics
Music
Resume
Contact


YouTube
Twitter
GitHub
LinkedIn

HTTPS VERSION


Parallax Propeller Atari 2600 Emulator

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 cores running at 80MHz, plus a library for outputting to a TV or VGA monitor. I already had C and Java code (Jatari) 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).

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.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-06.tar.gz

Copyright 1997-2024 - Michael Kohn