1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-10 03:30:05 +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 CHARROM := $8000 ; Character ROM base address
CBASE := $9400 ; Color memory base address CBASE := $9400 ; Color memory base address
SBASE := $1000 ; Screen 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 VBASE := $1100 ; Video memory base address
; These numbers are added to Kernal's default VIC settings. ; These numbers are added to Kernal's default VIC settings.
@ -250,23 +251,21 @@ PATTERN_SOLID:
; Initialize variables ; Initialize variables
ldx #$FF ldy #$FF
stx BITMASK sty BITMASK
; Make screen columns. ; Make screen columns.
lda #<SBASE
sta tmp2
lda #>SBASE lda #>SBASE
sta tmp2+1 sta tmp2+1
inx ; (ldx #$00) iny ; (ldy #$00)
stx ERROR ; Set to TGI_ERR_OK sty tmp2
sty ERROR ; Set to TGI_ERR_OK
clc clc
ldx #$10
@NEXT_ROW: @NEXT_ROW:
ldy #$00
txa txa
adc #$10
@NEXT_COLUMN: @NEXT_COLUMN:
sta (tmp2),y sta (tmp2),y
@ -276,12 +275,8 @@ PATTERN_SOLID:
; Step to next row on screen. ; Step to next row on screen.
lda tmp2
adc #COLS-1 ; Carry is set
sta tmp2
inx inx
cpx #ROWS cpx #ROWS+$10
bne @NEXT_ROW bne @NEXT_ROW
; Set up VIC. ; Set up VIC.