•  Back 
  •  Hardware 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File<invalid destination page 1581>

                                 Cartridges


All Atari computers support an external 128K ROM cartridge port.
Cartridges may be created to support applications or diagnostic tools. The
128K of address space allocated to cartridges appears from address
0xFA0000 to 0xFBFFFF. Newer Atari computers support larger cartridges
(this is because the address space would no longer overlap the OS). All
program code must be compiled to be relative of this base address.

The LONG appearing at 0xFA0000 determines the type of cartridge installed
as follows:

                        Cartridge    LONG Value

                        Application  0xABCDEF42

                        Diagnostic   0xFA52255F

Diagnostic Cartridges

Diagnostic cartridges are executed almost immediately after a system
reset. The OS uses a 680x0 JMP instruction to begin execution at address
0xFA0004 after having set the Interrupt Priority Level (IPL) to 7,
entering supervisor mode, and executing a RESET instruction to reset
external hardware devices.

Upon execution, register A6 will contain a return address which should be
JMP'd to if you wish to continue system initialization at any point. The
stack pointers will contain garbage. In addition, keep in mind that no
hardware has been initialized, particularly the memory controller. All
system memory sizing and initialization must be performed by the
diagnostic cartridge.

Application Cartridges

Application cartridges should contain one or more application headers
beginning at location 0xFA0004 as follows (one cartridge may contain one
or many applications):

Name     Offset  Meaning

CA_NEXT  0x00    Pointer to the next application header (or NULL if there
                 are no more).

CA_INIT  0x04    Pointer to the application's initialization code. The
                 high eight bits of this pointer have a special meaning as
                 follows:

                 Bit                  Meaning
                 Set
                  0     Execute prior to display memory and interrupt
                        vector initialization.
                  1     Execute just before GEMDOS is initialized.
                  2     (unused)
                  3     Execute prior to boot disk.
                  4     (unused)
                  5     Application is a Desk Accessory.
                  6     Application is not a GEM application.
                  7     Application needs parameters.

CA_RUN   0x08    Pointer to application's main entry point.

CA_TIME  0x0C    Standard GEMDOS time stamp.

CA_DATE  0x0E    Standard GEMDOS date stamp.

CA_SIZE  0x10    Size of application in bytes.

CA_NAME  0x14    NULL terminated ASCII filename in standard GEMDOS 8+3
                 format.

When application cartridges are present, GEMDOS will allow a special 'c'
(lowercase) drive to be accessed. Executable files appear on this drive as
they would on any standard disk. This 'drive' may also be installed on the
desktop.