]> git.sur5r.net Git - cc65/commitdiff
TGI drivers updated for current API (INIT call has changed)
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 2 Jan 2003 22:18:30 +0000 (22:18 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 2 Jan 2003 22:18:30 +0000 (22:18 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1873 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/Makefile
libsrc/c128/c128-640-200-2.s
libsrc/c128/c128-640-480-2.s
libsrc/c64/c64-320-200-2.s
libsrc/geos/devel/geos-tgi.s

index 84fb45baab3784d5e54ff8390e0bbc5606f30ce6..985dfd09663b4ca460ad6241caa52ab8964c116d 100644 (file)
@@ -246,7 +246,7 @@ plus4lib:
 
 .PHONY: clean
 clean:
-       @for i in common conio dbg em runtime tgi $(ALLTARGETS); do     \
+       @for i in common conio dbg em joystick runtime tgi $(ALLTARGETS); do    \
           $(MAKE) -C $$i clean;                                                                        \
        done
 
index a220b9f55d1e682de22d067d12be1c13c4c7a133..703dfd4181ea6d7d43c016b77561da82f87f4724 100644 (file)
@@ -287,10 +287,7 @@ DEINSTALL:
 ; Must set an error code: YES
 ;
 
-INIT:   cmp     #TGI_MODE_640_200_2     ; Correct mode?
-        beq     @L1                     ; Jump if yes
-        lda     #TGI_ERR_INV_MODE       ; ## Error
-        bne     @L9
+INIT:
 
 ; Initialize variables
 
@@ -317,7 +314,7 @@ INIT:   cmp     #TGI_MODE_640_200_2     ; Correct mode?
 ; Done, reset the error code
 
         lda     #TGI_ERR_OK
-@L9:    sta     ERROR
+        sta     ERROR
         rts
 
 ; ------------------------------------------------------------------------
index 9f45bc32ab46540b2b41ddda454a9a7f413869e3..409c7d5d59169d936d3bbcaea559d386e63f054c 100644 (file)
@@ -292,12 +292,8 @@ DEINSTALL:
 ; Must set an error code: YES
 ;
 
-INIT:   cmp     #TGI_MODE_640_480_2     ; Correct mode?
-        beq     @L1                     ; Jump if yes
-        lda     #TGI_ERR_INV_MODE       ; ## Error
-        bne     @L9
-
-@L1:   lda     pages                   ; is there enough memory?
+INIT:
+       lda     pages                   ; is there enough memory?
        bne     @L11                    ; Jump if there is one screen
        lda     #TGI_ERR_INV_MODE       ; ## Error
        bne     @L9
index 4ab678c3e65bff473b832ca3d6f1a45a04158c8d..ff19f1ba6247c3b1e6ed05f3d6c884ed6cb6f0d9 100644 (file)
@@ -170,14 +170,11 @@ DEINSTALL:
 ; Must set an error code: YES
 ;
 
-INIT:   cmp     #TGI_MODE_320_200_2     ; Correct mode?
-        beq     @L1                     ; Jump if yes
-        lda     #TGI_ERR_INV_MODE       ; ## Error
-        bne     @L9
+INIT:
 
 ; Initialize variables
 
-@L1:    ldx     #$FF
+        ldx     #$FF
         stx     BITMASK
 
 ; Switch into graphics mode
@@ -201,7 +198,7 @@ INIT:   cmp     #TGI_MODE_320_200_2     ; Correct mode?
 ; Done, reset the error code
 
         lda     #TGI_ERR_OK
-@L9:    sta     ERROR
+        sta     ERROR
         rts
 
 ; ------------------------------------------------------------------------
index 784d2834b5e174085fdb8265b33bbd1041c623b7..1429bef8d41b9f02507d95634a8c45e7b37c98d9 100644 (file)
@@ -887,7 +887,11 @@ TEXTSTYLE:
 ;
 
 OUTTEXT:
-       lda     X1
+       lda     TEXTDIR
+;      cmp     #TGI_TEXT_HORIZONTAL    ; this is equal 0
+       bne     @vertical
+
+       lda     X1              ; horizontal text output
        ldx     X1+1
        ldy     Y1
        sta     r11L
@@ -899,6 +903,27 @@ OUTTEXT:
        stx     r0H
        jmp     PutString
 
+@vertical:
+       lda     X1              ; vertical text output
+       ldx     X1+1
+       ldy     Y1
+       sta     r11L
+       stx     r11H
+       sty     r1H
+       ldy     #0
+       lda     (ptr3),y
+       beq     @end
+       jsr     PutChar
+       inc     ptr3
+       bne     @L1
+       inc     ptr3+1
+@L1:   lda     Y1
+       clc
+       adc     #8
+       sta     Y1
+       bne     @vertical
+@end:  rts
+
 ;-------------
 ; copies of some runtime routines