mirror of
https://github.com/cc65/cc65.git
synced 2025-02-09 17:33:00 +00:00
include bitmap and vram row tables directly rather than generating them (saves space)
This commit is contained in:
parent
fba28f46f6
commit
b5a6578dca
@ -5,7 +5,7 @@
|
|||||||
.constructor soft80_init, 24
|
.constructor soft80_init, 24
|
||||||
.destructor soft80_shutdown
|
.destructor soft80_shutdown
|
||||||
|
|
||||||
.import soft80_kclrscr, soft80_plotinit
|
.import soft80_kclrscr
|
||||||
.import soft80_textcolor, soft80_bgcolor
|
.import soft80_textcolor, soft80_bgcolor
|
||||||
|
|
||||||
.include "c64.inc"
|
.include "c64.inc"
|
||||||
@ -50,8 +50,6 @@ soft80_init:
|
|||||||
sta $01
|
sta $01
|
||||||
cli
|
cli
|
||||||
|
|
||||||
jsr soft80_plotinit
|
|
||||||
|
|
||||||
lda 646 ; use current textcolor
|
lda 646 ; use current textcolor
|
||||||
jsr soft80_textcolor
|
jsr soft80_textcolor
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
.export soft80_kplot
|
.export soft80_kplot
|
||||||
.export soft80_plotinit
|
|
||||||
|
|
||||||
.include "c64.inc"
|
.include "c64.inc"
|
||||||
.include "soft80.inc"
|
.include "soft80.inc"
|
||||||
@ -32,70 +31,30 @@ soft80_kplot:
|
|||||||
ldy CURS_X
|
ldy CURS_X
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; FIXME: perhaps just include the respective tables directly?
|
.rodata
|
||||||
soft80_plotinit:
|
|
||||||
; create screen-rows base tables (bitmap)
|
|
||||||
lda #<soft80_bitmap
|
|
||||||
sta SCREEN_PTR
|
|
||||||
lda #>soft80_bitmap
|
|
||||||
sta SCREEN_PTR+1
|
|
||||||
|
|
||||||
ldx #$00
|
|
||||||
l1:
|
|
||||||
lda SCREEN_PTR
|
|
||||||
sta _bitmaplo,x
|
|
||||||
clc
|
|
||||||
adc #<(40*8)
|
|
||||||
sta SCREEN_PTR
|
|
||||||
lda SCREEN_PTR+1
|
|
||||||
sta _bitmaphi,x
|
|
||||||
adc #>(40*8)
|
|
||||||
sta SCREEN_PTR+1
|
|
||||||
inx
|
|
||||||
cpx #25
|
|
||||||
bne l1
|
|
||||||
|
|
||||||
; create screen-rows base tables (colorram)
|
|
||||||
|
|
||||||
lda #<soft80_vram
|
|
||||||
sta CRAM_PTR
|
|
||||||
lda #>soft80_vram
|
|
||||||
sta CRAM_PTR+1
|
|
||||||
|
|
||||||
ldx #$00
|
|
||||||
l1b:
|
|
||||||
lda CRAM_PTR
|
|
||||||
sta _vramlo,x
|
|
||||||
clc
|
|
||||||
adc #<(40)
|
|
||||||
sta CRAM_PTR
|
|
||||||
lda CRAM_PTR+1
|
|
||||||
sta _vramhi,x
|
|
||||||
adc #>(40)
|
|
||||||
sta CRAM_PTR+1
|
|
||||||
inx
|
|
||||||
cpx #25
|
|
||||||
bne l1b
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
_bitmapxlo:
|
_bitmapxlo:
|
||||||
.repeat 80,col1
|
.repeat 80,col
|
||||||
.byte <((col1/2)*8)
|
.byte <((col/2)*8)
|
||||||
.endrepeat
|
.endrepeat
|
||||||
|
|
||||||
_bitmapxhi:
|
_bitmapxhi:
|
||||||
.repeat 80,col
|
.repeat 80,col
|
||||||
.byte >((col/2)*8)
|
.byte >((col/2)*8)
|
||||||
.endrepeat
|
.endrepeat
|
||||||
|
|
||||||
.bss
|
|
||||||
_vramlo:
|
_vramlo:
|
||||||
.res 25
|
.repeat 25,row
|
||||||
|
.byte <(soft80_vram+(row*40))
|
||||||
|
.endrepeat
|
||||||
_vramhi:
|
_vramhi:
|
||||||
.res 25
|
.repeat 25,row
|
||||||
|
.byte >(soft80_vram+(row*40))
|
||||||
|
.endrepeat
|
||||||
_bitmaplo:
|
_bitmaplo:
|
||||||
.res 25
|
.repeat 25,row
|
||||||
|
.byte <(soft80_bitmap+(row*40*8))
|
||||||
|
.endrepeat
|
||||||
_bitmaphi:
|
_bitmaphi:
|
||||||
.res 25
|
.repeat 25,row
|
||||||
|
.byte >(soft80_bitmap+(row*40*8))
|
||||||
|
.endrepeat
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user