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