1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

Added optimizations by dmsc

This commit is contained in:
Olli Savia 2020-07-13 16:59:47 +03:00 committed by greg-king5
parent e2ec517aae
commit de5678af5d

View File

@ -136,6 +136,7 @@ BITCHUNK: .byte $FF, $7F, $3F, $1F, $0F, $07, $03, $01
CHARROM := $8000 ; Character ROM base address
CBASE := $9400 ; Color memory base address
SBASE := $1000 ; Screen memory base address
.assert (<SBASE) = $0, error, "Error, SBASE must be page aligned"
VBASE := $1100 ; Video memory base address
; These numbers are added to Kernal's default VIC settings.
@ -250,23 +251,21 @@ PATTERN_SOLID:
; Initialize variables
ldx #$FF
stx BITMASK
ldy #$FF
sty BITMASK
; Make screen columns.
lda #<SBASE
sta tmp2
lda #>SBASE
sta tmp2+1
inx ; (ldx #$00)
stx ERROR ; Set to TGI_ERR_OK
iny ; (ldy #$00)
sty tmp2
sty ERROR ; Set to TGI_ERR_OK
clc
ldx #$10
@NEXT_ROW:
ldy #$00
txa
adc #$10
@NEXT_COLUMN:
sta (tmp2),y
@ -276,12 +275,8 @@ PATTERN_SOLID:
; Step to next row on screen.
lda tmp2
adc #COLS-1 ; Carry is set
sta tmp2
inx
cpx #ROWS
cpx #ROWS+$10
bne @NEXT_ROW
; Set up VIC.