move some stuff to init segment, saves roughly 1480 bytes :)

This commit is contained in:
mrdudz
2015-10-12 23:39:47 +02:00
parent 362a172477
commit f462c173fb
4 changed files with 104 additions and 61 deletions

View File

@@ -17,6 +17,12 @@ soft80_kplot:
stx CURS_Y
sty CURS_X
sei
lda $01
pha
lda #$34 ; enable RAM under I/O
sta $01
; calc pointer to bitmap
lda soft80_bitmapylo,x
clc
@@ -41,40 +47,15 @@ soft80_kplot:
adc soft80_vramhi,x
sta CRAM_PTR+1
pla
sta $01
cli
@getpos:
ldx CURS_Y
ldy CURS_X
rts
; FIXME: the following tables take up 260 bytes, perhaps move them
; to 0xdc00... area in ram under i/o
.rodata
soft80_bitmapxlo:
.repeat 80,col
.byte <((col/2)*8)
.endrepeat
soft80_bitmapxhi:
.repeat 80,col
.byte >((col/2)*8)
.endrepeat
soft80_vramlo:
.repeat 25,row
.byte <(soft80_vram+(row*40))
.endrepeat
soft80_vramhi:
.repeat 25,row
.byte >(soft80_vram+(row*40))
.endrepeat
soft80_bitmapylo:
.repeat 25,row
.byte <(soft80_bitmap+(row*40*8))
.endrepeat
soft80_bitmapyhi:
.repeat 25,row
.byte >(soft80_bitmap+(row*40*8))
.endrepeat
;-------------------------------------------------------------------------------
; force the init constructor to be imported