1 <!doctype linuxdoc system>
5 <title>Gamate System specific information for cc65
7 <url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">
11 An overview over the Gamate runtime system as it is implemented for the
15 <!-- Table of contents -->
18 <!-- Begin the document -->
22 This file contains an overview of the Gamate runtime system as it comes
23 with the cc65 C compiler. It describes the memory layout, Gamate specific header
24 files, available drivers, and any pitfalls specific to that platform.
26 Please note that Gamate specific functions are just mentioned here, they are
27 described in detail in the separate <url url="funcref.html" name="function
28 reference">. Even functions marked as "platform dependent" may be available on
29 more than one platform. Please see the function reference for more
33 <sect>Binary format<p>
35 The standard binary output format generated by the linker for the Gamate target
36 is a cartridge image with header. It is of course possible to change this
37 behaviour by using a modified startup file and linker config.
39 Note: the first two bytes of the header contain a checksum that must be inserted
40 by an external program. Such an utility is provided in util/gamate/gamate-fixcart.c
42 <sect>Platform specific header files<p>
44 Programs containing Gamate specific code may use the <tt/gamate.h/ header file.
47 <sect1>Gamate specific functions<p>
50 <item>waitvsync</item>
54 <sect1>Hardware access<p>
56 The following pseudo variables declared in the <tt/gamate.inc/ include file do
57 allow access to hardware located in the address space.
65 <sect>Loadable drivers<p>
67 All drivers must be statically linked because no file I/O is available.
68 The names in the parentheses denote the symbols to be used for static linking of the drivers.
71 <sect1>Graphics drivers<p>
73 No TGI graphics drivers are currently available for the Gamate.
76 <sect1>Extended memory drivers<p>
78 No extended memory drivers are currently available for the Gamate.
81 <sect1>Joystick drivers<p>
85 <tag><tt/gamate-stdjoy.joy (gamate_stdjoy)/</tag>
86 A joystick driver for the standard two buttons joypad is available.
91 <sect1>Mouse drivers<p>
93 No mouse drivers are currently available for the Gamate.
96 <sect1>RS232 device drivers<p>
98 No serial drivers are currently available for the Gamate.
105 <item>When using the C-compiler, keep in mind that only 0x200 bytes RAM in total
106 can be used for variables and the runtime stack.
111 The existing library for the Gamate doesn't implement C file
112 I/O. There are no hacks for the <tt/read()/ and <tt/write()/ routines.
114 To be more concrete, this limitation means that you cannot use any of the
115 following functions (and a few others):
132 <item>The Gamate is emulated by MESS (<url url="http://www.mess.org/">),
133 run like this: <tt>mess gamate -debug -window -skip_gameinfo -cart test.bin</tt>
136 some resources on the Gamate:
139 <item><url url="http://en.wikipedia.org/wiki/Gamate">
144 This software is provided 'as-is', without any expressed or implied
145 warranty. In no event will the authors be held liable for any damages
146 arising from the use of this software.
148 Permission is granted to anyone to use this software for any purpose,
149 including commercial applications, and to alter it and redistribute it
150 freely, subject to the following restrictions:
153 <item> The origin of this software must not be misrepresented; you must not
154 claim that you wrote the original software. If you use this software
155 in a product, an acknowledgment in the product documentation would be
156 appreciated but is not required.
157 <item> Altered source versions must be plainly marked as such, and must not
158 be misrepresented as being the original software.
159 <item> This notice may not be removed or altered from any source