From 5e37ed1a1687865ce48d833ebb11a590d7b72c03 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Mon, 25 Apr 2011 17:11:23 +0000 Subject: [PATCH] Target-specific black & white values for use by the target-shared TGI kernel git-svn-id: svn://svn.cc65.org/cc65/trunk@4993 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- asminc/tgi-kernel.inc | 15 +++++++++------ libsrc/apple2/Makefile | 1 + libsrc/apple2/tgi_colors.s | 8 ++++++++ libsrc/apple2enh/Makefile | 1 + libsrc/atari/Makefile | 3 ++- libsrc/atari/tgi_colors.s | 8 ++++++++ libsrc/atmos/Makefile | 1 + libsrc/atmos/tgi_colors.s | 8 ++++++++ libsrc/c128/Makefile | 1 + libsrc/c128/tgi_colors.s | 8 ++++++++ libsrc/c64/Makefile | 2 +- libsrc/c64/tgi_colors.s | 8 ++++++++ libsrc/lynx/Makefile | 2 +- libsrc/lynx/tgi_colors.s | 8 ++++++++ libsrc/tgi/tgi_init.s | 2 +- 15 files changed, 66 insertions(+), 10 deletions(-) create mode 100644 libsrc/apple2/tgi_colors.s create mode 100644 libsrc/atari/tgi_colors.s create mode 100644 libsrc/atmos/tgi_colors.s create mode 100644 libsrc/c128/tgi_colors.s create mode 100644 libsrc/c64/tgi_colors.s create mode 100644 libsrc/lynx/tgi_colors.s diff --git a/asminc/tgi-kernel.inc b/asminc/tgi-kernel.inc index 1a6223bb0..5f43fc007 100644 --- a/asminc/tgi-kernel.inc +++ b/asminc/tgi-kernel.inc @@ -78,10 +78,7 @@ TGI_API_VERSION = $03 ;------------------------------------------------------------------------------ -; Color and text constants - -TGI_COLOR_BLACK = 0 -TGI_COLOR_WHITE = 1 +; Text constants TGI_FONT_BITMAP = 0 TGI_FONT_VECTOR = 1 @@ -99,7 +96,13 @@ TGI_CLIP_BOTTOM = $04 TGI_CLIP_TOP = $08 ;------------------------------------------------------------------------------ -; C accessible Variables +; ASM accessible color constants + + .global tgi_color_black:zp ; Target-specific value for black + .global tgi_color_white:zp ; Target-specific value for white + +;------------------------------------------------------------------------------ +; C accessible variables .global _tgi_drv ; Pointer to driver .global _tgi_error ; Last error code @@ -125,7 +128,7 @@ TGI_CLIP_TOP = $08 .global _tgi_aspectratio ; Aspect ratio, fixed point 8.8 ;------------------------------------------------------------------------------ -; ASM accessible Variables +; ASM accessible variables .global tgi_clip_x1 ; Coordinate for line clipper .global tgi_clip_y1 ; Coordinate for line clipper diff --git a/libsrc/apple2/Makefile b/libsrc/apple2/Makefile index d2f065c13..a5f45f3ef 100644 --- a/libsrc/apple2/Makefile +++ b/libsrc/apple2/Makefile @@ -103,6 +103,7 @@ S_OBJS= _scrsize.o \ sysrmdir.o \ systime.o \ sysuname.o \ + tgi_colors.o \ tgi_mode_table.o\ toascii.o \ vtabz.o \ diff --git a/libsrc/apple2/tgi_colors.s b/libsrc/apple2/tgi_colors.s new file mode 100644 index 000000000..8bc369809 --- /dev/null +++ b/libsrc/apple2/tgi_colors.s @@ -0,0 +1,8 @@ +; +; Target-specific black & white values for use by the target-shared TGI kernel +; + + .include "tgi-kernel.inc" + + .export tgi_color_black:zp = $00 + .export tgi_color_white:zp = $03 diff --git a/libsrc/apple2enh/Makefile b/libsrc/apple2enh/Makefile index e41d435db..9bdeea289 100644 --- a/libsrc/apple2enh/Makefile +++ b/libsrc/apple2enh/Makefile @@ -107,6 +107,7 @@ S_OBJS= _scrsize.o \ systime.o \ sysuname.o \ textframe.o \ + tgi_colors.o \ tgi_mode_table.o\ toascii.o \ videomode.o \ diff --git a/libsrc/atari/Makefile b/libsrc/atari/Makefile index be909955f..2eb51d910 100644 --- a/libsrc/atari/Makefile +++ b/libsrc/atari/Makefile @@ -113,8 +113,9 @@ OBJS = _scrsize.o \ sysrmdir.o \ systime.o \ sysuname.o \ - toascii.o \ + tgi_colors.o \ tgi_mode_table.o\ + toascii.o \ tvtype.o \ ucase_fn.o \ wherex.o \ diff --git a/libsrc/atari/tgi_colors.s b/libsrc/atari/tgi_colors.s new file mode 100644 index 000000000..4dab483e2 --- /dev/null +++ b/libsrc/atari/tgi_colors.s @@ -0,0 +1,8 @@ +; +; Target-specific black & white values for use by the target-shared TGI kernel +; + + .include "tgi-kernel.inc" + + .export tgi_color_black:zp = $00 + .export tgi_color_white:zp = $01 diff --git a/libsrc/atmos/Makefile b/libsrc/atmos/Makefile index 5fe1792b3..a36554132 100644 --- a/libsrc/atmos/Makefile +++ b/libsrc/atmos/Makefile @@ -65,6 +65,7 @@ OBJS = _scrsize.o \ revers.o \ systime.o \ sysuname.o \ + tgi_colors.o \ wherex.o \ wherey.o \ write.o diff --git a/libsrc/atmos/tgi_colors.s b/libsrc/atmos/tgi_colors.s new file mode 100644 index 000000000..4dab483e2 --- /dev/null +++ b/libsrc/atmos/tgi_colors.s @@ -0,0 +1,8 @@ +; +; Target-specific black & white values for use by the target-shared TGI kernel +; + + .include "tgi-kernel.inc" + + .export tgi_color_black:zp = $00 + .export tgi_color_white:zp = $01 diff --git a/libsrc/c128/Makefile b/libsrc/c128/Makefile index 22f928db9..18b7af1a7 100644 --- a/libsrc/c128/Makefile +++ b/libsrc/c128/Makefile @@ -67,6 +67,7 @@ OBJS = _scrsize.o \ slow.o \ systime.o \ sysuname.o \ + tgi_colors.o \ tgi_mode_table.o \ toggle_videomode.o \ videomode.o diff --git a/libsrc/c128/tgi_colors.s b/libsrc/c128/tgi_colors.s new file mode 100644 index 000000000..4dab483e2 --- /dev/null +++ b/libsrc/c128/tgi_colors.s @@ -0,0 +1,8 @@ +; +; Target-specific black & white values for use by the target-shared TGI kernel +; + + .include "tgi-kernel.inc" + + .export tgi_color_black:zp = $00 + .export tgi_color_white:zp = $01 diff --git a/libsrc/c64/Makefile b/libsrc/c64/Makefile index 9b6feb0be..f21c140c8 100644 --- a/libsrc/c64/Makefile +++ b/libsrc/c64/Makefile @@ -4,7 +4,6 @@ .SUFFIXES: .o .s .c - #-------------------------------------------------------------------------- # Programs and flags @@ -67,6 +66,7 @@ OBJS = _scrsize.o \ revers.o \ systime.o \ sysuname.o \ + tgi_colors.o \ tgi_mode_table.o #-------------------------------------------------------------------------- diff --git a/libsrc/c64/tgi_colors.s b/libsrc/c64/tgi_colors.s new file mode 100644 index 000000000..4dab483e2 --- /dev/null +++ b/libsrc/c64/tgi_colors.s @@ -0,0 +1,8 @@ +; +; Target-specific black & white values for use by the target-shared TGI kernel +; + + .include "tgi-kernel.inc" + + .export tgi_color_black:zp = $00 + .export tgi_color_white:zp = $01 diff --git a/libsrc/lynx/Makefile b/libsrc/lynx/Makefile index d6801be30..c5a1c13af 100644 --- a/libsrc/lynx/Makefile +++ b/libsrc/lynx/Makefile @@ -4,7 +4,6 @@ .SUFFIXES: .o .s .c - #-------------------------------------------------------------------------- # Programs and flags @@ -64,6 +63,7 @@ OBJS = bllhdr.o \ oserror.o \ read.o \ sysuname.o \ + tgi_colors.o \ toascii.o \ uploader.o diff --git a/libsrc/lynx/tgi_colors.s b/libsrc/lynx/tgi_colors.s new file mode 100644 index 000000000..64155f349 --- /dev/null +++ b/libsrc/lynx/tgi_colors.s @@ -0,0 +1,8 @@ +; +; Target-specific black & white values for use by the target-shared TGI kernel +; + + .include "tgi-kernel.inc" + + .export tgi_color_black:zp = $00 + .export tgi_color_white:zp = $0F diff --git a/libsrc/tgi/tgi_init.s b/libsrc/tgi/tgi_init.s index ccee5a63a..0df052edd 100644 --- a/libsrc/tgi/tgi_init.s +++ b/libsrc/tgi/tgi_init.s @@ -55,7 +55,7 @@ ; Set the drawing color to white -@L1: lda #TGI_COLOR_WHITE +@L1: lda #tgi_color_white jsr _tgi_setcolor ; tgi_setcolor (TGI_COLOR_WHITE); ; Set the text style -- 2.39.5