Posted: September 2008
This is an attempt to make an Atari 2600 emulator in Java. I actually started this a while ago, but after getting the CPU fully implemented I didn't have time to finish it. The CPU is fully implemented, but most of the hardware is not. I'm not sure if I'll bother to finish it, but we'll see.
Update: I ended up porting this to C++ (or maybe I should say, pretty much rewrote it), renamed it, and posted it here: Cloudtari.
What It Does
Right now Jatari consists of a number of Java class files: TIA (graphics and sound), Television (emulates the raster beam of a TV), PIA (the RIOT IO, timer chip, and RAM), ROM (where cartridge memory sits), m65xx (decodes instructions from a 6502/6507/6510 cpu), MemoryBus (routes to object/chip where memory read/writes should go), and Jatari (simply the "main" class that starts it all up). To make Jatari run as an applet or in J2ME should be as simple as adjusting the Television class to use an applet/midlet canvas instead of a Frame and making the ROM read from an HTTP socket to grab the game file.
In its current state, Jatari will render the test.bin file included in the download correctly. Now I have to make sure the PIA works, add sprites, collision dectection, and connect the keyboard with the Joystick interface.
I found some really nice example programs on http://khryssun.free.fr/programming.html. I've been using these to test and make sure Jatari is working properly. Right now I can perfectly render the heart picture with Jatari. I'm currently getting about 700-800 frames per second on a 2.6 GHz E7300 Core2 DUO.
January 9, 2011: Not sure why I decided to do this today, but I updated the Television.java class to use a MemoryImageSource in Java instead of drawLine() for drawing the pixels. The speed increased from 130 FPS to about 700 to 800 FPS on the heart picture on a 2.6GHz E7300 Core2 Duo. Only getting around 90 FPS on an Atom N270 netbook.
Copyright 1997-2022 - Michael Kohn