Jump to content
IGNORED

Is there a bug in cart checksum calculate routine in rev. 2 xl/xe os?


Marius

Recommended Posts

Hi All,

 

In rev. XL/XE OS I see this code:

 

C4C9 LDA #$00

C4CB TAX

C4CC CLC

C4CD ADC $BFF0,X

C4D0 INX

C4D1 BNE $C4CD

 

-> THIS MEANS THAT #$F0 BYTES OF THE OS ARE CALCULATED WITH THE CHECKSUM.

 

In mapping the atari I read that page 1 of the cart is calculated for checksum, but that is obviously not what's happening.

It's not a problem for me, I'll copy this routine into my own tool, and I'm done, but I was wondering whether this is a bug or a feature.

 

 

Link to comment
Share on other sites

I would say it's a bug, should be $BF00 not $BFF0.

 

Only involving the last 16 bytes of the cart means there's a fair probability of a cart swapped for another generating the same checksum - many carts just use $A000 as Init/Run and many don't use all 8K and just have a bunch of zeros leading up to the vector/flags area.

 

The only reason you'd involve $C000... in the calculations is for something that could override the OS and that would be a PBI connected device. Though generally you'd never want to hotplug one of those.

 

They probably detected it later on but it's one of those things once in production you have to hang onto it. For a cartridge that can switch it's upper bank it's appropriate that it generate a checksum for other banks and store them into the OS variable, since cartridges don't get initialized when the user hits Reset or the machine does a called warmstart.

 

The end result though if a false cart change is detected on Reset is it coldstarts instead of warmstarts. For a game no big problem as generally you'd just lose the high score but for a language cart not desirable though the only language carts I know of that do bankswitching are the OSS ones and they have that top address area fixed.

Link to comment
Share on other sites

It is definitely a bug - it is identified as a problem in the source listing of XL OS Rev.2, and was later fixed in the 1400XL/1450XLD OS revisions, although the fix never reached the market.

Edited by Kr0tki
Link to comment
Share on other sites

It is definitely a bug - it is identified as a problem in the source listing of XL OS Rev.2, and was later fixed in the 1400XL/1450XLD OS revisions, although the fix never reached the market.

 

What about the rev 3 XL/XE OS? The one in the XE line of computers?

Link to comment
Share on other sites

 

the fix never reached the market

 

I know the 1400 series never reached market. I also know the bug was in rev. 2 of the OS. Odd they would know about it, fix it for a product the planned to release (but didn't), but then not fix it in another product that came later that was released. Is that what you are saying?

Link to comment
Share on other sites

Yes, excluding the statement that it was "odd". When a company is being liquidated, some Shit is bound to Happen.

 

Atari actually kept developing the improved OS for a while even after the 14xx computers were canned, and even after the Tramiel buyout - the last known changes in the source listing are from 4 Sept. 1984. For unknown reasons (compatibility, I guess), they then dropped almost all of the changes introduced in that development branch.

Edited by Kr0tki
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...