Jump to content
IGNORED

How to Fix BAD ATR's (The ones with 'k' in the corner)


Kyle22

Recommended Posts

There are some shorter than normal ATR files that appear to have been made with a tool that adds a boot loader to an executable. These ATRs display a lower case k character in the upper left of the screen. Most of them will boot, but are impossible to work with in DOS. Error 139 NAK on any attempt to get a directory.

 

It may be ok for some games to be bootable, but others write high score files and they don't work using this method.

 

I wrote a sloppy TB program to try to recover files from such disks, but I can't figure out how to detect the end of the file. The attached FORTRESS.ATR is an example. Looking at it using a hex editor in Windows, it appears that the file ends 1 byte before the string of 1A (Ctrl-Z) characters. My program extracts a file from the ATR that begins with the proper FFFF header, and ends at what looks like the proper place, but the file doesn't run (in SDX or 2.5).

 

The game does run correctly if booted from the ATR (just no hi score save).

 

The FORTRESS.EXE on the same ATR as the TB program is the non-running file created by the program.

 

These bad ATRs are all over the Holmes collection, and not only games, but applications too.

 

Any ideas?

 

FIXATR.ZIP

 

Edit: The one ATR with the program is Sparta format, so please use SDX.

Edited by Kyle22
Link to comment
Share on other sites

The first three sectors (394 bytes) contain the boot loader, so I just took everything from $180 ($190 if you include the ATR header) up to the first $1A and copied it to another file. This is the resulting XEX, which loads:

 

Fortress.xex

 

The boot loader obviously pulls sectors in and then parses the segments, so if you want to make an extractor, you could actually do the same. This might get around the problem of not knowing the file size.

  • Like 3
Link to comment
Share on other sites

By the way, I now remembered that on those past days I had some copies from friends but were tapes and that lowercase 'k' was at the bottom right side.

One of them was Pole Position (Race Tracks Design I think). What copy program and hacker did that? Anyone had or remember? Don't think it was any local pirates that did it as here there wasn't laws for games at the start and all street stores just use speedy two decks copy tape drives so whatever we all had come from outside mainly U.K. and almost no diskettes (the ones we had were too expensive, a simple copy costs 3x or more of the same game on tape and I think that many of these were copied from tapes so that they have even more profits).

 

P.s.- A nice way to get money was if we can, buy the new games from U.K. and sell the copies to one store and you had the investment. The next stores that people sold were profits. Had two brothers Atari friends that their father was working in a hotel on Jersey Island that had all games and that I was so jealous for all their original library stuff that was new and soo marvelous looking for me.

But the A8 market soon died but Spectrum continued this for some more years and at the end of the 80s there was also profits in doing this when Commodore tried to get into here with C64 but mostly seemed a way to have next to showing and trying to sold the Amigas.

Never got why companies didn't bother to got the public authorities do the software rights laws, that only came when carts Nintendo went in (but still not working well as most of the people started buying those pirate carts, some with many games, also the machines that were done in Asia and free of punishing import and sell on their stores all around).

Or perhaps I know and whatever were importing the machines the more games and cheap around the better for them ;).

Edited by José Pereira
  • Like 1
Link to comment
Share on other sites

Under MS-DOS, one can use MakeATR to convert an XEX into a (shortened) ATR image. To do the opposite, one can use UnMakeATR to get the XEX again. Under Windoze one may use AtrUtil. All these tools were made by Ken Siders...

 

There is also the tool AtrFix, which can be used to turn the shortened ATR into a standard 90k ATR image...

 

 

atr-fix.zip

Link to comment
Share on other sites

Under MS-DOS, one can use MakeATR to convert an XEX into a (shortened) ATR image. To do the opposite, one can use UnMakeATR to get the XEX again. Under Windoze one may use AtrUtil. All these tools were made by Ken Siders...

 

There is also the tool AtrFix, which can be used to turn the shortened ATR into a standard 90k ATR image...

 

 

Thanks for that, but it only fixes the size of the ATR. I still can't get a directory of the file(s) in the ATR. I believe this is because it is a bootdisk without a directory.

 

The Ken Siders tool is working, just the end of file needs adjusted a bit.

Link to comment
Share on other sites

Ken Siders AtrUtil is what you need to insert and extract xex files from the K-boot atrs.

 

 

The Ken Siders tool is working, just the end of file needs adjusted a bit.

 

I've just now added this ability to Omnivore, to extract XEX from the KBoot images. It does correctly truncate the XEX so there aren't garbage characters at the end.

 

I'll have a new version posted shortly!

  • Like 6
Link to comment
Share on other sites

Sorry to be dense about this, but I've never really run across these before (not a gamer). But I'm curious and don't quite have my head wrapped around it yet...

 

Let me see if I've got this: An executable FILE has been appended to a 3-sector loader. Then the LOADER + XEX becomes all that is required, so the remainder of the ATR (92176 bytes) is truncated? And the ATR bytes are altered to reflect the "short" ATR?

 

Are there other possible variants -- using the same technique for a regular DOS image with multiple files on the directory? Any other non-game examples come to mind?

 

-Larry

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...