]> git.sur5r.net Git - cc65/blob - doc/telestrat.sgml
Adjusted library name.
[cc65] / doc / telestrat.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4 <title>Oric Telestrat-specific information for cc65
5 <author>
6 <url url="mailto:jede@oric.org" name="Jede">
7
8 <abstract>
9 An overview over the Telestrat (Telemon 2.4 & Telemon 3.x : http://orix.oric.org) runtime system as it is implemented for the cc65 C compiler.
10 </abstract>
11
12 <!-- Table of contents -->
13 <toc>
14
15 <!-- Begin the document -->
16
17 <sect>Overview<p>
18
19 This file contains an overview of the Telestrat runtime system as it comes with the
20 cc65 C compiler. It describes the memory layout, Telestrat-specific header files,
21 available drivers, and any pitfalls specific to that platform.
22
23 Please note that Telestrat-specific functions are just mentioned here, they are
24 described in detail in the separate <url url="funcref.html" name="function
25 reference">. Even functions marked as "platform dependent" may be available on
26 more than one platform. Please see the function reference for more
27 information.
28
29 <sect>Binary format<p>
30
31 The standard binary output format generated the linker for the Telestrat
32 target is a machine language program with a 20 bytes header described <url
33 name="here" url="http://orix.oric.org/doku.php?id=orix:header">
34
35 This header is used for Telemon 3.0.
36
37 Anyway, for Telemon 2.4, there is no file management, there is no TAPE routine in Telemon, there is no way to load a binary easily.
38
39 Stratsed (the Telestrat operating system) handles files management. Stratsed is loaded to memory from floppy disk.
40
41 There is no tool to insert a binary in a Stratsed floppy disk.
42
43 The only way to load a binary (for Telemon 2.4) is to:
44 <itemize>
45 <item>remove the 20 bytes header
46 <item>download <url name="osdk" url="http://osdk.defence-force.org/index?page=download">
47 <item>use Floppybuilder in OSDK to insert the binary with the tool (please read FloppyBuilder manual to insert your binary, and to start microdisc boot sector when Telestrat starts)
48 </itemize>
49
50 Please note also, that the binary converted into TAP file, will not produce
51 a right stratsed file when tap2dsk and old2mfm are used. You will be in the
52 case that Telestrat/Stratsed crashed when you do "DIR" command.
53
54 If you know the Stratsed disk format, please contact the author of this doc.
55
56
57 <sect>Memory layout<p>
58
59 In the standard setup, cc65-generated programs use the memory from
60 &dollar;0801 to &dollar;9800; so, nearly 37K of memory (including the stack) is
61 available. ROM calls are possible without further precautions.
62
63
64 Special locations:
65
66 <descrip>
67   <tag/Stack/
68   The C runtime stack is located at &dollar;97FF (or &dollar;B3FF), and grows
69   downwards.
70
71   <tag/Heap/
72   The C heap is located at the end of the program, and grows towards the C
73   runtime stack.
74
75 </descrip><p>
76
77
78
79 <sect>Platform-specific header files<p>
80
81 Programs containing Telestrat-specific code may use the <tt/telestrat.h/ header file.
82
83
84 <sect1>Telestrat-specific functions<p>
85
86 The functions listed below are special for the Telestrat. See the <url
87 url="funcref.html" name="function reference"> for declaration and usage.
88
89 <itemize>
90 <item>explode
91 <item>ping
92 <item>shoot
93 <item>zap
94 <item>oups
95 </itemize>
96
97
98 <sect1>Hardware access<p>
99
100 The following pseudo variables declared in the <tt/telestrat.h/ header file do allow
101 access to hardware located in the address space. Some variables are
102 structures; accessing the struct fields will access the chip registers.
103
104 <descrip>
105
106   <tag><tt/VIA/</tag>
107   Access to the VIA (Versatile Interface Adapter) chip is available via the
108   <tt/VIA/ variable. The structure behind this variable is explained in <tt/_6522.h/.
109
110 </descrip><p>
111
112
113 <sect>Loadable drivers<p>
114
115 <sect1>TGI<p>
116
117 TGI drivers is available on Oric Telestrat with some functions :
118
119 <itemize>
120 <item>tgi_done
121 <item>tgi_install
122 <item>tgi_init
123 <item>tgi_clear
124 <item>tgi_line
125 <item>tgi_setpixel
126 </itemize>
127
128
129 <sect1>Extended memory drivers<p>
130
131 No extended memory drivers are currently available for the Telestrat.
132
133
134 <sect1>Joystick drivers<p>
135
136 <descrip>
137
138 telemon 2.4 & 3.0 manages joysticks but it had been handled yet.
139
140 </descrip>
141
142
143 <sect1>Mouse drivers<p>
144
145 <descrip>
146
147 Telestrat manages also mouse, but it had been no handled yet in this version.
148
149 </descrip>
150
151 <sect1>RS232 device drivers<p>
152
153 <descrip>
154
155 Telestrat has a RS232 port, but it's not usable in cc65.
156
157 </descrip>
158
159 <sect>Limitations<label id="limitations"><p>
160
161 <sect1>Disk I/O<p>
162
163 Telemon 3.0 handles fopen, fread, fclose primitives. It means that this
164 function will crash the Telestrat because Telemon 2.4 does not have these
165 primitives. By the way, Telemon 3.0 uses an extension "ch376 card" which
166 handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS,
167 Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread,
168 fclose).
169
170 <itemize>
171 <item>fclose
172 <item>fopen
173 <item>fread
174 </itemize>
175
176
177
178 <sect>Other hints<p>
179
180
181 <sect>License<p>
182
183 This software is provided 'as-is', without any expressed or implied
184 warranty.  In no event will the authors be held liable for any damages
185 arising from the use of this software.
186
187 Permission is granted to anyone to use this software for any purpose,
188 including commercial applications, and to alter it and redistribute it
189 freely, subject to the following restrictions:
190
191 <enum>
192 <item>  The origin of this software must not be misrepresented; you must not
193         claim that you wrote the original software. If you use this software
194         in a product, an acknowledgment in the product documentation would be
195         appreciated but is not required.
196 <item>  Altered source versions must be plainly marked as such, and must not
197         be misrepresented as being the original software.
198 <item>  This notice may not be removed or altered from any source
199         distribution.
200 </enum>
201
202 </article>