mirror of
https://github.com/cc65/cc65.git
synced 2025-02-10 09:31:08 +00:00
Adjusted documentation to static drivers as part of the C library.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5894 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
1317caa08e
commit
8780efd53f
@ -38,10 +38,9 @@ Here is a small traditional Hello World program for the Atari Lynx.
|
|||||||
#include <lynx.h>
|
#include <lynx.h>
|
||||||
#include <tgi.h>
|
#include <tgi.h>
|
||||||
#include <6502.h>
|
#include <6502.h>
|
||||||
extern char lynxtgi[];
|
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
tgi_install(&lynxtgi);
|
tgi_install(tgi_static_stddrv);
|
||||||
tgi_init();
|
tgi_init();
|
||||||
CLI();
|
CLI();
|
||||||
while (tgi_busy())
|
while (tgi_busy())
|
||||||
@ -70,36 +69,10 @@ in your own program you need to load it at run time.
|
|||||||
|
|
||||||
Unfortunately the Lynx does not have a disk drive from where to load it.
|
Unfortunately the Lynx does not have a disk drive from where to load it.
|
||||||
Therefore you must already load it at compile time. The easiest way is to
|
Therefore you must already load it at compile time. The easiest way is to
|
||||||
link it in statically.
|
automatically link it in statically from the Lynx C library.
|
||||||
|
|
||||||
This relocatable driver is found in <tt>$(CC65_HOME)/tgi/lynx-160-102-16.tgi</tt>.
|
|
||||||
Copy it from here.
|
|
||||||
|
|
||||||
The name comes from 160 by 102 pixels (The Lynx LCD size), 16 colors.
|
|
||||||
|
|
||||||
In order to link in this statically we have to make it back to a source
|
|
||||||
file so that we can compile it. The next command will turn the compiled
|
|
||||||
driver object file into an assembler source and compile it with the ca65
|
|
||||||
assembler.
|
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
co65 --code-label _lynxtgi lynx-160-102-16.tgi
|
cl65 -t lynx -o game.lnx main.c
|
||||||
ca65 -t lynx lynx-160-102-16.s
|
|
||||||
</verb></tscreen>
|
|
||||||
|
|
||||||
This will create a linkable object file called lynx-160-102-16.o
|
|
||||||
|
|
||||||
Then we need to compile our main file to a linkable object file.
|
|
||||||
|
|
||||||
<tscreen><verb>
|
|
||||||
cc65 -t lynx main.c
|
|
||||||
ca65 -t lynx main.s
|
|
||||||
</verb></tscreen>
|
|
||||||
|
|
||||||
Finally we have to link them together to produce an executable cart.
|
|
||||||
|
|
||||||
<tscreen><verb>
|
|
||||||
cl65 -t lynx -o game.lnx main.o lynx-160-102-16.o lynx.lib
|
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
This will create a bootable cart image called game.lnx
|
This will create a bootable cart image called game.lnx
|
||||||
@ -218,8 +191,6 @@ structures, accessing the struct fields will access the chip registers.
|
|||||||
|
|
||||||
A TGI driver for the standard graphics mode (160×102 in 16 colors) is
|
A TGI driver for the standard graphics mode (160×102 in 16 colors) is
|
||||||
available, but must be statically linked, because no file I/O is available.
|
available, but must be statically linked, because no file I/O is available.
|
||||||
See the documentation for the <htmlurl url="co65.html" name="co65 utility">
|
|
||||||
for information on how to do that.
|
|
||||||
|
|
||||||
The TGI driver is implemented as an interrupt driven dual buffering device.
|
The TGI driver is implemented as an interrupt driven dual buffering device.
|
||||||
To use it as a single-buffer device set draw page and view page to the same
|
To use it as a single-buffer device set draw page and view page to the same
|
||||||
@ -263,9 +234,7 @@ No extended memory drivers are currently available for the Lynx.
|
|||||||
<sect1>Joystick drivers<p>
|
<sect1>Joystick drivers<p>
|
||||||
|
|
||||||
A joystick driver for the standard buttons is available, but must be
|
A joystick driver for the standard buttons is available, but must be
|
||||||
statically linked, because no file I/O is available. See the documentation for
|
statically linked, because no file I/O is available.
|
||||||
the <htmlurl url="co65.html" name="co65 utility"> for information on how to do
|
|
||||||
that.
|
|
||||||
|
|
||||||
<sect1>Mouse drivers<p>
|
<sect1>Mouse drivers<p>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user