WikiPendium

(beta)

RomCartridgesProgramming

WikiPendium :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-18-227-140-252.us-east-2.compute.amazonaws.com

ROM Cartridges Programming


All program code must be compiled to be relative of the 0x00FA0000 base address.

The ULONG appearing at 0x00FA0000 determines the type of cartridge installed as follows:

Cartridge Type ULONG Value
Application cartridge 0xABCDEF42
Diagnostic cartridge 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 0x00FA0004 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 8 bits of this pointer have a special meaning as follows:
Bit Set: Meaning
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.

Executable files appear on the special 'c' drive as they would on any standard disk.
Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]