Jump to content
IGNORED

What is the best way to dump the source code from an ATR


Recommended Posts

The source code for Dog Daze was included on archive.org, generously donated by the author, Gray Chang. I was interested in porting the game to the Atari 2600. It was one of the few games I purchased with my own money as a kid. They game looks like it might be possible with the help of extra RAM available in the Melody board but otherwise a stock 4K or 8k cart. (I figure a 40x40ish playfield requires 1600*2 colors/8bits or 400 bytes, well over the normal 128 available)

 

I would like to make the game as close as possible to the original and since the source code is available, it should be easy enough to port the game logic while requiring a complete rewrite of the display kernel and sounds. I haven’t fired up Altirra to load the disk image, but even if I did, I am not sure what application I would use to read the disk image (just DOS?).

 

Have any other source code disks for Atari been converted to a more modern format to be readable by PC/MAC/Linux? Was some tool been developed to convert the contents of Atari *.ATR to a *.txt file?

 

https://ia802205.us.archive.org/view_archive.php?archive=/5/items/GrayChangAtariSourceCode/Gray Chang Atari source code.zip

Link to comment
Share on other sites

An ATR file is just a container for the disk image - some descriptor bytes at the start then a raw dump of the disk sectors.  Disks from a few sectors to 16 Meg can be supported this way.

 

The computer boots a disk by reading sector 1 which has load address + # of sectors to load as well as boot continuation code and an Init address.

The majority of disk games are raw images without a filing system, so Dos can't read files from them and isn't required to load them.

 

Having done some game ports myself, one of the first things to do if you score the source code is ensure it's as advertised, ie assemble the game with the intent of getting the resulting binary to match the game on the disk - though generally just worry about the game and graphic/sound assets and not stuff like initial loader.  Potentially tricky but a strategic emulator trap and memory dump could give a decent result to compare with.

 

For a bootable disk you could do disassemble on the ATR using something like IDA Pro or a freeware interactive disassembler (or batch one).

Though generally a game will boot a few sectors at the load address in the boot header, and the continuation code will continue the load and often not contiguously with the initial boot code.

Link to comment
Share on other sites

On 5/21/2020 at 12:33 AM, CapitanClassic said:

Have any other source code disks for Atari been converted to a more modern format to be readable by PC/MAC/Linux? Was some tool been developed to convert the contents of Atari *.ATR to a *.txt file?

There is a brand new web-based util to explore ATRs. Then you can save the required contents.

 

Check for the latest version at the end of the thread or get it from GitHub:

https://github.com/rossumur/esp_8_bit/blob/master/atr_image_explorer.htm

 

I've check the source disk from your link, and some of them can be displayed, but there are other SRC files that are tokenized in an unsupported language. But you can still save them to disk and then explore using the right tool.

 

 

 

 

  • Like 2
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...