Patches by Stefan Haubenthal
git-svn-id: svn://svn.cc65.org/cc65/trunk@2687 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
; Graphics driver for the 280x192x6 mode on the Apple II
|
; Graphics driver for the 280x192x6 mode on the Apple II
|
||||||
;
|
;
|
||||||
; Stefan Haubenthal <polluks@sdf.lonestar.org>
|
; Stefan Haubenthal <polluks@sdf.lonestar.org>
|
||||||
; Based on Stephen L. Judd's GRLIB code and
|
; Based on Maciej Witkowiak's circle routine
|
||||||
; Maciej Witkowiak's circle routine
|
|
||||||
;
|
;
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
@@ -233,7 +232,7 @@ INIT:
|
|||||||
; Switch into graphics mode
|
; Switch into graphics mode
|
||||||
|
|
||||||
jsr HGR
|
jsr HGR
|
||||||
lda MIXOFF
|
bit MIXOFF
|
||||||
|
|
||||||
; Done, reset the error code
|
; Done, reset the error code
|
||||||
|
|
||||||
@@ -289,9 +288,9 @@ CLEAR = HCLR
|
|||||||
SETVIEWPAGE:
|
SETVIEWPAGE:
|
||||||
tax
|
tax
|
||||||
beq @L1
|
beq @L1
|
||||||
lda PG2ON
|
bit PG2ON
|
||||||
rts
|
rts
|
||||||
@L1: lda PG2OFF
|
@L1: bit PG2OFF
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
@@ -401,8 +400,37 @@ SETPIXEL:
|
|||||||
|
|
||||||
|
|
||||||
GETPIXEL:
|
GETPIXEL:
|
||||||
lda #TGI_ERR_INV_FUNC
|
ldx X1
|
||||||
sta ERROR
|
ldy X1+1
|
||||||
|
lda Y1
|
||||||
|
jsr HPOSN ; 1st pixel
|
||||||
|
HBASL = $26
|
||||||
|
HMASK = $30
|
||||||
|
ldx #0
|
||||||
|
lda (HBASL),y
|
||||||
|
and HMASK
|
||||||
|
beq @L1
|
||||||
|
inx
|
||||||
|
@L1: stx tmp1
|
||||||
|
lda $E0 ; which neighbour
|
||||||
|
tax
|
||||||
|
and #$01
|
||||||
|
bne @odd
|
||||||
|
asl tmp1
|
||||||
|
inx
|
||||||
|
.byte $24
|
||||||
|
@odd: dex
|
||||||
|
ldy $E1
|
||||||
|
lda $E2
|
||||||
|
jsr HPOSN ; 2nd pixel
|
||||||
|
ldx #0
|
||||||
|
lda (HBASL),y
|
||||||
|
and HMASK
|
||||||
|
beq @L2
|
||||||
|
inx
|
||||||
|
@L2: txa
|
||||||
|
ora tmp1
|
||||||
|
ldx #0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user