]> git.sur5r.net Git - cc65/commitdiff
Added library reference tgi_libref to TGI interface.
authorOliver Schmidt <ol.sc@web.de>
Sat, 1 Jun 2013 10:42:00 +0000 (12:42 +0200)
committerOliver Schmidt <ol.sc@web.de>
Sat, 1 Jun 2013 10:42:00 +0000 (12:42 +0200)
21 files changed:
asminc/tgi-kernel.inc
libsrc/apple2/libref.s
libsrc/apple2/tgi/a2.hi.s
libsrc/apple2/tgi/a2.lo.s
libsrc/atari/libref.s
libsrc/atari/tgi/atari_tgi_common.inc
libsrc/atmos/libref.s
libsrc/atmos/tgi/atmos-228-200-3.s
libsrc/atmos/tgi/atmos-240-200-2.s
libsrc/c128/libref.s
libsrc/c128/tgi/c128-vdc.s
libsrc/c128/tgi/c128-vdc2.s
libsrc/c64/libref.s
libsrc/c64/tgi/c64-hi.s
libsrc/geos-cbm/system/libref.s
libsrc/geos-cbm/tgi/geos-tgi.s
libsrc/lynx/libref.s
libsrc/lynx/tgi/lynx-160-102-16.s
libsrc/nes/libref.s
libsrc/nes/tgi/nes-64-56-2.s
libsrc/tgi/tgi-kernel.s

index c1182d3710eac15cb3f9cdb4152b5f1c45388d0c..6e687315d14fb53205c134d23702edde95d6baf7 100644 (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
index 898a92f18f689907d48da29b69f43515a647c67a..fb22515bd154539793bcc72b08246ae2ba1a61c0 100644 (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
index 145b78e4adc548c294b1cd93be95a61739bbd466..2f00c83da30ea06661627d62082e126334afaf94 100644 (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
index 7ac43e6cc9cc95d8400a1492f0881dabc93d2f4a..5c20ca4d289c5d3e24983ed8ba7cb61fa9298c55 100644 (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
index 933eb59111704297253e229ff5a3411d04b1dc01..8d9ff3e08a9f40eabb787cdd27414ac7cbf36ce1 100644 (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
index 9190fe8c80acb1ed660ed539831a722180bc6fb9..7dba884fac9f937b3774337d1f44cc7d79125e0c 100644 (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
index 0bda1e7e8a31fcb256e8e6cdfd2d9928611aba90..62c78b8c5d2d8030c9f55bd5f57e97f73e7e6515 100644 (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
index 9417fff0d92c85086cc623785f582124cf013dd4..e03376015cf046beebfafa3f4ce492c9e36c4f96 100644 (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
index 735d75f93d52dd103970ec361ec9ba1bd1b8b73c..e58ac36d2ee998ae67d60dbc50c11c69c92cb5ae 100644 (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
index 898a92f18f689907d48da29b69f43515a647c67a..fb22515bd154539793bcc72b08246ae2ba1a61c0 100644 (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
index 226d2aea28092312f869cbdcc5e6523c0ecc9d06..394f4080ae2f9ddc6620ea8ba3500bd1a773e25f 100644 (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
index e3c08037f33833160206bc43b36ede3ad6f47843..2e1d26ae5bd3784d7d836c58d786691ebbbe9b88 100644 (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
index 898a92f18f689907d48da29b69f43515a647c67a..fb22515bd154539793bcc72b08246ae2ba1a61c0 100644 (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
index 1e829d274945b7802d0561b6a7015cc2922967e4..d9119664988ce4023d8cfb0dbba3dde1ee91b1ce 100644 (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
index 933eb59111704297253e229ff5a3411d04b1dc01..8d9ff3e08a9f40eabb787cdd27414ac7cbf36ce1 100644 (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
index dbf9f4fc4dd5387027c61c50c24b934f93dba637..617e322ff7fda8fe8d5ed44511c291bb390e6e8c 100644 (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
index 0bda1e7e8a31fcb256e8e6cdfd2d9928611aba90..62c78b8c5d2d8030c9f55bd5f57e97f73e7e6515 100644 (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
index 4542cae1ddbd8ae2d67248b242b88105b01d3466..ef2eabf1d1cbc1edfa7713d6c476c02cfdcc28c3 100644 (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
index e4afa7eb1840d599ac8ee47d047d1e3a006c512f..d947c1aa4837069c87bcf5e2022c7c7621b2abf6 100644 (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
index cce83e2315bd3ccfff1878b1ee5b677f749dd2ec..512810b4c9387b35f2b8aa108b1ed0b078d2bae1 100644 (file)
 
         .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
index d5b025506ac7fa46cb3c57a597ca6c70965df1e3..3781795f65acc40577b07abd106c4437edf3b622 100644 (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