home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / ICTARI09.ARJ / ictari.09 / ASSEMBLY / COOKFIND / COOKIES.TXT < prev    next >
Text File  |  1994-03-27  |  7KB  |  187 lines

  1.                            A Guide to the Cookie Jar
  2.                            -------------------------
  3.  
  4.     The cookie jar first appeared in TOS  v1.6  (Rainbow TOS) and is in all
  5.     later versions of TOS. It  contains  a  list of (hopefully) unique four
  6.     letter names  followed  by  a  longword  of  data  (that  contains some
  7.     information about the cookie you are looking at).
  8.  
  9.     Cookies are placed in the  jar  by  the operating system (ATARI Cookies
  10.     always start their names with an  underscore (e.g. "_CPU")) and by some
  11.     TSR programs.
  12.  
  13.     There is a system variable at $5a0  called P_cookies that points to the
  14.     cookie jar. It contains the longword address of the start of the cookie
  15.     jar (or zero  if  no  cookie  jar  exists).  P_cookies  will contain an
  16.     address of zero on cold boot of  any machine with TOS version less than
  17.     v1.6.
  18.  
  19.     Each cookie consists of two  longwords.  The  first  is the name of the
  20.     cookie. The second is the information about that cookie.
  21.  
  22.     The cookie jar should be searched for the name that you require until a
  23.     name of $00000000 is found.  This  is  a  special cookie that is always
  24.     last in the list. Its  value  longword  contains  the number of cookies
  25.     that can be fitted in  the  current  jar.  Remember that each cookie is
  26.     eight bytes.
  27.  
  28.     If you want to add a cookie you  must  check this value to see if there
  29.     is enough room  to  add  another  cookie  (subtract  number  of cookies
  30.     present, including $0 cookie, from  number  contained  in $0 cookie. If
  31.     you are left with a  number  greater  than  zero,  copy the zero cookie
  32.     (eight bytes) to the next slot  (eight  bytes down) and put your cookie
  33.     in the slot that the zero cookie used to have.
  34.  
  35.     If there is  not  enough  room  to  add  a  new  cookie,  allocate some
  36.     PERMANENT memory that has enough room  for  all cookies and eight or so
  37.     spares and move all cookies to the new jar. Remember to change the zero
  38.     cookie to reflect the new  number  of  slots available. Finally, change
  39.     the cookie pointer to point to the new jar.
  40.  
  41.     Remember that the cookie pointer survives a warm reset, so your program
  42.     that adds a cookie to it  should  also  survive a warm reset, as should
  43.     the cookie jar memory.
  44.  
  45.     If there is no cookie jar, you  should  be  on a straight ST, all other
  46.     machines should have a  cookie  jar.  ST's  can  have  cookie jars if a
  47.     program makes one. If a  program  makes  a  Jar from scratch, it should
  48.     remove it on a Warm  reset  by  setting  P_cookies  to zero, unless the
  49.     program itself will survive the warm reset.
  50.  
  51.     KNOWN COOKIES
  52.     -------------
  53.     _AKP Atari Keyboard Preference
  54.  
  55.           0 = USA
  56.           1 = Germany
  57.           2 = France
  58.           3 = United Kingdom
  59.           4 = Spain
  60.           5 = Italy
  61.           6 = Sweden
  62.           7 = Switzerland (French)
  63.           8 = Switzerland (German)
  64.           9 = Turkey
  65.          10 = Finland
  66.          11 = Norway
  67.          12 = Denmark
  68.          13 = Saudi Arabia
  69.          14 = Holland
  70.          15 = Czechoslovakia
  71.          16 = Hungary
  72.          Used by any AES >=3.30
  73.  
  74.     _CPU           CPU type
  75.  
  76.          Low Word = 0,10,20,30 (maybe 40 later?)
  77.          This is the processor type used in the machine (680XX)
  78.  
  79.     _FDC           Floppy Disk Density (Max)
  80.  
  81.          High Byte indicates Highest Density Floppy in Machine
  82.          00 = 360K/720K - Double Density
  83.          01 = 1.44M - High Density
  84.          02 = 2.88M - Extra High Density
  85.          Low three bytes indicate whoose Floppy it is...
  86.          Currently $415443 (ATC) used to indicate fitted by ATARI
  87.  
  88.     _FLK           File Locking Version
  89.  
  90.          If cookie is present, file sharing/locking can be used
  91.          MINT will install this cookie, as will some GEMDOS versions
  92.          Value is the version number of the file sharing extensions
  93.          MINT currently puts in version 0
  94.  
  95.     _FPU           Floating Point Unit
  96.  
  97.          Bit 0 Set = I/O mapped 68881 or ATARI SFP004
  98.          Bit 1 Set = 68881 or 68882
  99.          Bit 2 Set = 68882 if bit 1 Set, else 68881
  100.          Bit 3 Set = Internal FPU (in processor) or software emulation
  101.  
  102.     _FRB           Fast Ram Buffer
  103.  
  104.          Address of a 64K buffer used by the ACSI DMA Device drivers.
  105.          Used as a temporary  storage  area  when  transferring to Fast Ram
  106.     (TT)
  107.          as DMA does not have access to Fast Ram.
  108.          Use only if DMA not flock'ed by system variable.
  109.  
  110.     _IDT           International Time & Date Display Mode
  111.  
  112.          High Word Currently Unused
  113.          Low Byte is Date Separator (e.g. #"/")
  114.          Bits 8-11
  115.                    00 = MM-DD-YY
  116.                    01 = DD-MM-YY
  117.                    02 = YY-MM-DD
  118.                    03 = YY-DD-MM
  119.          Bits 12-15
  120.                    00 = 12 Hour Clock
  121.                    01 = 24 Hour Clock
  122.  
  123.     _MCH           Machine Type
  124.  
  125.          High Word is Main type and is the part to check.
  126.          00 = 520ST or 1040ST or Mega ST
  127.          01 = STE
  128.          02 = TT
  129.          03 = Falcon
  130.          Low Word is the Machine version and is currently always zero,
  131.          Unless Mega STE when it is 16
  132.  
  133.     _NET           Networking Software Available
  134.  
  135.          Points to a Structure containing:
  136.                    Long:     Software ID
  137.                    Long:     Version
  138.          Software ID's include :
  139.                    "A&D",0   Application Design Software
  140.                    "PAMS"    Pams Software
  141.                    "ITOS"    Itos Software
  142.  
  143.     _SND           Bitmap of Sound Hardware Available
  144.  
  145.          Bit 0 Set = GI/Yamaha Sound Chip (Beep chip)
  146.          Bit 1 Set = 8 bit Stereo DMA Sound
  147.          Bit 2 Set = 16 bit CODEC
  148.          Bit 3 Set = DSP chip
  149.          Bit 4 Set = Connection Matrix
  150.  
  151.     _SWI           Configuration Switches
  152.  
  153.          Only on STE, TT and Falcon - reflects internal switch settings
  154.          Meaning unknown
  155.          Falcon is $BF
  156.  
  157.     _VDO           Video Shifter Revision Number
  158.  
  159.          High Word is Major Part Number and is the part to check.
  160.          00 = ST
  161.          01 = STE
  162.          02 = TT
  163.          03 = Falcon
  164.          Low Word is Minor Part Number and is currently always zero.
  165.  
  166.     FSMC           SpeedoGDOS installed (or other Font Scaling Software)
  167.  
  168.          Contains pointer to structure:
  169.                    Long:     Software ID         currently "_SPD"
  170.                    Word:     Version No.         Major/Minor
  171.                    Word:     Quality Setting
  172.  
  173.     MiNT           MiNT active (Note little i)
  174.  
  175.          High Word not used
  176.          Low Word is Version No. (as Major/Minor)
  177.  
  178.     PMMU           Program has claimed  SOLE  access  to  Memory Management
  179.     Unit
  180.  
  181.          Used by virtual memory managers - no known value
  182.          Tells MiNT not to use Memory Protection.
  183.  
  184.     SAM,0          System Audio Manager is installed
  185.  
  186.          Contains pointer to structure.
  187.