mirror of
https://github.com/cc65/cc65.git
synced 2025-02-01 09:30:10 +00:00
Update from Stefan Haubenthal
git-svn-id: svn://svn.cc65.org/cc65/trunk@2712 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
298767d71a
commit
7ef718d69e
@ -232,7 +232,7 @@ INIT:
|
|||||||
; Switch into graphics mode
|
; Switch into graphics mode
|
||||||
|
|
||||||
jsr HGR
|
jsr HGR
|
||||||
bit MIXOFF
|
bit MIXOFF
|
||||||
|
|
||||||
; Done, reset the error code
|
; Done, reset the error code
|
||||||
|
|
||||||
@ -288,9 +288,9 @@ CLEAR = HCLR
|
|||||||
SETVIEWPAGE:
|
SETVIEWPAGE:
|
||||||
tax
|
tax
|
||||||
beq @L1
|
beq @L1
|
||||||
bit PG2ON
|
bit PG2ON
|
||||||
rts
|
rts
|
||||||
@L1: bit PG2OFF
|
@L1: bit PG2OFF
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
@ -400,38 +400,40 @@ SETPIXEL:
|
|||||||
|
|
||||||
|
|
||||||
GETPIXEL:
|
GETPIXEL:
|
||||||
ldx X1
|
ldx X1
|
||||||
ldy X1+1
|
ldy X1+1
|
||||||
lda Y1
|
lda Y1
|
||||||
jsr HPOSN ; 1st pixel
|
jsr HPOSN ; 1st pixel
|
||||||
HBASL = $26
|
HBASL = $26
|
||||||
HMASK = $30
|
HMASK = $30
|
||||||
ldx #0
|
ldx #0
|
||||||
lda (HBASL),y
|
lda (HBASL),y
|
||||||
and HMASK
|
and HMASK
|
||||||
beq @L1
|
beq @L1
|
||||||
inx
|
inx
|
||||||
@L1: stx tmp1
|
@L1: stx tmp1
|
||||||
lda $E0 ; which neighbour
|
|
||||||
tax
|
lda $E0 ; which neighbour
|
||||||
and #$01
|
tax
|
||||||
bne @odd
|
and #$01
|
||||||
asl tmp1
|
bne @odd
|
||||||
inx
|
asl tmp1
|
||||||
.byte $24
|
inx
|
||||||
@odd: dex
|
.byte $24
|
||||||
ldy $E1
|
@odd: dex
|
||||||
lda $E2
|
|
||||||
jsr HPOSN ; 2nd pixel
|
ldy $E1
|
||||||
ldx #0
|
lda $E2
|
||||||
lda (HBASL),y
|
jsr HPOSN ; 2nd pixel
|
||||||
and HMASK
|
ldx #0
|
||||||
beq @L2
|
lda (HBASL),y
|
||||||
inx
|
and HMASK
|
||||||
@L2: txa
|
beq @L2
|
||||||
ora tmp1
|
inx
|
||||||
ldx #0
|
@L2: txa
|
||||||
rts
|
ora tmp1
|
||||||
|
ldx #0
|
||||||
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; LINE: Draw a line from X1/Y1 to X2/Y2, where X1/Y1 = ptr1/ptr2 and
|
; LINE: Draw a line from X1/Y1 to X2/Y2, where X1/Y1 = ptr1/ptr2 and
|
||||||
@ -441,14 +443,14 @@ HMASK = $30
|
|||||||
;
|
;
|
||||||
|
|
||||||
LINE:
|
LINE:
|
||||||
ldx X1
|
ldx X1
|
||||||
ldy X1+1
|
ldy X1+1
|
||||||
lda Y1
|
lda Y1
|
||||||
jsr HPOSN
|
jsr HPOSN
|
||||||
lda X2
|
lda X2
|
||||||
ldx X2+1
|
ldx X2+1
|
||||||
ldy Y2
|
ldy Y2
|
||||||
jmp HLIN
|
jmp HLIN
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; BAR: Draw a filled rectangle with the corners X1/Y1, X2/Y2, where
|
; BAR: Draw a filled rectangle with the corners X1/Y1, X2/Y2, where
|
||||||
@ -456,12 +458,12 @@ LINE:
|
|||||||
; Contrary to most other functions, the graphics kernel will sort and clip
|
; Contrary to most other functions, the graphics kernel will sort and clip
|
||||||
; the coordinates before calling the driver, so on entry the following
|
; the coordinates before calling the driver, so on entry the following
|
||||||
; conditions are valid:
|
; conditions are valid:
|
||||||
; X1 <= X2
|
; X1 <= X2
|
||||||
; Y1 <= Y2
|
; Y1 <= Y2
|
||||||
; (X1 >= 0) && (X1 < XRES)
|
; (X1 >= 0) && (X1 < XRES)
|
||||||
; (X2 >= 0) && (X2 < XRES)
|
; (X2 >= 0) && (X2 < XRES)
|
||||||
; (Y1 >= 0) && (Y1 < YRES)
|
; (Y1 >= 0) && (Y1 < YRES)
|
||||||
; (Y2 >= 0) && (Y2 < YRES)
|
; (Y2 >= 0) && (Y2 < YRES)
|
||||||
;
|
;
|
||||||
; Must set an error code: NO
|
; Must set an error code: NO
|
||||||
;
|
;
|
||||||
@ -743,8 +745,7 @@ OUTTEXT:
|
|||||||
|
|
||||||
abs:
|
abs:
|
||||||
; a/y := abs(a/y)
|
; a/y := abs(a/y)
|
||||||
dey
|
cpy #0
|
||||||
iny
|
|
||||||
bpl @L1
|
bpl @L1
|
||||||
; negay
|
; negay
|
||||||
clc
|
clc
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
;
|
;
|
||||||
; Ullrich von Bassewitz, 2003-11-12
|
; Ullrich von Bassewitz, 31.05.2002
|
||||||
;
|
;
|
||||||
; Apple ][ mode table for tgi_map_mode
|
; Apple II mode table for tgi_map_mode
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _tgi_mode_table
|
.export _tgi_mode_table
|
||||||
|
|
||||||
.include "tgi-mode.inc"
|
.include "tgi-mode.inc"
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
.rodata
|
.rodata
|
||||||
|
|
||||||
_tgi_mode_table:
|
_tgi_mode_table:
|
||||||
.byte TGI_MODE_280_192_6, "apple2-280-192-6.tgi", 0
|
.byte TGI_MODE_280_192_6, "APPLE2.HI.TGI", 0
|
||||||
.byte 0 ; End marker
|
.byte TGI_MODE_40_40_16, "APPLE2.LO.TGI", 0
|
||||||
|
; .byte TGI_MODE_560_192_2, "APPLE2.DHI.TGI", 0
|
||||||
|
.byte 0 ; End marker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user