]> git.sur5r.net Git - cc65/blob - doc/telestrat.sgml
SetNewMode() documentation = issue #814
[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 telemon 2.4 & 3.0 manages joysticks but it had been handled yet.
137
138 <sect1>Mouse drivers<p>
139
140 Telestrat manages also mouse, but it had been no handled yet in this version.
141
142 <sect1>RS232 device drivers<p>
143
144 Telestrat has a RS232 port, but it's not usable in cc65.
145
146 <sect>Limitations<label id="limitations"><p>
147
148 <sect1>Disk I/O<p>
149
150 Telemon 3.0 handles fopen, fread, fclose primitives. It means that this
151 function will crash the Telestrat because Telemon 2.4 does not have these
152 primitives. By the way, Telemon 3.0 uses an extension "ch376 card" which
153 handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS,
154 Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread,
155 fclose).
156
157 <itemize>
158 <item>fclose
159 <item>fopen
160 <item>fread
161 </itemize>
162
163
164
165 <sect>Other hints<p>
166
167
168 <sect>License<p>
169
170 This software is provided 'as-is', without any expressed or implied
171 warranty.  In no event will the authors be held liable for any damages
172 arising from the use of this software.
173
174 Permission is granted to anyone to use this software for any purpose,
175 including commercial applications, and to alter it and redistribute it
176 freely, subject to the following restrictions:
177
178 <enum>
179 <item>  The origin of this software must not be misrepresented; you must not
180         claim that you wrote the original software. If you use this software
181         in a product, an acknowledgment in the product documentation would be
182         appreciated but is not required.
183 <item>  Altered source versions must be plainly marked as such, and must not
184         be misrepresented as being the original software.
185 <item>  This notice may not be removed or altered from any source
186         distribution.
187 </enum>
188
189 </article>