-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathtelestrat.html
More file actions
319 lines (242 loc) · 11.6 KB
/
telestrat.html
File metadata and controls
319 lines (242 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<LINK REL="stylesheet" TYPE="text/css" HREF="doc.css">
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.83">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>Oric Telestrat-specific information for cc65</TITLE>
</HEAD>
<BODY>
<H1>Oric Telestrat-specific information for cc65</H1>
<H2>
<A HREF="mailto:jede@oric.org">Jede</A></H2>
<HR>
<EM>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.</EM>
<HR>
<P>
<H2><A NAME="toc1">1.</A> <A HREF="telestrat.html#s1">Overview</A></H2>
<P>
<H2><A NAME="toc2">2.</A> <A HREF="telestrat.html#s2">Binary format</A></H2>
<P>
<H2><A NAME="toc3">3.</A> <A HREF="telestrat.html#s3">Memory layout</A></H2>
<P>
<H2><A NAME="toc4">4.</A> <A HREF="telestrat.html#s4">Platform-specific header files</A></H2>
<UL>
<LI><A NAME="toc4.1">4.1</A> <A HREF="telestrat.html#ss4.1">Telestrat-specific functions</A>
<LI><A NAME="toc4.2">4.2</A> <A HREF="telestrat.html#ss4.2">Hardware access</A>
</UL>
<P>
<H2><A NAME="toc5">5.</A> <A HREF="telestrat.html#s5">Loadable drivers</A></H2>
<UL>
<LI><A NAME="toc5.1">5.1</A> <A HREF="telestrat.html#ss5.1">TGI</A>
<LI><A NAME="toc5.2">5.2</A> <A HREF="telestrat.html#ss5.2">Extended memory drivers</A>
<LI><A NAME="toc5.3">5.3</A> <A HREF="telestrat.html#ss5.3">Joystick drivers</A>
<LI><A NAME="toc5.4">5.4</A> <A HREF="telestrat.html#ss5.4">Mouse drivers</A>
<LI><A NAME="toc5.5">5.5</A> <A HREF="telestrat.html#ss5.5">RS232 device drivers</A>
</UL>
<P>
<H2><A NAME="toc6">6.</A> <A HREF="telestrat.html#s6">Limitations</A></H2>
<UL>
<LI><A NAME="toc6.1">6.1</A> <A HREF="telestrat.html#ss6.1">Disk I/O</A>
<LI><A NAME="toc6.2">6.2</A> <A HREF="telestrat.html#ss6.2">conio</A>
</UL>
<P>
<H2><A NAME="toc7">7.</A> <A HREF="telestrat.html#s7">Other hints</A></H2>
<P>
<H2><A NAME="toc8">8.</A> <A HREF="telestrat.html#s8">License</A></H2>
<HR>
<H2><A NAME="s1">1.</A> <A HREF="#toc1">Overview</A></H2>
<P>This file contains an overview of the Telestrat runtime system as it comes
with the cc65 C compiler. It describes the memory layout, Telestrat-specific
header files, available drivers, and any pitfalls specific to that platform.</P>
<P>Please note that Telestrat-specific functions are just mentioned here, they are
described in detail in the separate
<A HREF="funcref.html">function reference</A>. Even functions marked as "platform dependent" may be available on
more than one platform. Please see the function reference for more
information.</P>
<P>Oric Telestrat is the last Oric computer (Released in 1986, mainly in France).
This computer is an Atmos with extra hardware: RS232, cardridge(banking system),
joysticks (2 ports) or mouse (on joystick port), FDC.</P>
<P>Video chip, CPU, keyboard management, tape hardware are the same than Atmos.</P>
<P>Telestrat can start in Atmos mode with Atmos Cardridge (which is only the atmos
Basic 1.1 ROM).</P>
<P>Telestrat can start in Sedoric (Atmos OS) and Atmos mode with Stratoric Cardridge.
This Cardridge has 3 banks of 16KB of rom with:
<UL>
<LI>a Sedoric ROM.</LI>
<LI>a Basic 1.1 ROM (Atmos).</LI>
<LI>a Basic 1.0 ROM (Oric-1).</LI>
</UL>
</P>
<P>The main Telestrat's configuration is the Telemon/Hyperbasic Cardridge inserted
with Stratsed in floppy drive.</P>
<P>Anyway, there is no way to load a tape file in Telemon/Hyperbasic mode without
alternative program.</P>
<P>There is also no software to write a Stratsed dsk file on PC.</P>
<P>This Telestrat target build an Orix binary file. But, in the future, it will be possible
to build a Stratsed disk. Orix uses the same systems calls than Telemon mode.</P>
<P>That is why if you need to do software for telestrat target, you have the choice to:
<UL>
<LI>use cc65 Atmos target and start Telestrat in Atmos mode: A tape file is required.</LI>
<LI>use cc65 Atmos target and start Telestrat in Stratoric mode: A dsk file or tape file is required.</LI>
<LI>use cc65 Telestrat target and start Telestrat in Orix mode (see
<A HREF="http://orix.oric.org/download/">here</A>).</LI>
<LI>use cc65 Telestrat target, remove Orix header from binary, code a dsk tool for Stratsed,
add Stratsed header on your binary,insert your binary on floppy disk (this solution will be possible is the future).</LI>
</UL>
</P>
<P>Telestrat (from cardridge) can handle 8 banks (from $C000 to $FFFF): Bank 0 is the overlay ram. Others banks can be ROM or RAM.</P>
<H2><A NAME="s2">2.</A> <A HREF="#toc2">Binary format</A></H2>
<P>The standard binary output format generated the linker for the Telestrat
target is a machine language program with a 20 bytes header described
<A HREF="http://orix.oric.org/orix-header/">here</A></P>
<P>This header is used for Telemon 3.0.</P>
<P>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.</P>
<P>Stratsed (the Telestrat operating system) handles files management. Stratsed
is loaded to memory from floppy disk. Stratsed vector are declared in asminc/telestrat.inc.
But, reverse engineering is required to find how these vectors works. Please, note that
Stratsed is located in overlay memory (bank 0)</P>
<P>There is no tool to insert a binary in a Stratsed floppy disk.</P>
<P>The only way to load a binary (for Telemon 2.4) is to:
<UL>
<LI>remove the 20 bytes header</LI>
<LI>download
<A HREF="http://osdk.defence-force.org/index?page=download">osdk</A></LI>
<LI>use Floppybuilder in OSDK to insert the binary with the tool (please read
FloppyBuilder manual to learn how to insert your binary and how to start Microdisc boot sector
when Telestrat starts)</LI>
</UL>
</P>
<P>Please note also, that the binary converted into TAP file, will not produce
a right stratsed file when tap2dsk and old2mfm are used. You will be in the
case that Telestrat/Stratsed crashed when you do "DIR" command.</P>
<P>If you know the Stratsed disk format, please contact the author of this doc.</P>
<H2><A NAME="s3">3.</A> <A HREF="#toc3">Memory layout</A></H2>
<P>In the standard setup, cc65-generated programs use the memory from
$0801 to $9800; so, nearly 37K of memory (including the stack) is
available. ROM calls are possible with BRK feature.</P>
<P>Special locations:</P>
<P>
<DL>
<DT><B>Stack</B><DD>
<P>The C runtime stack is located at $97FF (or $B3FF), and grows
downwards.</P>
<DT><B>Heap</B><DD>
<P>The C heap is located at the end of the program, and grows towards the C
runtime stack.</P>
</DL>
</P>
<H2><A NAME="s4">4.</A> <A HREF="#toc4">Platform-specific header files</A></H2>
<P>Programs containing Telestrat-specific code may use the <CODE>telestrat.h</CODE> header file.</P>
<H2><A NAME="ss4.1">4.1</A> <A HREF="#toc4.1">Telestrat-specific functions</A>
</H2>
<P>The functions listed below are special for the Telestrat. See the
<A HREF="funcref.html">function reference</A> for declaration and usage.</P>
<P>
<UL>
<LI>explode</LI>
<LI>ping</LI>
<LI>shoot</LI>
<LI>zap</LI>
<LI>oups</LI>
</UL>
</P>
<H2><A NAME="ss4.2">4.2</A> <A HREF="#toc4.2">Hardware access</A>
</H2>
<P>The following pseudo variables declared in the <CODE>telestrat.h</CODE> header file do allow
access to hardware located in the address space. Some variables are
structures; accessing the struct fields will access the chip registers.</P>
<P>
<DL>
<DT><B><CODE>VIA</CODE></B><DD>
<P>Access to the VIA (Versatile Interface Adapter) chip is available via the
<CODE>VIA</CODE> variable. The structure behind this variable is explained in <CODE>_6522.h</CODE>.</P>
<DT><B><CODE>VIA2</CODE></B><DD>
<P>Access to the VIA2 (Versatile Interface Adapter) chip is available via the
<CODE>VIA2</CODE> variable. The structure behind this variable is explained in <CODE>_6522.h</CODE>.</P>
<DT><B><CODE>ACIA</CODE></B><DD>
<P>Access to the 6551 ACIA chip is available via the
<CODE>ACIA</CODE> variable. The structure behind this variable is explained in <CODE>_6551.h</CODE>.</P>
</DL>
</P>
<H2><A NAME="s5">5.</A> <A HREF="#toc5">Loadable drivers</A></H2>
<H2><A NAME="ss5.1">5.1</A> <A HREF="#toc5.1">TGI</A>
</H2>
<P>TGI drivers is available on Oric Telestrat with some functions:</P>
<P>
<UL>
<LI>tgi_clear</LI>
<LI>tgi_done</LI>
<LI>tgi_init</LI>
<LI>tgi_install</LI>
<LI>tgi_line</LI>
<LI>tgi_outtext</LI>
<LI>tgi_setpixel</LI>
</UL>
</P>
<H2><A NAME="ss5.2">5.2</A> <A HREF="#toc5.2">Extended memory drivers</A>
</H2>
<P>No extended memory drivers are currently available for the Telestrat.
This feature could be done because telestrat can manage RAM inserted in his
port cardridge.</P>
<H2><A NAME="ss5.3">5.3</A> <A HREF="#toc5.3">Joystick drivers</A>
</H2>
<P>Telemon 2.4 returns in keyboard buffer the direction of the joysticks. This means that
if you get input from keyboard by conio cgetc function, you will get direction from joysticks.</P>
<P>Anyway, if you don't want to use ROM, you can use joysticks standard drivers in your code.</P>
<P>The standard driver manages two joysticks. Only one button is managed for these joysticks.</P>
<P>Telestrat can handle one button for the left port, and three buttons for the right port (but this port was designed for a mouse).</P>
<P>If you find a Telestrat mouse (which is almost impossible :), these driver will work too because there is some extra hardware in the mouse to send direction.</P>
<H2><A NAME="ss5.4">5.4</A> <A HREF="#toc5.4">Mouse drivers</A>
</H2>
<P>Telestrat manages also mouse (Joystick port)
Telestrat mouse is really difficult to find.</P>
<H2><A NAME="ss5.5">5.5</A> <A HREF="#toc5.5">RS232 device drivers</A>
</H2>
<P>Telestrat has a RS232 port, but it's not usable in cc65. It is possible to use
RS232 port with Telemon calls (see XSOUT primitive for example)</P>
<H2><A NAME="limitations"></A> <A NAME="s6">6.</A> <A HREF="#toc6">Limitations</A></H2>
<H2><A NAME="ss6.1">6.1</A> <A HREF="#toc6.1">Disk I/O</A>
</H2>
<P>Telemon 3.0 handles fopen, fread, fclose primitives. It means that this
function will crash the Telestrat because Telemon 2.4 does not have these
primitives. By the way, Telemon 3.0 uses an extension "ch376 card" which
handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS,
Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread, fclose).</P>
<P>
<UL>
<LI>fclose</LI>
<LI>fopen</LI>
<LI>fread</LI>
</UL>
</P>
<H2><A NAME="ss6.2">6.2</A> <A HREF="#toc6.2">conio</A>
</H2>
<P>Functions textcolor and bgcolor are available only with Telemon 3.0 (Orix).
Telemon 2.4 primitives can't handle any change of colors in text mode except with XINK or
XPAPER primitives which put on the first and second columns ink and paper attributes.
The only way to change color on the same line for text is to handle it in pure assembly
without systems calls.</P>
<H2><A NAME="s7">7.</A> <A HREF="#toc7">Other hints</A></H2>
<H2><A NAME="s8">8.</A> <A HREF="#toc8">License</A></H2>
<P>This software is provided 'as-is', without any expressed or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.</P>
<P>Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:</P>
<P>
<OL>
<LI> The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.</LI>
<LI> Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.</LI>
<LI> This notice may not be removed or altered from any source
distribution.</LI>
</OL>
</P>
</BODY>
</HTML>