diff --git a/doc/atari7800.sgml b/doc/atari7800.sgml index 95868bbd9..85f6e4f9f 100644 --- a/doc/atari7800.sgml +++ b/doc/atari7800.sgml @@ -3,7 +3,7 @@
Atari 7800 specific information for cc65 <author> -<url url="mailto:contact@florentflament.com" name="Florent Flament"><newline> +<url url="mailto:karri@sipo.fi" name="Karri Kaksonen"><newline> <abstract> An overview over the Atari 7800 runtime system as it is implemented @@ -24,23 +24,31 @@ comes with the cc65 C compiler. It describes the memory layout, Atari <sect>Binary format<p> The default binary output format generated by the linker for the Atari -7800 target is a 4K cartridge image. +7800 target is a 32K cartridge image. <sect>Memory layout<p> cc65 generated programs with the default setup can use RAM from -$0080 to $00FF - __STACKSIZE__, where __STACKSIZE__ is -the size of the system stack with a default value of 16 bytes. The +from $1800 to $203f. +The 4k RAM is then mapped to zero page area. +$2040 to $20ff is visible as zero page. +After that we have a vero small RAM area that is unused. +$2100 to $213f. +Then we mirror a second block from the RAM to become the hardware stack. +This would be from $2140 to $21ff. + +The C-stack starts at $2800 and it can grow down to $2200. + size of the system stack can be customized by defining the __STACKSIZE__ linker variable. Special locations: <descrip> - <tag/Stack/ The C runtime stack is located at $00FF - + <tag/Stack/ The C runtime stack is located at $2800 - __STACKSIZE__ and growing downwards. - <tag/Heap/ The C heap is located at $0080 and grows upwards. + <tag/Heap/ The C heap is located at $2200 and grows upwards. </descrip><p> @@ -61,7 +69,7 @@ Programs containing Atari 7800 specific code may use the <tt/atari7800.h/ header file. The following pseudo variables declared in the <tt/atari7800.h/ header -file allow access to the Atari 7800 TIA & RIOT chips registers. +file allow access to the Atari 7800 TIA, MARIA & RIOT chips registers. <descrip> @@ -78,6 +86,11 @@ file allow access to the Atari 7800 TIA & RIOT chips registers. Guide by Steve Wright for a detailed description of the chip and its registers. + <tag><tt/MARIA/</tag> The <tt/MARIA/ structure allows read/write + access to the Atari 7800 MARIA chip registers. See the + <tt/_maria.h/ header file located in the include directory for the + declaration of the structure. + </descrip><p> @@ -91,6 +104,12 @@ There are no drivers for the Atari 7800. TBD +<sect>Encryption<p> + +In order to boot the game in a mode that supports atari7800 functions +the cart must be encrypted after the linking phase. +There is a program called sign7800 that can be used to sign the cart. + <sect>Other hints<p> One may write a custom linker configuration file to tune the memory