Jump to content
Sign in to follow this  
KAZ

Excellent, I successfully hacked my first Atari 2600 game!

Recommended Posts

Any little achievement in the realm of programming the Atari 2600 is significant to me...

 

This one probably won't impress too many....but.

 

I used:

 

showgfx and

editgfx

 

This is what I did, from my crude understanding of this whole mess:

 

showgfx asteroid.bin 0 4096 > hack.txt

 

this "pipes" the asteroid game into a text file.

 

Then I opened up the hack.txt, and was "pleasantly surprised" by the simplicity of the data. Of course I had NO idea in the world what it all meant, so I randomly deleted a bunch of X's all over the place....

 

every time I deleted an X, and added a space, so that the line would remain the same length.

 

then I went:

 

editgfx hack.txt hack.bin

 

 

Making it a BIN file (JOY).

 

I ran it on my emulator, and guess what?

 

Yeah, a bunch of garbled mess.

 

But the important part is that my alterations MADE a difference to the bin file, and the changes caused by ME.

 

I am barely starting to grasp just getting text files into bin files. I did just now...

 

So now I at least know how to make a text file, and how to make it into a bin file using this program

 

 

Now if I just knew what to put in for code....hmm??!

Share this post


Link to post
Share on other sites
Now if I just knew what to put in for code....hmm??!

The tools you are using are NOT made for changing code. They were develeoped for hacking the graphics inside an existing ROM.

 

For coding you need an editor (any will do, I suggest Textpad) and an Assembler (DASM).

 

Try to assemble "How to draw a Playfield" first, and then slowly dig into the code. Try to understand the framework (VSYNC) first and then how the kernel works, because that is the interesting part.

Share this post


Link to post
Share on other sites

I have dasm downloaded from the net....

 

I don't have the slightest idea how to use it on a text file...

 

would I just go into ms dos, and type:

 

dasm hack.txt

 

maybe some sort of -F switch thing that I've heard about.

 

I have wordpad, and textpad....are those the same as what you are talking about? Can I actually put code (commands) into a normal text file?

 

And then the dasm somehow takes that and makes what I saw showgfx showed, all those X's and numbers on the left side?

 

 

I just need a few basic basic clues on where to even begin putting in code...maybe I'm overthinking this very first part, and it really just requires a text file, and a dasm assembler.

Share this post


Link to post
Share on other sites
I have dasm downloaded from the net....

 

I don't have the slightest idea how to use it on a text file...

 

would I just go into ms dos, and type:

 

dasm hack.txt

 

maybe some sort of -F switch thing that I've heard about.

The correct minimal syntax would be:

 

dasm code.asm -f3 -ocode.bin

 

code.asm is the source code file where you put in all commands (a simple text file) and code.bin is the resulting binary file that you can directly run in the emulator.

 

I have wordpad, and textpad....are those the same as what you are talking about?

Textpad is just a better editor than Notepad. But for a start Notepad will do. Wordpad might work too, if you can save your code as plain text file.

 

Can I actually put code (commands) into a normal text file?

Exactly. An editor, an assembler and your brain is all you need. :)

 

And then the dasm somehow takes that and makes what I saw showgfx showed, all those X's and numbers on the left side?

No, DASM creates the binary file which is ready to run, Showgfx is used to hack existing binary files.

Share this post


Link to post
Share on other sites

Here's the command you wrote, let me ask a little more...

dasm code.asm -f3 -ocode.bin

 

My text editor creates files with a TXT extension, so would mine go like this? (my file would be called kaz let's say)

 

dasm kaz.txt -f3 -okaz.bin

 

what is that "o" before kaz for? Is that another type of switch or something?

 

And dasm does stuff "behind the scenes"? You never actually open a program called dasm, it just crunches the commands?

 

 

Wow, I'm actually starting to almost get the first part of this.

Share this post


Link to post
Share on other sites
Here's the command you wrote, let me ask a little more...

dasm code.asm -f3 -ocode.bin  

 

My text editor creates files with a TXT extension, so would mine go like this?  (my file would be called kaz let's say)

 

dasm kaz.txt -f3 -okaz.bin

That's ok, you can call the file whatever you want. But you should limit the name to the 8.3 letters format.

 

what is that "o" before kaz for?  Is that another type of switch or something?  

Yup, -o is another parameter that is described in the DASM documentation. You should read this too.

 

And dasm does stuff "behind the scenes"?  You never actually open a program called dasm, it just crunches the commands?

Exactly, it's a command-line program that simply translates your code. There is no window etc., just some output into the DOS box.

 

That's how "old style" programming worked. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...