]> git.sur5r.net Git - cc65/blob - doc/creativision.sgml
Followed the discussions in the Pull request #682.
[cc65] / doc / creativision.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4
5 <title>VTech Creativision (aka Funvision) specific information for cc65
6 <author><url url="mailto:polluks+cc65@sdf.lonestar.org" name="Stefan A. Haubenthal">
7 <date>2017-11-15
8
9 <abstract>
10 An overview over the Creativision runtime system as it is implemented for the
11 cc65 C compiler.
12 </abstract>
13
14 <!-- Table of contents -->
15 <toc>
16
17 <!-- Begin the document -->
18
19 <sect>Overview<p>
20
21 This file contains an overview of the Creativision runtime system as it comes
22 with the cc65 C compiler. It describes the memory layout, Creativision specific header
23 files, available drivers, and any pitfalls specific to that platform.
24
25 Please note that Creativision specific functions are just mentioned here, they are
26 described in detail in the separate <url url="funcref.html" name="function
27 reference">. Even functions marked as "platform dependent" may be available on
28 more than one platform. Please see the function reference for more information.
29
30
31 <sect>Binary format<p>
32
33 The standard binary output format generated by the linker for the Creativision target
34 is a 4 KB ROM image. To create an 8 KB ROM a custom linker script has
35 to be used.
36
37 <sect>Memory layout<p>
38
39 cc65 generated programs with the default setup are 4 KB in size,
40 occupying &dollar;B000 - &dollar;BFFF. Usable memory space for the
41 user program is &dollar;B000 - &dollar;BEFF. &dollar;BF00 -
42 &dollar;BFFF is reserved for the runtime and cartridge configuration
43 area.
44
45 Special locations:
46
47 <descrip>
48   <tag/Text screen/
49   The text screen is located at VRAM &dollar;1000.
50
51   <tag/Stack/
52   The C runtime stack is located at &dollar;03FF and growing downwards.
53
54   <tag/RAM/
55   The available RAM for cc65 programs of an unexpanded Creativision
56   starts at &dollar;01FA and ends at &dollar;03FF.
57
58   <tag/Heap/
59   The C heap is located at the end of the program's data area and
60   grows towards the C runtime stack.
61
62 </descrip><p>
63
64
65
66 <sect>Platform specific header files<p>
67
68 Programs containing Creativision specific code may use the <tt/creativision.h/ header file.
69
70
71 <sect1>Creativision specific functions<p>
72
73 <itemize>
74 <item>bios_playsound
75 <item>psg_delay
76 <item>psg_outb
77 <item>psg_silence
78 </itemize>
79
80
81
82 <!--<sect1>Hardware access<p>
83
84 The following pseudo variables declared in the <tt/creativision.inc/ include file do
85 allow access to hardware located in the address space.
86
87 <descrip>
88
89   <tag><tt/VDP/</tag>
90   The <tt/VDP/ defines allow access to the video chip.
91
92 </descrip><p>
93
94 <descrip>
95
96   <tag><tt/PIA/</tag>
97   The <tt/PIA/ defines allow access to the I/O chip.
98
99 </descrip><p>-->
100
101
102
103 <sect>Loadable drivers<p>
104
105 <sect1>Graphics drivers<p>
106
107 No graphics drivers are currently available for the Creativision.
108
109
110 <sect1>Extended memory drivers<p>
111
112 No extended memory drivers are currently available for the Creativision.
113
114
115 <sect1>Joystick drivers<p>
116
117 <descrip>
118
119   <tag><tt/creativision-stdjoy.joy (creativisionstd_joy)/</tag>
120   A joystick driver for the standard joystick is available.
121
122 </descrip><p>
123
124 <sect1>Mouse drivers<p>
125
126 No mouse drivers are currently available for the Creativision.
127
128
129 <sect1>RS232 device drivers<p>
130
131 No communication port drivers are currently available for the Creativision.
132
133
134
135 <sect>Limitations<p>
136
137 <sect1>Disk I/O<p>
138
139 The existing library for the Creativision doesn't implement C file
140 I/O. There are even no hacks for the <tt/read()/ and <tt/write()/ routines.
141
142 To be more concrete, this limitation means that you cannot use any of the
143 following functions (and a few others):
144
145 <itemize>
146 <item>fclose
147 <item>fopen
148 <item>fread
149 <item>fprintf
150 <item>fputc
151 <item>fscanf
152 <item>fwrite
153 <item>...
154 </itemize>
155
156
157
158 <sect>Other hints<p>
159
160
161
162 <sect>License<p>
163
164 This software is provided 'as-is', without any expressed or implied
165 warranty. In no event will the authors be held liable for any damages
166 arising from the use of this software.
167
168 Permission is granted to anyone to use this software for any purpose,
169 including commercial applications, and to alter it and redistribute it
170 freely, subject to the following restrictions:
171
172 <enum>
173 <item>  The origin of this software must not be misrepresented; you must not
174         claim that you wrote the original software. If you use this software
175         in a product, an acknowledgment in the product documentation would be
176         appreciated but is not required.
177 <item>  Altered source versions must be plainly marked as such, and must not
178         be misrepresented as being the original software.
179 <item>  This notice may not be removed or altered from any source
180         distribution.
181 </enum>
182
183 </article>