From: uz Date: Fri, 2 Oct 2009 14:29:17 +0000 (+0000) Subject: Added docs for all the tgi functions and improved Lynx documentation X-Git-Tag: V2.13.0rc4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c0960819e263b55beebe5d9342831d6f0553760;p=cc65 Added docs for all the tgi functions and improved Lynx documentation (contributed by Karri Kaksonen). git-svn-id: svn://svn.cc65.org/cc65/trunk@4301 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/doc/funcref.sgml b/doc/funcref.sgml index e37f49ccb..2a84f7185 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -504,8 +504,45 @@ It does not declare any functions.

-(incomplete) - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

@@ -4834,6 +4871,786 @@ be used in presence of a prototype. +tgi_bar

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setcolor(COLOR_GREEN); +tgi_bar(10, 10, 100, 60); + + + + +tgi_circle

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setcolor(COLOR_BLACK); +tgi_circle(50, 40, 40); + + + + +tgi_clear

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_done

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getcolor

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +color = tgi_getcolor(); + + + + +tgi_getcolorcount

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +if (tgi_getcolorcount() == 2) { + printf("Only monochrome graphics is supported\n"); +} + + + + +tgi_getdefpalette

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_geterror

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_geterrormsg

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getmaxcolor

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getmaxx

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getmaxy

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getpagecount

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + +tgi_getpalette

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getpixel

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getxres

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getyres

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_gotoxy

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_init

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +extern char lynxtgi[]; //Include the driver statically instead of loading it. +tgi_install(&lynxtgi); +tgi_init(); //Set up the default palette and clear the screen. + + + + +tgi_install

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + +extern char lynxtgi[]; //Include the driver statically instead of loading it. + +tgi_install(&lynxtgi); +tgi_init(); //Set up the default palette and clear the screen. + + + + +tgi_ioctl

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +These functions are not easily portable to other cc65 platforms. + + +#define tgi_sprite(spr) tgi_ioctl(0, (unsigned)(spr)) +#define tgi_flip() tgi_ioctl(1, 0) +#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (unsigned)(bgcol)) +#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate)) +#define tgi_busy() tgi_ioctl(4, 0) +#define tgi_updatedisplay() tgi_ioctl(4, 1) +if (!tgi_busy()) { + tgi_sprite(&background); + tgi_setcolor(COLOR_BLUE); + tgi_outttextxy(20,40,"Hello World"); + tgi_updatedisplay(); +} + + + + +tgi_line

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_lineto

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_load

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_load_driver

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_outtext

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_outtextxy

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_setcolor

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setcolor(COLOR_BLACK); +tgi_bar(0,0,30,30); +tgi_setcolor(COLOR_WHITE); +tgi_bar(10,10,20,20); + + + + +tgi_setdrawpage

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setdrawpage(1); +tgi_outtextxy(10, 10, "Hello World"); +tgi_setviewpage(1); // Show page 1 +tgi_setdrawpage(0); +tgi_outtextxy(10, 10, "Creating next frame"); +... +tgi_setviewpage(0); // Show page 0 + + + + +tgi_setpalette

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_setpixel

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_setviewpage

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setdrawpage(1); +tgi_outtextxy(10, 10, "Hello World"); +tgi_setviewpage(1); // Show page 1 +tgi_setdrawpage(0); +tgi_outtextxy(10, 10, "Creating next frame"); +... +tgi_setviewpage(0); // Show page 0 + + + + +tgi_textheight

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_textstyle

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_textwidth

+ + + +/ +/ +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_uninstall

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_unload

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + time

diff --git a/doc/lynx.sgml b/doc/lynx.sgml index 903e9819f..fa2a9dc51 100644 --- a/doc/lynx.sgml +++ b/doc/lynx.sgml @@ -46,8 +46,7 @@ that shows how to create a complete bootable Lynx cart. Memory layout

cc65 generated programs with the default setup run with the I/O area and the -kernal enabled, which gives a usable memory range of $400 - $BE3F. -All boot ROM entry points may be called directly without additional code. +kernal enabled, which gives a usable memory range of $400 - $C038. Special locations: @@ -63,7 +62,7 @@ Special locations: '?' for all keys down at the same time. Lynx specific functions

-lynx_change_framerate lynx_eeprom_erase lynx_eeprom_read lynx_eeprom_write @@ -120,8 +118,9 @@ available, but must be statically linked, because no file I/O is available. See the documentation for the for information on how to do that. -The TGI driver is implemented as a dual buffering device. To use it as a -single-buffer device set draw page and view page to the same value 0 or 1; +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 +value 0 or 1; The TGI driver has a few Lynx-specific extensions. @@ -203,8 +202,13 @@ No mouse drivers are currently available for the Lynx. The parity bit supports MARK and SPACE. It also supports EVEN and ODD parity but the parity bit is included in the calculation. Most of us don't want it - this way. But there is nothing we can do about it. Just don't use EVEN or ODD - when communicating to other equipment than the Lynx. + this way. But there is nothing we can do about it. + + The Lynx hardware will always check parity on incoming traffic. Currently + the driver cannot receive data from standard PC's due to this parity bug. + For working with Lynx to Lynx communication use EVEN parity. + + To send data to standard PC's use MARK or SPACE as parity setting. There is always only one stop bit. And the data length is always 8 bits. @@ -215,6 +219,7 @@ No mouse drivers are currently available for the Lynx. area $200-$2ff for the transmit ring buffer and $300-$3ff for the receive ring buffer. This area can not be used at startup for anything as the Lynx ROM needs this area for decryption purposes. +