]> git.sur5r.net Git - cc65/blob - doc/telestrat.sgml
1c0b3d9549c5d7ca1be310fe146cb1d497ea36a8
[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 
20 with the cc65 C compiler. It describes the memory layout, Telestrat-specific 
21 header files, 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 Oric Telestrat is the last Oric computer (Released in 1986, mainly in France).
30 This computer is an Atmos with extra hardware : RS232, cardridge (banking system),
31 joysticks (2 ports) or mouse (on joystick port), FDC.
32
33 Video chip, CPU, keyboard management, tape hardware are the same than Atmos.
34
35 Telestrat can start in Atmos mode with Atmos Cardridge (which is only the atmos 
36 Basic 1.1 ROM). 
37
38 Telestrat can start in Sedoric (Atmos OS) and Atmos mode with Stratoric Cardridge.
39 This Cardridge is a Sedoric ROM, Basic 1.1 ROM (Atmos), Basic 1.0 ROM (Oric-1).
40
41 The main Telestrat's configuration is the Telemon/Hyperbasic Cardridge inserted 
42 with Stratsed in floppy drive.
43
44 Anyway, there is no way to load a tape file in Telemon/Hyperbasic mode without 
45 alternative program.
46
47 There is also no software to write a Stratsed dsk file on PC.
48
49 This Telestrat target build an Orix binary file. But, in the future, it will be possible 
50 to build a Stratsed disk. Orix uses the same systems calls than Telemon mode.
51
52 That is why if you need to do software for telestrat target, you have the choice to :
53 <itemize>
54 <item>use cc65 Atmos target and start Telestrat in Atmos mode : a tape file is required
55 <item>use cc65 Atmos target and start Telestrat in Stratoric mode : a dsk file or tape file is required
56 <item>use cc65 Telestrat target and start Telestrat in Orix mode (see <url
57 name="here" url="http://orix.oric.org/download/">)
58 <item>use cc65 Telestrat target, remove Orix header from binary, code a dsk tool for Stratsed, 
59 add Stratsed header on your binary, insert your binary on floppy disk (this solution will be possible is the future)
60 </itemize>
61
62 Telestrat (from cardridge) can handle 8 banks (from $C000 to $FFFF): Bank 0 is the overlay ram. Others banks can be ROM or RAM.
63
64 <sect>Binary format<p>
65
66 The standard binary output format generated the linker for the Telestrat
67 target is a machine language program with a 20 bytes header described <url
68 name="here" url="http://orix.oric.org/orix-header/">
69
70 This header is used for Telemon 3.0.
71
72 Anyway, for Telemon 2.4, there is no file management, there is no TAPE routine 
73 in Telemon, there is no way to load a binary easily.
74
75 Stratsed (the Telestrat operating system) handles files management. Stratsed 
76 is loaded to memory from floppy disk. Stratsed vector are declared in asminc/telestrat.inc.
77 But, reverse engineering is required to find how theses vectors works. Please, note that 
78 Stratsed is located in overlay memory (bank 0)
79
80 There is no tool to insert a binary in a Stratsed floppy disk.
81
82 The only way to load a binary (for Telemon 2.4) is to:
83 <itemize>
84 <item>remove the 20 bytes header
85 <item>download <url name="osdk" url="http://osdk.defence-force.org/index?page=download">
86 <item>use Floppybuilder in OSDK to insert the binary with the tool (please read 
87 FloppyBuilder manual to insert your binary, and to start microdisc boot sector 
88 when Telestrat starts)
89 </itemize>
90
91 Please note also, that the binary converted into TAP file, will not produce
92 a right stratsed file when tap2dsk and old2mfm are used. You will be in the
93 case that Telestrat/Stratsed crashed when you do "DIR" command.
94
95 If you know the Stratsed disk format, please contact the author of this doc.
96
97
98 <sect>Memory layout<p>
99
100 In the standard setup, cc65-generated programs use the memory from
101 &dollar;0801 to &dollar;9800; so, nearly 37K of memory (including the stack) is
102 available. ROM calls are possible with BRK feature.
103
104
105 Special locations:
106
107 <descrip>
108   <tag/Stack/
109   The C runtime stack is located at &dollar;97FF (or &dollar;B3FF), and grows
110   downwards.
111
112   <tag/Heap/
113   The C heap is located at the end of the program, and grows towards the C
114   runtime stack.
115
116 </descrip><p>
117
118
119
120 <sect>Platform-specific header files<p>
121
122 Programs containing Telestrat-specific code may use the <tt/telestrat.h/ header file.
123
124
125 <sect1>Telestrat-specific functions<p>
126
127 The functions listed below are special for the Telestrat. See the <url
128 url="funcref.html" name="function reference"> for declaration and usage.
129
130 <itemize>
131 <item>explode
132 <item>ping
133 <item>shoot
134 <item>zap
135 <item>oups
136 </itemize>
137
138
139 <sect1>Hardware access<p>
140
141 The following pseudo variables declared in the <tt/telestrat.h/ header file do allow
142 access to hardware located in the address space. Some variables are
143 structures; accessing the struct fields will access the chip registers.
144
145 <descrip>
146
147   <tag><tt/VIA/</tag>
148   Access to the VIA (Versatile Interface Adapter) chip is available via the
149   <tt/VIA/ variable. The structure behind this variable is explained in <tt/_6522.h/.
150
151 </descrip><p>
152
153 <descrip>
154
155   <tag><tt/VIA2/</tag>
156   Access to the VIA2 (Versatile Interface Adapter) chip is available via the
157   <tt/VIA2/ variable. The structure behind this variable is explained in <tt/_6522.h/.
158
159 </descrip><p>
160
161 <descrip>
162
163   <tag><tt/6551/</tag>
164   Access to the 6551 ACIA chip is available via the
165   <tt/6551/ variable. The structure behind this variable is explained in <tt/_6551.h/.
166
167 </descrip><p>
168
169
170 <sect>Loadable drivers<p>
171
172 <sect1>TGI<p>
173
174 TGI drivers is available on Oric Telestrat with some functions :
175
176 <itemize>
177 <item>tgi_clear
178 <item>tgi_done
179 <item>tgi_init
180 <item>tgi_install
181 <item>tgi_line
182 <item>tgi_outtext
183 <item>tgi_setpixel
184 </itemize>
185
186
187 <sect1>Extended memory drivers<p>
188
189 No extended memory drivers are currently available for the Telestrat. 
190 This feature could be done because telestrat can manage RAM inserted in his 
191 port cardridge. 
192
193 <sect1>Joystick drivers<p>
194
195
196 <descrip>
197
198 Telemon 2.4 & 3.0 manages joysticks but it had been handled yet. This means that 
199 joysticks driver could be written easily.
200
201 Telemon 2.4 returns in keyboard buffer the direction of the joysticks. This means that
202 if you get input from keyboard by conio cgetc function, you will get direction from joysticks.
203
204
205 <sect1>Mouse drivers<p>
206
207
208 <descrip>
209
210 Telestrat manages also mouse, but it had been no handled yet in this version. 
211 Telestrat mouse is really difficult to find.
212
213
214 <sect1>RS232 device drivers<p>
215
216
217 <descrip>
218
219 Telestrat has a RS232 port, but it's not usable in cc65. It is possible to use 
220 RS232 port with Telemon calls (see XSOUT primitive for example)
221
222
223 <sect>Limitations<label id="limitations"><p>
224
225 <sect1>Disk I/O<p>
226
227 Telemon 3.0 handles fopen, fread, fclose primitives. It means that this
228 function will crash the Telestrat because Telemon 2.4 does not have these
229 primitives. By the way, Telemon 3.0 uses an extension "ch376 card" which
230 handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS,
231 Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread,
232 fclose).
233
234 <itemize>
235 <item>fclose
236 <item>fopen
237 <item>fread
238 </itemize>
239
240
241
242 <sect>Other hints<p>
243
244
245 <sect>License<p>
246
247 This software is provided 'as-is', without any expressed or implied
248 warranty.  In no event will the authors be held liable for any damages
249 arising from the use of this software.
250
251 Permission is granted to anyone to use this software for any purpose,
252 including commercial applications, and to alter it and redistribute it
253 freely, subject to the following restrictions:
254
255 <enum>
256 <item>  The origin of this software must not be misrepresented; you must not
257         claim that you wrote the original software. If you use this software
258         in a product, an acknowledgment in the product documentation would be
259         appreciated but is not required.
260 <item>  Altered source versions must be plainly marked as such, and must not
261         be misrepresented as being the original software.
262 <item>  This notice may not be removed or altered from any source
263         distribution.
264 </enum>
265
266 </article>