This document explains two easy methods that may be used to change the graphics in an Atari 2600 (aka Atari VCS) game. A step-by-step example is provided that gives the details on how to change the graphics in Space Invaders. No programming experience is required to follow these instructions.
Somehow you found yourself reading the opening sentence of an article about how to change the graphics of Atari's first cartridge-based system: the Atari 2600, sometimes referred to as the Atari VCS. How did you get here?
Do you think of yourself as a real Atari VCS fan -- a collector and player? Perhaps, instead, you are just a casual VCS player. You have some of the best games and you avoid the bad ones. When you heard of the Stella Gets a New Brain CD compilation from 1996 that contains twelve Starpath Supercharger games plus rarities, did you have to own one to complete your collection? Possibly you have no idea what the Stella Gets a New Brain CD even is. Do you have an Atari VCS emulator installed on your computer along with some cartridge ROM image that are of interest to you? Was one of the modern console Atari 2600 compilations your first experience with Atari's first cartridge-based cosole? Maybe you stumbled on this site quite by accident and are wondering why I don't just get on with it...
Whichever category you place yourself in isn't important. This article is aimed squarely at the player (not the programmer) who is interested in making a VCS game a little more of their own by changing the graphics that have become so familiar to us all.
Even a casual scouring of the Net for VCS information will pull up enough information to keep anyone occupied for a lifetime. So if you are just a little bit curious, where do you start? That was the proposition that lay before me in the summer of 1998. I looked around for information that was aimed at a non-assembly-programmer: I never found any.
On the Internet, there are a number of games that have had the graphics changed. One of the more interesting graphic conversions of an Atari VCS game that I came across at that time was Beast Invaders, a hack of Atari's Space Invaders. The hack was done by Yak (of Tempest 2000 fame). The game is infested with- what else- Llamas. It was this graphic conversion that first intrigued me to look beyond the mere playing of VCS games. After a little work I was able to change Space Invaders myself.
I wish to encourage tinkering with VCS games. I have tried to make this a step-by-step approach to changing the graphics in a 2600 game -- specifically Space Invaders. This article is a guideline to the programs and a few of the techniques that I used to convert the graphics in Space Invaders to OC&GS Invaders.
If you have the skill to use Windows and a few programs that use the command-line (which many people refer to as the "DOS Box"), then you should have no problem with the programs required to change the graphics in a VCS game. Perhaps, after trying this out, someone reading this will say, "Wow, this is so easy. I'm going to make myself a new VCS game." I hope so!
How do people make new games for the VCS? How do they change the graphics in a classic game like Space Invaders? Do you (like me) look with awe at anybody who has the ability and devotion to learn to program the VCS? Creating an Atari VCS game is beyond me at this point. That fact did not stop me from wondering how to change in-game graphics.
If you ever thought that it would be neat to replace some Atari game graphics with some of your own, then you will be thrilled to know that it is rather easy. The best part of all is that it requires no programming skill.
I shall discuss two ways to change the graphics in an Atari VCS game; neither requires any assembly programming skills. Surprised? The reason for this is that there are tools available that allow anyone, even a casual computer user, to look at what makes a VCS game tick. Devoted programmers have been kind enough to donate the tools they create to the public domain.
To change graphics in a VCS game, one only needs to know addition and conversion from decimal to hexadecimal. Uh-uh. You don't know how to change Base-10 (regular numbers) to base-16 (hex numbers)? No problem- most modern calculators can do it for you- or use the scientific calculator in any version of Windows.
Does that still sound like too much work? Well then you will be pleased to know that there is an even easier way that requires no math at all. This is for the person who wants to stay away from the code as much as possible.
I have a preference for the method that requires the use of addition and hexadecimal conversion. This is because I would like to eventually learn a little 6502 assembly language. Of the two methods, you can choose the one that suits you best.
A VCS game can be changed in a number of different ways: I will only be discussing how to do this using a computer running Windows. This article was originally written on a 486 running Windows 98. Many of these programs may work on older and slower computers (even a 386 or older!). I'm aware that that sort of computer would not be of easy access-- and one is not needed. This version of the article, updated in 2012, uses Windows XP. I expect that Microsoft's newer versions of Windows should work too.
If you plan to run your game on a real Atari VCS, then you will also need a VCS and a Starpath Supercharger (which will plug into your computer's speakers or directly to your sound output on the computer). I'm aware that there are other methods of playing Atari games on the Atari 2600, but the Supercharger is fairly common, so I will cover that method only.
If you prefer another hardware or software platform, then don't get discouraged. Even though this article will be covering programs for machines running Windows, all that is going to be described here can be done on the more popular machines such as the Macintosh and Linux. If you're looking to try-out esoteric computers, then this can even be done on a Commodore 64 or Amiga. If you're not running Windows, than use this tutorial more as a general method to change the graphics and not as a how-to guide.
You do not have to be running Windows to use any of these programs. However, the multitasking capability of Windows will make the task a little easier for you. The best place to get the software described here is from Dan Boris's Atari 2600 Tech Info Page. Dan's web site is crammed with additional Atari technical information as well as commented VCS source code. A link to the page is provided here:
https://atarihq.com/danb/a2600.shtml
The essential programs needed to change the graphics in a VCS game are:
Follow these steps to get all of the programs you need into one place, which I will refer to as the programming directory. Later, when you are asked to type in a command, you must be in the programming directory.
stella C:\Atariprg\spcinvad.bin
Using this method is the easiest way to change the graphics in a VCS game. However, if you ever intend to change more than just a game's graphics, then you will need to use the second method. Remember that all the commands in these steps must be entered from your programming directory called "Atariprg."
If you're running any modern version of Windows, you can find the prompt at which you'll be typing your commands by clicking the Start button, clicking All Programs, clicking Accessories, and then clicking Command Prompt.
To make sure that your commands will be entered while you're in the correct directory, you'll probably have to use the command for changing directories (cd) before you do anything else. An example would be: cd c:\Atariprg
If the path to your Atariprg directory is longer than that, refer to the location bar at the top of the visible Atariprg folder window to determine the entire path that should be entered after cd. The prompt should ultimately display the current path and directory, ending with \Atariprg> -- and it will remain that way until you change directories again or exit the Command Prompt.
For those who have never used the Command Prompt before, or need a quick refresher, I suggest using a search engine with the phrase "how to use the windows command prompt." This will likely bring up millions of links. Pick one that you like and check it out. Spending a few minutes learning how to change directories, list, copy and delete files will pay dividends later.
showgfx spcinvad.bin 0 4096 > spcinvad.txt
0c0a |XXXXXXX | 0c0b |XXXXXXX | 0c0c | XXXXX | 0c0d |XXXXXXX | 0c0e | XXX | 0c0f | XXX | 0c10 | XXXXX | 0c11 | XXX | 0c12 | XXX | 0c13 | X |
0c0a | XXXXX | 0c0b |X X | 0c0c |X XXX X | 0c0d |X X X X | 0c0e |X X | 0c0f |X X | 0c10 |X X X X | 0c11 |X X | 0c12 |X X | 0c13 | XXXXX |
editgfx spcinvad.txt testspac.bin
You've just changed the graphics in your first Atari VCS game. Pick another game and see what you can find in there. You may soon find that it is addictive changing the graphics in games!
The second method used to change a VCS game's graphics is only a little more complicated than the first. Here is an overview of the steps involved: disassemble the ROM, find the graphics, change the hex data statements, and assemble the ROM again. This method is a little more involved, but the effort it takes is well worth it. If, at another time, you intend to modify a game's gameplay, or even make a game yourself, then these steps are mandatory knowledge.
distella -paf spcinvad.bin > spcinvad.src
dasm spcinvad.src -f3 -otest1.bin
fc spcinvad.bin test1.bin
Your results should say "FC: no differences encountered." If some differences are found, then something went wrong during the disassembly process or the assembly process. I've never had the files not match. If you are having trouble at this point then make sure that you have followed the directions very carefully to this point.
Address Data Contained at Address
------- -------------------------
LFBFE: .byte $00, $00, $00, $00, etc
...Additional bytes filled with data
LFD61: .byte $03, $17, $2B, $23, $75, $B4
^ ^ ^ ^ ^ ^
Addresses | | | | | |
keep counting -> FD61 FD62 FD63 FD64 FD65 FD66
Still confused? Don't worry. This involves a completely new number system: hexadecimal. You wern't born knowing how to count to 10. You had to learn. The same is true with this. I recommend reading the first chapter of any 6502 programming book, which will usually start off with easy-to-understand explanations of hexadecimal. Several books of this sort are available in pdf format on the internet or can be bought used at reasonable prices on the Internet. For instance, here is a link to Programming the 6502 by Rodnay Zaks on Amazon.comGFX FBFE FD66 GFX FF4C FFFFIn some cases Notepad may add a .txt file extension to the filename so you may end up with a file called spcinvad.cfg.txt. If this happens, then the file needs to be renamed or else it won't work with Distella. Simply rename it from the Command Prompt or use Windows Explorer.
distella -paf -cspcinvad.cfg spcinvad.bin > spcinvad.src
.byte $FE ; |XXXXXXX | $FC0A
.byte $FE ; |XXXXXXX | $FC0B
.byte $7C ; | XXXXX | $FC0C
.byte $FE ; |XXXXXXX | $FC0D
.byte $38 ; | XXX | $FC0E
.byte $38 ; | XXX | $FC0F
.byte $7C ; | XXXXX | $FC10
.byte $38 ; | XXX | $FC11
.byte $38 ; | XXX | $FC12
.byte $10 ; | X | $FC13
Beside each .byte are two hex digits (the '$' signifies that the number is hex). Using an 'X' as a comment, a graphic representation of what each byte contains follows the hex data . This is followed by the data's memory location.
Binary Weighted Bits
---------------------------
128 64 32 16 8 4 2 1 = Numbers = 255 ($FF)
X X X X X X X = Weighted X's = 254 (or $FE)
Add up the seven numbers that have an X under them. These seven numbers are 128, 64, 32, 16, 8, 4 and 2. This totals 254 in decimal. The decimal value of 254 converted to hexadecimal is $FE.
Binary Weighted Bits
---------------------------
128 64 32 16 8 4 2 1 = Numbers = 255 ($FF)
X X X X X = Weighted X's = 124 ($7C)
Add up the five numbers that have an X under them. These five numbers are 64, 32, 16, 8 and 4. This totals 124 in decimal. The decimal value of 124 converted to hexadecimal is $7C.
.byte $7C ; | XXXXX | $FC0A
.byte $82 ; |X X | $FC0B
.byte $BA ; |X XXX X | $FC0C
.byte $AA ; |X X X X | $FC0D
.byte $82 ; |X X | $FC0E
.byte $82 ; |X X | $FC0F
.byte $AA ; |X X X X | $FC10
.byte $82 ; |X X | $FC11
.byte $82 ; |X X | $FC12
.byte $7C ; | XXXXX | $FC13
Note that in the above example, I did change the comments to look like a happy face. However, I could have just as well have left the souce code like this:
.byte $7C ; |XXXXXXX | $FC0A
.byte $82 ; |XXXXXXX | $FC0B
.byte $BA ; | XXXXX | $FC0C
.byte $AA ; |XXXXXXX | $FC0D
.byte $82 ; | XXX | $FC0E
.byte $82 ; | XXX | $FC0F
.byte $AA ; | XXXXX | $FC10
.byte $82 ; | XXX | $FC11
.byte $82 ; | XXX | $FC12
.byte $7C ; | X | $FC13
The above source code with the hex digits changed, but with the comments left alone, will still assemble into a version of Space Invaders that has the player's ship replaced with a happy face.
dasm spcinvad.src -f3 -otest1.bin
If you would like to play your hacked version of Space Invaders on a real Atari 2600 using the Starpath Supercharger, then use Makewav to create a wav file on the computer.
There are various speed options that can be used with Makewav. Which one you choose depends on how well the combination of your computer, Atari and Supercharger work together. You will find that some load speeds work better than others with your personal setup. A balance has to be struck between getting a file that loads correctly and a file that loads quickly. Note that even the slowest option loads a 4K file in about sixteen seconds.
The option that affects speed is the -f option. Here is what the option does, taken directly from the manual:
This flag allows you to change the speed of the tranfer. The valid range is 0-4 and the higher the number the faster the load. Don't be surprised if the faster transfers are not reliable, they are really pushing the limits of the audio circuitry. Suggested values for various media are: Audio Cassette = 0, CD = 1 or 2, Computer = 2, 3, or 4.
You now have a happy face instead of the player's ship to do battle with the evil alien invaders. It didn't take long to do, so why not change the alien invaders as well. Make that terrible UFO into your initials. Make the shields into Pac-Man. Be creative.
Using these same methods, it is possible to change the graphics in most any Atari VCS game. Eventually, though, no matter how much you enjoy it, changing the graphics will become rather boring. The problem is that there is a real boundary to how creative you can be.
The solution to this boredom is to modify the actual code of a VCS game. I have not attempted this yet, but it is the next step that I will be taking. There is plenty of documentation on the 6502 and the VCS. There is also an abundance of commented source code available. So when you are ready for that "next step," don't be afraid to take it.
The logical progression after modifying a game's code is to create a game from scratch. I am not at that stage yet, hopefully someday I will be there. Until that time, as I learn more about the VCS, you can be sure to read about it in upcoming issues of OC&GS!
Good luck with all your efforts! -- AJT