]> git.sur5r.net Git - cc65/blob - doc/atari5200.sgml
documentation updates for Atari 5200
[cc65] / doc / atari5200.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4
5 <title>Atari 5200 specific information for cc65
6 <author>
7 <url url="mailto:chris@groessler.org" name="Christian Groessler"><newline>
8 <date>2014-05-15
9
10 <abstract>
11 An overview over the Atari 5200 runtime system as it is implemented for the
12 cc65 C compiler.
13 </abstract>
14
15 <!-- Table of contents -->
16 <toc>
17
18 <!-- Begin the document -->
19
20 <sect>Overview<p>
21
22 This file contains an overview of the Atari 5200 runtime system as it comes
23 with the cc65 C compiler. It describes the memory layout, Atari 5200 specific header
24 files, available drivers, and any pitfalls specific to that platform.
25
26 Please note that Atari 5200 specific functions are just mentioned here, they are
27 described in detail in the separate <url url="funcref.html" name="function
28 reference">. Even functions marked as "platform dependent" may be available on
29 more than one platform. Please see the function reference for more
30 information.
31
32
33 <sect>Binary format<p>
34
35 The standard binary output format generated by the linker for the Atari 5200 target
36 is a cartridge image. It is of course
37 possible to change this behaviour by using a modified startup file and linker
38 config.
39
40 <sect>Memory layout<p>
41
42 cc65 generated programs with the default setup run with the I/O area and a
43 CHR bank enabled, which gives a usable memory range of &dollar;8000 - &dollar;FFF3.
44 All boot ROM entry points may be called directly without additional code.
45
46 Special locations:
47
48 <descrip>
49   <tag/Text screen/
50   The text screen is located at VRAM &dollar;2000.
51
52   <tag/Stack/
53   The C runtime stack is located at &dollar;7FFF and growing downwards.
54
55   <tag/Heap/
56   The C heap is located at the end of the program and grows towards the C
57   runtime stack.
58
59 </descrip><p>
60
61
62
63 <sect>Platform specific header files<p>
64
65 Programs containing Atari 5200 specific code may use the <tt/atari5200.h/ header file.
66
67
68 <sect1>Atari 5200 specific functions<p>
69
70 <itemize>
71 <item>???
72 </itemize>
73
74
75
76 <sect1>Hardware access<p>
77
78 The following pseudo variables declared in the <tt/nes.inc/ include file do
79 allow access to hardware located in the address space.
80
81 <descrip>
82
83   <tag><tt/PPU/</tag>
84   The <tt/PPU/ defines allow access to the PPU chip.
85
86   <tag><tt/APU/</tag>
87   The <tt/APU/ defines allow access to the APU chip.
88
89 </descrip><p>
90
91
92
93 <sect>Loadable drivers<p>
94
95 All drivers must be statically linked because no file I/O is available.
96 The names in the parentheses denote the symbols to be used for static linking of the drivers.
97
98
99 <sect1>Graphics drivers<p>
100
101 <descrip>
102
103 No graphics drivers are currently available for the Atari 5200.
104
105 </descrip><p>
106
107
108 <sect1>Extended memory drivers<p>
109
110 No extended memory drivers are available for the Atari 5200.
111
112
113 <sect1>Joystick drivers<p>
114
115 <descrip>
116
117   <tag><tt/atr5200std.joy (atr5200std_joy)/</tag>
118   A joystick driver for the standard Atari 5200 joystick is available. Up to four joysticks can be attached.
119
120 </descrip><p>
121
122
123 <sect1>Mouse drivers<p>
124
125 No mouse drivers are available for the Atari 5200.
126
127
128 <sect1>RS232 device drivers<p>
129
130 No serial drivers are available for the Atari 5200.
131
132
133
134 <sect>Limitations<p>
135
136 <sect1>Disk I/O<p>
137
138 The existing library for the Atari 5200 doesn't implement C file
139 I/O. There are no hacks for the <tt/read()/ and <tt/write()/ routines.
140
141 To be more concrete, this limitation means that you cannot use any of the
142 following functions (and a few others):
143
144 <itemize>
145 <item>fclose
146 <item>fopen
147 <item>fread
148 <item>fprintf
149 <item>fputc
150 <item>fscanf
151 <item>fwrite
152 <item>...
153 </itemize>
154
155
156
157 <sect>Other hints<p>
158
159
160
161 <sect>License<p>
162
163 This software is provided 'as-is', without any expressed or implied
164 warranty.  In no event will the authors be held liable for any damages
165 arising from the use of this software.
166
167 Permission is granted to anyone to use this software for any purpose,
168 including commercial applications, and to alter it and redistribute it
169 freely, subject to the following restrictions:
170
171 <enum>
172 <item>  The origin of this software must not be misrepresented; you must not
173         claim that you wrote the original software. If you use this software
174         in a product, an acknowledgment in the product documentation would be
175         appreciated but is not required.
176 <item>  Altered source versions must be plainly marked as such, and must not
177         be misrepresented as being the original software.
178 <item>  This notice may not be removed or altered from any source
179         distribution.
180 </enum>
181
182 </article>