From b5a6578dcab61be7f34fe19d959c7bac3dac2f4d Mon Sep 17 00:00:00 2001 From: mrdudz Date: Sun, 27 Sep 2015 18:49:30 +0200 Subject: [PATCH] include bitmap and vram row tables directly rather than generating them (saves space) --- libsrc/c64/soft80_conio.s | 4 +-- libsrc/c64/soft80_kplot.s | 71 +++++++++------------------------------ 2 files changed, 16 insertions(+), 59 deletions(-) diff --git a/libsrc/c64/soft80_conio.s b/libsrc/c64/soft80_conio.s index eb05e4e8b..199ac3584 100644 --- a/libsrc/c64/soft80_conio.s +++ b/libsrc/c64/soft80_conio.s @@ -5,7 +5,7 @@ .constructor soft80_init, 24 .destructor soft80_shutdown - .import soft80_kclrscr, soft80_plotinit + .import soft80_kclrscr .import soft80_textcolor, soft80_bgcolor .include "c64.inc" @@ -50,8 +50,6 @@ soft80_init: sta $01 cli - jsr soft80_plotinit - lda 646 ; use current textcolor jsr soft80_textcolor diff --git a/libsrc/c64/soft80_kplot.s b/libsrc/c64/soft80_kplot.s index c6c6b94cc..a813fd679 100644 --- a/libsrc/c64/soft80_kplot.s +++ b/libsrc/c64/soft80_kplot.s @@ -1,6 +1,5 @@ .export soft80_kplot - .export soft80_plotinit .include "c64.inc" .include "soft80.inc" @@ -32,70 +31,30 @@ soft80_kplot: ldy CURS_X rts - ; FIXME: perhaps just include the respective tables directly? -soft80_plotinit: - ; create screen-rows base tables (bitmap) - 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+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 - + .rodata _bitmapxlo: - .repeat 80,col1 - .byte <((col1/2)*8) + .repeat 80,col + .byte <((col/2)*8) .endrepeat _bitmapxhi: .repeat 80,col .byte >((col/2)*8) .endrepeat - - .bss _vramlo: - .res 25 + .repeat 25,row + .byte <(soft80_vram+(row*40)) + .endrepeat _vramhi: - .res 25 + .repeat 25,row + .byte >(soft80_vram+(row*40)) + .endrepeat _bitmaplo: - .res 25 + .repeat 25,row + .byte <(soft80_bitmap+(row*40*8)) + .endrepeat _bitmaphi: - .res 25 + .repeat 25,row + .byte >(soft80_bitmap+(row*40*8)) + .endrepeat -- 2.39.5