Added library reference tgi_libref to TGI interface.

This commit is contained in:
Oliver Schmidt 2013-06-01 12:42:00 +02:00
parent ae409e4978
commit b0dd6c614f
21 changed files with 42 additions and 12 deletions

View File

@ -39,6 +39,7 @@
.struct TGI_HDR
ID .byte 3 ; Contains 0x74, 0x67, 0x69 ("tgi")
VERSION .byte 1 ; Interface version
LIBREF .addr ; Library reference
VARS .struct
XRES .word 1 ; X resolution
YRES .word 1 ; Y resolution

View File

@ -2,10 +2,11 @@
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, mouse_libref, ser_libref
.export em_libref, joy_libref, mouse_libref, ser_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
mouse_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@ -77,6 +77,7 @@ Y2 := ptr4
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 280 ; X resolution
.word 192 ; Y resolution
.byte 8 ; Number of drawing colors

View File

@ -47,6 +47,7 @@ Y2 := ptr4
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 40 ; X resolution
.word 48 ; Y resolution
.byte 16 ; Number of drawing colors

View File

@ -2,8 +2,9 @@
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref
.export em_libref, joy_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
tgi_libref := _exit

View File

@ -18,6 +18,7 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word x_res ; X resolution
.word y_res ; Y resolution
.byte colors ; Number of drawing colors

View File

@ -2,8 +2,9 @@
; Oliver Schmidt, 2013-05-31
;
.export joy_libref, ser_libref
.export joy_libref, ser_libref, tgi_libref
.import _exit
joy_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@ -26,6 +26,7 @@ YSIZE = 8 ; System font height
.byte "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 228 ; x resolution
.word 200 ; y resolution
.byte 3 ; Number of drawing colors

View File

@ -26,6 +26,7 @@ YSIZE = 8 ; System font height
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 240 ; X resolution
.word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@ -2,10 +2,11 @@
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, mouse_libref, ser_libref
.export em_libref, joy_libref, mouse_libref, ser_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
mouse_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@ -55,6 +55,7 @@ VDC_DATA = 31
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word 640 ; X resolution
yres: .word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@ -56,6 +56,7 @@ VDC_DATA = 31
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word 640 ; X resolution
yres: .word 480 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@ -2,10 +2,11 @@
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, mouse_libref, ser_libref
.export em_libref, joy_libref, mouse_libref, ser_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
mouse_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@ -23,6 +23,7 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 320 ; X resolution
.word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@ -2,8 +2,9 @@
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref
.export em_libref, joy_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
tgi_libref := _exit

View File

@ -40,6 +40,7 @@ VDC_DATA = 31
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word 320 ; X resolution
yres: .word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@ -2,8 +2,9 @@
; Oliver Schmidt, 2013-05-31
;
.export joy_libref, ser_libref
.export joy_libref, ser_libref, tgi_libref
.import _exit
joy_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@ -27,6 +27,7 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 160 ; X resolution
.word 102 ; Y resolution
.byte 16 ; Number of drawing colors

View File

@ -2,7 +2,8 @@
; Oliver Schmidt, 2013-05-31
;
.export joy_libref
.export joy_libref, tgi_libref
.import _exit
joy_libref := _exit
tgi_libref := _exit

View File

@ -26,13 +26,14 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word charsperline*2 ; Max X resolution
yres: .word 56 ; Max Y resolution
.byte 2 ; Number of drawing colors
.byte 1 ; Number of screens available
.byte 2 ; System font X size
.byte 2 ; System font Y size
.word $100 ; Aspect ratio
.word $0100 ; Aspect ratio
.byte 0 ; TGI driver flags
; Next comes the jump table. Currently all entries must be valid and may point

View File

@ -4,12 +4,13 @@
; Common functions of the tgi graphics kernel.
;
.include "tgi-kernel.inc"
.include "tgi-error.inc"
.import tgi_libref
.importzp ptr1
.interruptor tgi_irq ; Export as IRQ handler
.include "tgi-kernel.inc"
.include "tgi-error.inc"
;----------------------------------------------------------------------------
; Variables
@ -108,6 +109,15 @@ _tgi_install:
dey
bpl @L0
; Set the library reference
ldy #TGI_HDR::LIBREF
lda #<tgi_libref
sta (ptr1),y
iny
lda #>tgi_libref
sta (ptr1),y
; Copy the jump vectors
ldy #TGI_HDR::JUMPTAB