Added a 160x192x2 TGI (graphics) driver to the VIC-20 library.

The driver requires a special linker configuration: "vic20-tgi.cfg".
The VIC-20 computer needs at least 8K of expansion RAM!

"tgidemo.c" needed to be adjusted because the VIC-20's vertical (y) range is greater than its horizontal (x) range -- the opposite of most other platforms.  Also, the circle demo would jam on the VIC-20.
This commit is contained in:
Greg King
2020-07-08 05:55:30 -04:00
parent d1833cc441
commit 410e4502ee
11 changed files with 1253 additions and 23 deletions

View File

@@ -216,7 +216,7 @@ void __fastcall__ tgi_arc (int x, int y, unsigned char rx, unsigned char ry,
/* Draw an ellipse arc with center at x/y and radii rx/ry using the current
** drawing color. The arc covers the angle between sa and ea (startangle and
** endangle), which must be in the range 0..360 (otherwise the function may
** bevave unextectedly).
** behave unexpectedly).
*/
void __fastcall__ tgi_pieslice (int x, int y, unsigned char rx, unsigned char ry,

View File

@@ -2,12 +2,12 @@
/* */
/* vic20.h */
/* */
/* vic20 system specific definitions */
/* VIC-20 system-specific definitions */
/* */
/* */
/* */
/* (C) 1998-2004 Ullrich von Bassewitz */
/* R<EFBFBD>merstra<EFBFBD>e 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -66,14 +66,39 @@
#define COLOR_GREEN 0x05
#define COLOR_BLUE 0x06
#define COLOR_YELLOW 0x07
/* Only the background and multi-color characters can have these colors. */
#define COLOR_ORANGE 0x08
#define COLOR_BROWN 0x09
#define COLOR_LIGHTRED 0x0A
#define COLOR_GRAY1 0x0B
#define COLOR_GRAY2 0x0C
#define COLOR_LIGHTORANGE 0x09
#define COLOR_PINK 0x0A
#define COLOR_LIGHTCYAN 0x0B
#define COLOR_LIGHTVIOLET 0x0C
#define COLOR_LIGHTGREEN 0x0D
#define COLOR_LIGHTBLUE 0x0E
#define COLOR_GRAY3 0x0F
#define COLOR_LIGHTYELLOW 0x0F
/* TGI color defines */
#define TGI_COLOR_BLACK COLOR_BLACK
#define TGI_COLOR_WHITE COLOR_WHITE
#define TGI_COLOR_RED COLOR_RED
#define TGI_COLOR_CYAN COLOR_CYAN
#define TGI_COLOR_VIOLET COLOR_VIOLET
#define TGI_COLOR_GREEN COLOR_GREEN
#define TGI_COLOR_BLUE COLOR_BLUE
#define TGI_COLOR_YELLOW COLOR_YELLOW
/* Only the background and multi-color graphics can have these colors. */
#define TGI_COLOR_ORANGE COLOR_ORANGE
#define TGI_COLOR_LIGHTORANGE COLOR_LIGHTORANGE
#define TGI_COLOR_PINK COLOR_PINK
#define TGI_COLOR_LIGHTCYAN COLOR_LIGHTCYAN
#define TGI_COLOR_LIGHTVIOLET COLOR_LIGHTVIOLET
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
#define TGI_COLOR_LIGHTYELLOW COLOR_LIGHTYELLOW
/* tgi_ioctl() commands */
#define TGI_IOCTL_VIC20_SET_PATTERN 0x01 /* Set 8-byte pattern for tgi_bar(). */
@@ -108,5 +133,9 @@ extern void vic20_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
extern void vic20_rama_emd[];
extern void vic20_georam_emd[];
extern void vic20_hi_tgi[]; /* Referred to by tgi_static_stddrv[] */
/* End of vic20.h */
#endif