[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Old RAM cards protocol
guertinp@saguenay.iro.umontreal.ca (Paul Guertin) writes:
>Locksmith recognizes two kinds of RAM cards. One kind of card has two
>16k banks, and the second bank is accessed by reading C08F twice. Does
>anyone regognize that card?
Sorta. The double access is usually to enable Writing for the RAM on the
card, so it may be possible you're misinterpreting the code a little.
>Am I correct in thinking that C080--C083 and C089--C08B are the standard
>switches for the first 16k bank and that C084--C087 and C08C--C08F perform
>the same functions for the second 16k bank?
Yep. This 32K card protocol is talked about in old Nibble articles.
Accessing each range "flips" the card into that bank, BTW.
>The second kind of card can have up to 256k, in sixteen 16k banks. I
>think those are the old Saturn or Titan RAM cards. Unfortunately, I
>don't have a manual for those, and it's not clear how to select a
>particular bank for reading and/or writing. If you have a Saturn or
>Titan RAM card manual, could you please look it up and email me?
Saturns and Titans used a different scheme. One of them, which I have a
clone of (the guy told me it was Saturn compatible, but to this day I do
not know for sure if that is correct), can go up to 128K because the eight
locations from C084--C087 and C08C--C08F each select one out of 8 16K banks
which are then accessed like normal 16K cards. The other type of card (i.e.
probably Titan) is bank-switched via a true register, and I believe you
can just write the bank number to C084, but I am not sure.
>Finally, here's the code Locksmith uses when scanning slots to find
>RAM cards. I don't understand the part between 206E and 2083. What
>exactly does it do?
The first BPL loop copies Cx00-Cx7F to RAM, but jumps to the standard
language card test if any of the bytes are "flaky", i.e. they change over
time -- indicating that no ROM firmware is on the card, which is true of
all language cards supported by Locksmith.
>206E- B1 40 LDA ($40),Y ;LOOK AT $CX00--$CX7F
>2070- 48 PHA
>2071- 68 PLA
>2072- D1 40 CMP ($40),Y ;HUH?
>2074- D0 0F BNE STDLCTST
>2076- SELFMOD 91 3E STA ($3E),Y ;STORE DATA HERE, NEXT TIME
>2078- D0 0B BNE STDLCTST ;AROUND WE'LL CMP THEM AND DO
>207A- C8 INY ;THE SAME TEST
>207B- 10 F1 BPL $206E
The second BPL loop then goes through and checks to see if all of the bytes
were exactly the same. This can happen on a language card if the screen is
fairly homogenous (i.e. most characters are spaces, or $A0) because the
source of the flaky bytes is the Apple's video system, and unless the slots
are really loaded the flaky bytes will be a faithful sampling of the data
read from memory into the video generator.
>207D- 88 DEY
>207E- D1 3E CMP ($3E),Y ;HUH?
>2080- D0 6D BNE NEXTSLOT ;NOT A LANGUAGE CARD, TRY
>2082- 88 DEY ; NEXT SLOT
>2083- 10 F9 BPL $207E
Todd Whitesel
toddpw @ cco.caltech.edu