]> git.sur5r.net Git - cc65/blob - doc/creativision.sgml
Merge branch 'master' into kbrepeat
[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>2016-04-14
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 kbyte machine language program. It is of course possible to change
35 this behaviour by using one of the different linker configs.
36
37 <sect>Memory layout<p>
38
39 cc65 generated programs with the default setup run with the I/O area enabled,
40 which gives a usable memory range of &dollar;B000 - &dollar;BEFF.
41 More ROM may need additional bankswitching code.
42
43 Special locations:
44
45 <descrip>
46   <tag/Text screen/
47   The text screen is located at VRAM &dollar;1000.
48
49   <tag/Stack/
50   The C runtime stack is located at &dollar;3FF and growing downwards.
51
52   <tag/Heap/
53   The C heap is located at the end of the program and grows towards the C
54   runtime stack.
55
56 </descrip><p>
57
58
59
60 <sect>Platform specific header files<p>
61
62 Programs containing Creativision specific code may use the <tt/creativision.h/ header file.
63
64
65 <sect1>Creativision specific functions<p>
66
67 <itemize>
68 <item>bios_playsound
69 <item>psg_delay
70 <item>psg_outb
71 <item>psg_silence
72 </itemize>
73
74
75
76 <!--<sect1>Hardware access<p>
77
78 The following pseudo variables declared in the <tt/creativision.inc/ include file do
79 allow access to hardware located in the address space.
80
81 <descrip>
82
83   <tag><tt/VDP/</tag>
84   The <tt/VDP/ defines allow access to the video chip.
85
86 </descrip><p>
87
88 <descrip>
89
90   <tag><tt/PIA/</tag>
91   The <tt/PIA/ defines allow access to the I/O chip.
92
93 </descrip><p>-->
94
95
96
97 <sect>Loadable drivers<p>
98
99 <sect1>Graphics drivers<p>
100
101 No graphics drivers are currently available for the Creativision.
102
103
104 <sect1>Extended memory drivers<p>
105
106 No extended memory drivers are currently available for the Creativision.
107
108
109 <sect1>Joystick drivers<p>
110
111 <descrip>
112
113   <tag><tt/creativision-stdjoy.joy (creativisionstd_joy)/</tag>
114   A joystick driver for the standard joystick is available.
115
116 </descrip><p>
117
118 <sect1>Mouse drivers<p>
119
120 No mouse drivers are currently available for the Creativision.
121
122
123 <sect1>RS232 device drivers<p>
124
125 No communication port drivers are currently available for the Creativision.
126
127
128
129 <sect>Limitations<p>
130
131 <sect1>Disk I/O<p>
132
133 The existing library for the Creativision doesn't implement C file
134 I/O. There are even no hacks for the <tt/read()/ and <tt/write()/ routines.
135
136 To be more concrete, this limitation means that you cannot use any of the
137 following functions (and a few others):
138
139 <itemize>
140 <item>fclose
141 <item>fopen
142 <item>fread
143 <item>fprintf
144 <item>fputc
145 <item>fscanf
146 <item>fwrite
147 <item>...
148 </itemize>
149
150
151
152 <sect>Other hints<p>
153
154
155
156 <sect>License<p>
157
158 This software is provided 'as-is', without any expressed or implied
159 warranty. In no event will the authors be held liable for any damages
160 arising from the use of this software.
161
162 Permission is granted to anyone to use this software for any purpose,
163 including commercial applications, and to alter it and redistribute it
164 freely, subject to the following restrictions:
165
166 <enum>
167 <item>  The origin of this software must not be misrepresented; you must not
168         claim that you wrote the original software. If you use this software
169         in a product, an acknowledgment in the product documentation would be
170         appreciated but is not required.
171 <item>  Altered source versions must be plainly marked as such, and must not
172         be misrepresented as being the original software.
173 <item>  This notice may not be removed or altered from any source
174         distribution.
175 </enum>
176
177 </article>