]> git.sur5r.net Git - cc65/blob - doc/gamate.sgml
Merge pull request #269 from jbrandwood/squarebracket
[cc65] / doc / gamate.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4
5 <title>Gamate System specific information for cc65
6 <author>
7 <url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">
8 <date>2015-11-29
9
10 <abstract>
11 An overview over the Gamate runtime system as it is implemented for the
12 cc65 C compiler.
13 </abstract>
14
15 <!-- Table of contents -->
16 <toc>
17
18 <!-- Begin the document -->
19
20 <sect>Overview<p>
21
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.
25
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
30 information.
31
32
33 <sect>Binary format<p>
34
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.
38
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
41
42 <sect>Platform specific header files<p>
43
44 Programs containing Gamate specific code may use the <tt/gamate.h/ header file.
45
46
47 <sect1>Hardware access<p>
48
49 The following pseudo variables declared in the <tt/gamate.inc/ include file do
50 allow access to hardware located in the address space.
51
52 <descrip>
53
54 </descrip><p>
55
56
57
58 <sect>Loadable drivers<p>
59
60 All drivers must be statically linked because no file I/O is available.
61 The names in the parentheses denote the symbols to be used for static linking of the drivers.
62
63
64 <sect1>Graphics drivers<p>
65
66 No TGI graphics drivers are currently available for the Gamate.
67
68
69 <sect1>Extended memory drivers<p>
70
71 No extended memory drivers are currently available for the Gamate.
72
73
74 <sect1>Joystick drivers<p>
75
76 <descrip>
77
78   <tag><tt/gamate-stdjoy.joy (gamate_stdjoy)/</tag>
79   A joystick driver for the standard two buttons joypad is available.
80
81 </descrip><p>
82
83
84 <sect1>Mouse drivers<p>
85
86 No mouse drivers are currently available for the Gamate.
87
88
89 <sect1>RS232 device drivers<p>
90
91 No serial drivers are currently available for the Gamate.
92
93
94
95 <sect>Limitations<p>
96
97 <itemize>
98 <item>When using the C-compiler, keep in mind that only 0x200 bytes RAM in total
99 can be used for variables and the runtime stack.
100 </itemize>
101
102 <sect1>Disk I/O<p>
103
104 The existing library for the Gamate doesn't implement C file
105 I/O. There are no hacks for the <tt/read()/ and <tt/write()/ routines.
106
107 To be more concrete, this limitation means that you cannot use any of the
108 following functions (and a few others):
109
110 <itemize>
111 <item>printf
112 <item>fclose
113 <item>fopen
114 <item>fread
115 <item>fprintf
116 <item>fputc
117 <item>fscanf
118 <item>fwrite
119 <item>...
120 </itemize>
121
122 <sect>Other hints<p>
123
124 <itemize>
125 <item>The Gamate is emulated by MESS (<url url="http://www.mess.org/">),
126 run like this: <tt>mess gamate -debug -window -skip_gameinfo -cart test.bin</tt>
127 </itemize>
128
129 some resources on the Gamate:
130
131 <itemize>
132 <item><url url="http://en.wikipedia.org/wiki/Gamate">
133 </itemize>
134
135 <sect>License<p>
136
137 This software is provided 'as-is', without any expressed or implied
138 warranty.  In no event will the authors be held liable for any damages
139 arising from the use of this software.
140
141 Permission is granted to anyone to use this software for any purpose,
142 including commercial applications, and to alter it and redistribute it
143 freely, subject to the following restrictions:
144
145 <enum>
146 <item>  The origin of this software must not be misrepresented; you must not
147         claim that you wrote the original software. If you use this software
148         in a product, an acknowledgment in the product documentation would be
149         appreciated but is not required.
150 <item>  Altered source versions must be plainly marked as such, and must not
151         be misrepresented as being the original software.
152 <item>  This notice may not be removed or altered from any source
153         distribution.
154 </enum>
155
156 </article>
157
158
159