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