mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
178 lines
4.4 KiB
Plaintext
178 lines
4.4 KiB
Plaintext
<!doctype linuxdoc system>
|
|
|
|
<article>
|
|
|
|
<title>Oric Telestrat-specific information for cc65
|
|
<author>
|
|
<url url="mailto:jede@oric.org" name="Jede">,<newline>
|
|
|
|
<date>2017-01-22
|
|
|
|
<abstract>
|
|
An overview over the Telestrat (telemon 3.0 : http://orix.oric.org) runtime system as it is implemented for the cc65 C
|
|
compiler.
|
|
</abstract>
|
|
|
|
<!-- Table of contents -->
|
|
<toc>
|
|
|
|
<!-- Begin the document -->
|
|
|
|
<sect>Overview<p>
|
|
|
|
This file contains an overview of the Telestrat runtime system as it comes with the
|
|
cc65 C compiler. It describes the memory layout, Telemon3.0-specific header files,
|
|
available drivers, and any pitfalls specific to that platform.
|
|
|
|
Please note that Telemon3.0-specific functions are just mentioned here, they are
|
|
described in detail in the separate <url url="funcref.html" name="function
|
|
reference">. Even functions marked as "platform dependent" may be available on
|
|
more than one platform. Please see the function reference for more
|
|
information.
|
|
|
|
|
|
|
|
<sect>Binary format<p>
|
|
|
|
The standard binary output format generated by the linker for the Telemon 3.0 target
|
|
is a machine language program with a 20 bytes header described here : http://orix.oric.org/doku.php?id=orix:header
|
|
|
|
|
|
|
|
<sect>Memory layout<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 without further precautions.
|
|
|
|
|
|
|
|
Special locations:
|
|
|
|
<descrip>
|
|
<tag/Stack/
|
|
The C runtime stack is located at $97FF (or $B3FF), and grows
|
|
downwards.
|
|
|
|
<tag/Heap/
|
|
The C heap is located at the end of the program, and grows towards the C
|
|
runtime stack.
|
|
|
|
</descrip><p>
|
|
|
|
|
|
|
|
<sect>Platform-specific header files<p>
|
|
|
|
Programs containing Telemon 3.0 -specific code may use the <tt/telemon.h/ header file.
|
|
|
|
|
|
<sect1>Telemon 3.0-specific functions<p>
|
|
|
|
The functions listed below are special for the Telemon 3.0. See the <url
|
|
url="funcref.html" name="function reference"> for declaration and usage.
|
|
|
|
<itemize>
|
|
<item>explode
|
|
<item>ping
|
|
<item>shoot
|
|
<item>zap
|
|
<item>oupsx
|
|
</itemize>
|
|
|
|
|
|
<sect1>Hardware access<p>
|
|
|
|
The following pseudo variables declared in the <tt/atmos.h/ 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.
|
|
|
|
<descrip>
|
|
|
|
<tag><tt/VIA/</tag>
|
|
Access to the VIA (Versatile Interface Adapter) chip is available via the
|
|
<tt/VIA/ variable. The structure behind this variable is explained in <tt/_6522.h/.
|
|
|
|
</descrip><p>
|
|
|
|
|
|
|
|
<sect>Loadable drivers<p>
|
|
|
|
<em>Note:</em> Since the Atmos doesn't have working disk I/O
|
|
(see <ref id="limitations" name="section "Limitations"">), the
|
|
available drivers cannot be loaded at runtime (so the term "loadable drivers"
|
|
is somewhat misleading). Instead, the drivers have to be statically linked. While
|
|
this may seem overhead, it has two advantages:
|
|
|
|
|
|
<sect1>Extended memory drivers<p>
|
|
|
|
No extended memory drivers are currently available for the Atmos.
|
|
|
|
|
|
<sect1>Joystick drivers<p>
|
|
|
|
<descrip>
|
|
|
|
telemon 3.0 manages joysticks but it had been handled yet.
|
|
|
|
</descrip><p>
|
|
|
|
|
|
<sect1>Mouse drivers<p>
|
|
|
|
Telemon 3.0 manages also mouse, but it had been no handled yet in this version.
|
|
|
|
<sect1>RS232 device drivers<p>
|
|
|
|
<descrip>
|
|
|
|
not done
|
|
|
|
</descrip><p>
|
|
|
|
|
|
|
|
<sect>Limitations<label id="limitations"><p>
|
|
|
|
<sect1>Disk I/O<p>
|
|
|
|
This version handles fopen, fread, fclose primitives. Because Telemon 3.0 handles these two primitives. By the way,
|
|
it uses an extension "ch376 card" which handles sdcard and FAT 32 usb key.
|
|
|
|
<itemize>
|
|
<item>fclose
|
|
<item>fopen
|
|
<item>fread
|
|
|
|
</itemize>
|
|
|
|
|
|
|
|
<sect>Other hints<p>
|
|
|
|
|
|
<sect>License<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.
|
|
|
|
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:
|
|
|
|
<enum>
|
|
<item> 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.
|
|
<item> Altered source versions must be plainly marked as such, and must not
|
|
be misrepresented as being the original software.
|
|
<item> This notice may not be removed or altered from any source
|
|
distribution.
|
|
</enum>
|
|
|
|
</article>
|