Working on the TGI library

git-svn-id: svn://svn.cc65.org/cc65/trunk@1323 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-06-22 21:40:24 +00:00
parent 897c1d8523
commit bf944755dd
16 changed files with 202 additions and 50 deletions

View File

@@ -32,13 +32,14 @@
;*****************************************************************************/
; Error constants
TGI_ERR_OK = 0 ; No error
TGI_ERR_NO_DRIVER = 1 ; No driver available
TGI_ERR_LOAD_ERROR = 2 ; Error loading driver
TGI_ERR_INV_DRIVER = 3 ; Invalid driver
TGI_ERR_INV_MODE = 4 ; Mode not supported by driver
TGI_ERR_INV_ARG = 5 ; Invalid function argument

View File

@@ -40,9 +40,10 @@ TGI_HDR_ID = 0 ; Contains 0x74, 0x67, 0x69 ("tgi")
TGI_HDR_VERSION = 3 ; Interface version
TGI_HDR_XRES = 4 ; X resolution
TGI_HDR_YRES = 6 ; Y resolution
TGI_HDR_COLORS = 8 ; Number of available colors
TGI_HDR_ERROR = 9 ; Error code
TGI_HDR_RES = 10 ; Reserved for extensions
TGI_HDR_COLORCOUNT = 8 ; Number of available colors
TGI_HDR_PAGECOUNT = 9 ; Number of screens available
TGI_HDR_ERROR = 10 ; Error code
TGI_HDR_RES = 11 ; Reserved for extensions
TGI_HDR_JUMPTAB = 16
TGI_HDR_INSTALL = TGI_HDR_JUMPTAB+0 ; INSTALL routine
@@ -51,14 +52,16 @@ TGI_HDR_INIT = TGI_HDR_JUMPTAB+4 ; INIT routine
TGI_HDR_DONE = TGI_HDR_JUMPTAB+6 ; DONE routine
TGI_HDR_CONTROL = TGI_HDR_JUMPTAB+8 ; CONTROL routine
TGI_HDR_CLEAR = TGI_HDR_JUMPTAB+10 ; CLEAR routine
TGI_HDR_SETCOLOR = TGI_HDR_JUMPTAB+12 ; SETCOLOR routine
TGI_HDR_SETPIXEL = TGI_HDR_JUMPTAB+14 ; SETPIXEL routine
TGI_HDR_GETPIXEL = TGI_HDR_JUMPTAB+16 ; GETPIXEL routine
TGI_HDR_LINE = TGI_HDR_JUMPTAB+18 ; LINE routine
TGI_HDR_BAR = TGI_HDR_JUMPTAB+20 ; BAR routine
TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+22 ; CIRCLE routine
TGI_HDR_SETVIEWPAGE = TGI_HDR_JUMPTAB+12 ; SETVIEWPAGE routine
TGI_HDR_SETDRAWPAGE = TGI_HDR_JUMPTAB+14 ; SETDRAWPAGE routine
TGI_HDR_SETCOLOR = TGI_HDR_JUMPTAB+16 ; SETCOLOR routine
TGI_HDR_SETPIXEL = TGI_HDR_JUMPTAB+18 ; SETPIXEL routine
TGI_HDR_GETPIXEL = TGI_HDR_JUMPTAB+20 ; GETPIXEL routine
TGI_HDR_LINE = TGI_HDR_JUMPTAB+22 ; LINE routine
TGI_HDR_BAR = TGI_HDR_JUMPTAB+24 ; BAR routine
TGI_HDR_CIRCLE = TGI_HDR_JUMPTAB+26 ; CIRCLE routine
TGI_HDR_JUMPCOUNT = 12 ; Number of jump vectors
TGI_HDR_JUMPCOUNT = 14 ; Number of jump vectors
;------------------------------------------------------------------------------
; Variables
@@ -66,8 +69,14 @@ TGI_HDR_JUMPCOUNT = 12 ; Number of jump vectors
.global _tgi_drv ; Pointer to driver
.global _tgi_error ; Last error code
.global _tgi_mode ; Graphics mode or zero
.global _tgi_curx ; Current drawing cursor X
.global _tgi_cury ; Current drawing cursor Y
.global _tgi_color ; Current drawing color
.global _tgi_bgcolor ; Current background color
.global _tgi_xres ; X resolution of the current mode
.global _tgi_yres ; Y resolution of the current mode
.global _tgi_yres ; Y resolution of the current mode
.global _tgi_colorcount ; Number of available colors
.global _tgi_pagecount ; Number of available screen pages
;------------------------------------------------------------------------------
; Driver entry points
@@ -78,6 +87,8 @@ TGI_HDR_JUMPCOUNT = 12 ; Number of jump vectors
.global tgi_done
.global tgi_control
.global tgi_clear
.global tgi_setviewpage
.global tgi_setdrawpage
.global tgi_setcolor
.global tgi_setpixel
.global tgi_getpixel
@@ -89,6 +100,10 @@ TGI_HDR_JUMPCOUNT = 12 ; Number of jump vectors
;------------------------------------------------------------------------------
; ASM functions
.global tgi_emu_bar
.global tgi_fetch_error
.global tgi_getset
.global tgi_inv_arg
.global tgi_linepop
.global tgi_set_ptr