]> git.sur5r.net Git - cc65/commitdiff
Removed emulation for BAR
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 3 Nov 2003 17:39:00 +0000 (17:39 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 3 Nov 2003 17:39:00 +0000 (17:39 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2605 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/c64/c64-320-200-2.s
libsrc/tgi/Makefile
libsrc/tgi/tgi-kernel.s
libsrc/tgi/tgi_emu_bar.s [deleted file]

index 5bed0187409efc91e4d73975f6407a691c2166c1..b6301a89488549f7f38ab6de7af3819214f627ff 100644 (file)
@@ -55,7 +55,7 @@
         .word   GETPIXEL
         .word   HORLINE
         .word   LINE
-        .word   0               ; BAR
+        .word   BAR
         .word   CIRCLE
         .word   TEXTSTYLE
         .word   OUTTEXT
@@ -98,13 +98,17 @@ OLDD018:        .res    1       ; Old register value
 DX:             .res    2
 DY:             .res    2
 
-; Circle routine stuff
+; Circle routine stuff, overlaid by BAR variables
+X1SAVE:
 CURX:           .res    1
 CURY:           .res    1
+Y1SAVE:
 BROW:           .res    1       ; Bottom row
 TROW:           .res    1       ; Top row
+X2SAVE:
 LCOL:           .res    1       ; Left column
 RCOL:           .res    1       ; Right column
+Y2SAVE:
 CHUNK1:         .res    1
 OLDCH1:         .res    1
 CHUNK2:         .res    1
@@ -816,7 +820,57 @@ FIXY:   cpy     #255         ;Y=255 or Y=8
 ; Must set an error code: NO
 ;
 
-BAR:    rts
+BAR:   lda     Y2
+        sta     Y2SAVE
+        lda     Y2+1
+        sta     Y2SAVE+1
+
+        lda     X2
+        sta     X2SAVE
+        lda     X2+1
+        sta     X2SAVE+1
+
+        lda     Y1
+        sta     Y1SAVE
+        lda     Y1+1
+        sta     Y1SAVE+1
+
+        lda     X1
+        sta     X1SAVE
+        lda     X1+1
+        sta     X1SAVE+1
+
+@L1:    jsr     HORLINE
+
+        lda     Y1SAVE
+        cmp     Y2SAVE
+        bne     @L2
+        lda     Y1SAVE
+        cmp     Y2SAVE
+        beq     @L4
+
+@L2:    inc     Y1SAVE
+        bne     @L3
+        inc     Y1SAVE+1
+
+@L3:    lda     Y1SAVE
+        sta     Y1
+        lda     Y1SAVE+1
+        sta     Y1+1
+
+        lda     X1SAVE
+        sta     X1
+        lda     X1SAVE+1
+        sta     X1+1
+
+        lda     X2SAVE
+        sta     X2
+        lda     X2SAVE+1
+        sta     X2+1
+        jmp     @L1
+
+@L4:    rts
+
 
 ; ------------------------------------------------------------------------
 ; CIRCLE: Draw a circle around the center X1/Y1 (= ptr1/ptr2) with the
index 59c56df458ef0ba3f11313b9aebcad4166e7ea67..9f39c4569a46eb836bef98505eab696d71ffe03e 100644 (file)
@@ -25,7 +25,6 @@ S_OBJS =              tgi-kernel.o            \
                 tgi_clear.o             \
                 tgi_curtoxy.o           \
                 tgi_done.o              \
-                tgi_emu_bar.o           \
                 tgi_getcolor.o          \
                 tgi_getcolorcount.o     \
                 tgi_getdefpalette.o     \
index 1cd44644c273119c6bc48c0372e3d1614cbdc902..86e551ab41c4adf514a9cc5dd998d35b425ec69c 100644 (file)
@@ -99,17 +99,9 @@ _tgi_install:
         cpx     #(TGI_HDR_JUMPCOUNT*3)
         bne     @L1
 
-; Check for emulation vectors needed
+; Call the driver install routine
 
-        lda     tgi_bar+1
-        ora     tgi_bar+2               ; Do we have a BAR vector?
-        bne     @L2                     ; Jump if yes
-        lda     #<tgi_emu_bar           ; Use emulation if no
-        sta     tgi_bar+1
-        lda     #>tgi_emu_bar
-        sta     tgi_bar+2
-
-@L2:    jsr     tgi_install             ; Call driver install routine, may...
+        jsr     tgi_install             ; Call driver install routine, may...
                                         ; ...update variables
         jsr     tgi_set_ptr             ; Set ptr1 to tgi_drv
 
diff --git a/libsrc/tgi/tgi_emu_bar.s b/libsrc/tgi/tgi_emu_bar.s
deleted file mode 100644 (file)
index e8a06a1..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-;
-; Ullrich von Bassewitz, 22.06.2002
-;
-; Emulation for tgi_bar.
-;
-
-        .include        "tgi-kernel.inc"
-
-        .importzp       ptr1, ptr2, ptr3, ptr4
-
-.proc   tgi_emu_bar
-
-        lda     ptr4
-        sta     Y2
-        lda     ptr4+1
-        sta     Y2+1
-
-        lda     ptr3
-        sta     X2
-        lda     ptr3+1
-        sta     X2+1
-
-        lda     ptr2
-        sta     ptr4
-        sta     Y1
-        lda     ptr2+1
-        sta     ptr4+1
-        sta     Y1+1
-
-        lda     ptr1
-        sta     X1
-        lda     ptr1+1
-        sta     X1+1
-
-@L1:    jsr     tgi_horline
-
-        lda     Y1
-        cmp     Y2
-        bne     @L2
-        lda     Y1
-        cmp     Y2
-        beq     @L4
-
-@L2:    inc     Y1
-        bne     @L3
-        inc     Y1+1
-
-@L3:    lda     Y1
-        sta     ptr2
-        lda     Y1+1
-        sta     ptr2+1
-
-        lda     X1
-        sta     ptr1
-        lda     X1+1
-        sta     ptr1+1
-
-        lda     X2
-        sta     ptr3
-        lda     X2+1
-        sta     ptr3+1
-        jmp     @L1
-
-@L4:    rts
-
-.endproc
-
-;-----------------------------------------------------------------------------
-; Data
-
-.bss
-
-DY:     .res    2
-X1:     .res    2
-X2:     .res    2
-Y1:     .res    2
-Y2:     .res    2
-
-
-