]> git.sur5r.net Git - cc65/blob - doc/supervision.sgml
Merge branch 'da65-synclines' of github:shinra-jp/cc65 into da65-synclines
[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>2017-11-21
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>Hardware access<p>
67
68 The following pseudo variables declared in the <tt/supervision.inc/ include file do
69 allow access to hardware located in the address space.
70
71 <descrip>
72
73   <tag><tt/IO/</tag>
74   The <tt/IO/ defines allow access to the IO chip.
75
76 </descrip><p>
77
78
79
80 <sect>Loadable drivers<p>
81
82 <sect1>Graphics drivers<p>
83
84 No graphics drivers are currently available for the Supervision.
85 <!--A TGI driver for the standard graphics mode (160&times;160 in 4 colors) is
86 available, but must be statically linked, because no file I/O is available.
87 See the documentation for the <url url="co65.html" name="co65 utility">
88 for information on how to do that.-->
89
90 <sect1>Extended memory drivers<p>
91
92 No extended memory drivers are currently available for the Supervision.
93
94
95 <sect1>Joystick drivers<p>
96
97 <descrip>
98
99   <tag><tt/supervision-stdjoy.joy (supervision_stdjoy_joy)/</tag>
100   A joystick driver for the standard two buttons joypad is available.
101
102 </descrip><p>
103
104 <sect1>Mouse drivers<p>
105
106 No mouse drivers are currently available for the Supervision.
107
108
109 <sect1>RS232 device drivers<p>
110
111 No communication port drivers are currently available for the Supervision.
112
113
114
115 <sect>Limitations<p>
116
117 <sect1>Disk I/O<p>
118
119 The existing library for the Supervision doesn't implement C file
120 I/O. There are even no hacks for the <tt/read()/ and <tt/write()/ routines.
121
122 To be more concrete, this limitation means that you cannot use any of the
123 following functions (and a few others):
124
125 <itemize>
126 <item>fclose
127 <item>fopen
128 <item>fread
129 <item>fprintf
130 <item>fputc
131 <item>fscanf
132 <item>fwrite
133 <item>...
134 </itemize>
135
136
137
138 <sect>Other hints<p>
139
140
141
142 <sect>License<p>
143
144 This software is provided 'as-is', without any expressed or implied
145 warranty.  In no event will the authors be held liable for any damages
146 arising from the use of this software.
147
148 Permission is granted to anyone to use this software for any purpose,
149 including commercial applications, and to alter it and redistribute it
150 freely, subject to the following restrictions:
151
152 <enum>
153 <item>  The origin of this software must not be misrepresented; you must not
154         claim that you wrote the original software. If you use this software
155         in a product, an acknowledgment in the product documentation would be
156         appreciated but is not required.
157 <item>  Altered source versions must be plainly marked as such, and must not
158         be misrepresented as being the original software.
159 <item>  This notice may not be removed or altered from any source
160         distribution.
161 </enum>
162
163 </article>