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