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