]> git.sur5r.net Git - cc65/blob - doc/telestrat.sgml
Correcting some code from github comments
[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">,<newline>
8
9 <date>2017-01-22
10
11 <abstract>
12 An overview over the Telestrat (telemon 3.0 : http://orix.oric.org) runtime system as it is implemented for the cc65 C
13 compiler.)
14 </abstract>
15
16 <!-- Table of contents -->
17 <toc>
18
19 <!-- Begin the document -->
20
21 <sect>Overview<p>
22
23 This file contains an overview of the Telestrat runtime system as it comes with the
24 cc65 C compiler. It describes the memory layout, Telestrat-specific header files,
25 available drivers, and any pitfalls specific to that platform.
26
27 Please note that Telestrat-specific functions are just mentioned here, they are
28 described in detail in the separate <url url="funcref.html" name="function
29 reference">. Even functions marked as "platform dependent" may be available on
30 more than one platform. Please see the function reference for more
31 information.
32
33 <sect>Binary format<p>
34
35 The standard binary output format generated the linker for the Telestrat target
36 is a machine language program with a 20 bytes header described here : 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 easiy. 
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 osdk : 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
54
55
56 <sect>Memory layout<p>
57
58 In the standard setup, cc65-generated programs use the memory from
59 &dollar;0801 to &dollar;9800; so, nearly 37K of memory (including the stack) is
60 available. ROM calls are possible without further precautions.
61
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
114 <sect>Loadable drivers<p>
115
116 <sect1>Extended memory drivers<p>
117
118 No extended memory drivers are currently available for the Telestrat.
119
120
121 <sect1>Joystick drivers<p>
122
123 <descrip>
124
125 telemon 2.4 & 3.0 manages joysticks but it had been handled yet.
126
127 </descrip><p>
128
129
130 <sect1>Mouse drivers<p>
131
132 Telestrat manages also mouse, but it had been no handled yet in this version.
133
134 <sect1>RS232 device drivers<p>
135
136 <descrip>
137
138 not done
139
140 </descrip><p>
141
142 <sect>Limitations<label id="limitations"><p>
143
144 <sect1>Disk I/O<p>
145
146 This version handles fopen, fread, fclose primitives. Because Telemon 3.0 handles these three primitives. By the way, 
147 it 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.
148
149 <itemize>
150 <item>fclose
151 <item>fopen
152 <item>fread
153
154 </itemize>
155
156
157
158 <sect>Other hints<p>
159
160
161 <sect>License<p>
162
163 This software is provided 'as-is', without any expressed or implied
164 warranty.  In no event will the authors be held liable for any damages
165 arising from the use of this software.
166
167 Permission is granted to anyone to use this software for any purpose,
168 including commercial applications, and to alter it and redistribute it
169 freely, subject to the following restrictions:
170
171 <enum>
172 <item>  The origin of this software must not be misrepresented; you must not
173         claim that you wrote the original software. If you use this software
174         in a product, an acknowledgment in the product documentation would be
175         appreciated but is not required.
176 <item>  Altered source versions must be plainly marked as such, and must not
177         be misrepresented as being the original software.
178 <item>  This notice may not be removed or altered from any source
179         distribution.
180 </enum>
181
182 </article>