FS#6048 - Atari 2600 emulator

Attached to Project: Rockbox
Opened by Anton Romanov (theli) - Friday, 22 September 2006, 14:13 GMT
Last edited by Thomas Martitz (kugel.) - Sunday, 05 June 2011, 11:41 GMT
Task Type Patches
Category Games
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


atari 2600 emulator
it can open .bin roms and has one public domain rom built in

should work (only display) at least on all color ipods
and in all color targets sims
This task depends upon

Closed by  Thomas Martitz (kugel.)
Sunday, 05 June 2011, 11:41 GMT
Reason for closing:  Out of Date
Additional comments about closing:  There doesn't seem to be interest in this anymore. Open a new task if this is wrong.
Comment by Ian D. (GuitarRocker2562) - Thursday, 28 September 2006, 01:29 GMT
How is it running so far? What games work?
Comment by Anton Romanov (theli) - Thursday, 28 September 2006, 06:09 GMT
all games work (which i tested), you can open .bin files with it
it doesn't have any user interaction - only rendering to screen is implemented

patch is posted for anyone interested in working on it ...
here is one screenshot posted here:
Comment by Ryan Dechant (gravedigg154) - Saturday, 23 December 2006, 18:01 GMT
I really hope this gets done. This would be the best thing to happen to rockbox except for maybe doom or rockboy.
Comment by Ryan Dechant (gravedigg154) - Saturday, 23 December 2006, 18:01 GMT
I really hope this gets done. This would be the best thing to happen to rockbox except for maybe doom or rockboy.
Comment by tim (blackjack) - Tuesday, 17 April 2007, 02:04 GMT
How do I go about putting this emulator in my .rockbox folder?
Comment by eric (fugot) - Thursday, 03 May 2007, 22:21 GMT
it's not done yet
Comment by eric (fugot) - Sunday, 06 May 2007, 15:57 GMT
has anymore worke been done on this?
Comment by Steve Bavin (pondlife) - Friday, 17 August 2007, 08:07 GMT
I'm not normally one for advocating gaming on a DAP, but I'd admit this is something I'd love to see completed...
Comment by Benjamin Brown (foolsh) - Thursday, 15 November 2007, 08:50 GMT
This no longer runs on current SVN, it seg faults as soon as it starts. At least on the emulator build, and setting debug to verbose in /2600/rbconfig.h makes the compiler complain how sterr is not defined, isn't the part of stdio?
A SVN from jan/27/07 compiles and runs. I don't know what date it stop working, I just choose some arbutary date from this past winter when I was poking around with this and new it worked.
Using the ipod video simulator it ran okie dokie fairly well,
I would hate to see this code go stale and end up getting forgotten.
It should be reorganized as a diff file so it can be easily worked on, and added to the emulator page of the wiki
I'm not familiar enough with the new layout of the apps/games/demos menu yet to add the viewer info.
I just ran the 2600box.rock file from the file viewer
Anyone willing to collaborate on this?
Comment by Anton Romanov (theli) - Thursday, 15 November 2007, 09:02 GMT
Benjamin, noone touched this since i posted it more than a year ago ....
this doubtly will be worked on anytime soon ... since i've lost interest when i put this here (so it can't be worked on by someone) ... and noone appeared willing to continue since then....
Comment by eric (fugot) - Saturday, 01 December 2007, 02:51 GMT
what work still needs to be done?
Comment by Steve Bavin (pondlife) - Saturday, 01 December 2007, 09:20 GMT
It would be good if it could be made into standard patch/diff form...
Comment by BenjaminBrown (ben_b) - Monday, 21 January 2008, 08:23 GMT

ok heres a patch file, this is the command I used if I didn't do it right would someone tell me the correct way its my first time using diff
"diff -Naur rockbox.orig rockbox > 2600box.patch"
It compiles with a whole lot of warnings but no errors and still doesn't run with current svn source.
but now at least its easier to work with now.
Comment by BenjaminBrown (ben_b) - Monday, 21 January 2008, 08:26 GMT
one more thing you have to navigate to .rockbox/rocks and execute 2600box from there or add the correct info to the viewers config file and then open an atari2600 bin rom. and then you can see it not run at all lol
Comment by Anton Romanov (theli) - Friday, 30 May 2008, 13:48 GMT
the only change which it needs not to crash is remove "true," from rb->splash calls
Comment by Benjamin Brown (foolsh) - Monday, 21 September 2009, 04:38 GMT
Here is a vile ugly hack to let this compile and run for ipod video at least on the sim using current svn
I need some one to try this out on a real ipod video if they would not mind

What works:
Loading bin files still works
Controls are hacked in for the ipod video
Menu is up, play is down, left is left, right is right, select is fire
To exit press left and right together something that should never happen with a real Atari joystick, not sure if this is possible on real ipod hardware though
It seems playable

What needs work :
Controls for supported targets
Currently the screen translation in 16bpp_disp.c does not work well enough to play on for screens with less horizontal resolution than the atari2600 which is 192, like the e200 I own has only 176. What happens on the e200 target is that the right half of the screen is missing and the second scan line from the left half is shown in its place, happens on the sim and real e200 hardware
If some can see how to quickly solve this the relevant code snippet follows

put_image (void)


#if LCD_WIDTH < 320

int X_STEP = ((tv_width<<16) / LCD_WIDTH);

int Y_STEP = ((tv_height<<16) / LCD_HEIGHT);

fb_data *frameb;

int x=0,y=0;

int srcx, srcy=0; /* x / y coordinates in source image */

short* image;

image = &screenmem[0];

frameb = rb->lcd_framebuffer;

for(y = 0; y < LCD_HEIGHT; y++)


srcx = 0; /* reset our x counter before each row... */

for(x = 0; x < LCD_WIDTH; x++)


*frameb = image[srcx>>16];

srcx += X_STEP; /* move through source image */



srcy += Y_STEP; /* move through the source image... */

image += (srcy>>16)*tv_width; /* and possibly to the next row. */

srcy &= 0xffff; /* set up the y-coordinate between 0 and 1 */



I was thinking rotating the display might solve this but every time I try something it still comes out orientated like normal but uglier