From: mrdudz Date: Sun, 27 Sep 2015 17:34:43 +0000 (+0200) Subject: removed duplicate copy of charset and shift it at init time, saves 1k X-Git-Tag: V2.16~210^2~52 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=257183fa551bc628874913b8a89b28b3b8b4b6b8;p=cc65 removed duplicate copy of charset and shift it at init time, saves 1k --- diff --git a/libsrc/c64/soft80_charset.s b/libsrc/c64/soft80_charset.s index 5a180e233..999d199f0 100644 --- a/libsrc/c64/soft80_charset.s +++ b/libsrc/c64/soft80_charset.s @@ -1,6 +1,4 @@ -; FIXME: generate charset at runtime -soft80_lo_charset0: .byte $0f,$03,$0f,$00,$0f,$07,$05,$0e .byte $0f,$05,$0e,$0b,$0f,$0b,$0f,$0f .byte $0f,$0b,$0f,$0b,$07,$07,$0e,$00 @@ -18,7 +16,6 @@ soft80_lo_charset0: .byte $03,$0b,$03,$0b,$01,$05,$05,$05 .byte $05,$05,$01,$0b,$07,$0b,$0f,$0a -soft80_lo_charset1: .byte $0f,$03,$0f,$0f,$0f,$07,$05,$0e .byte $0f,$0a,$0e,$0b,$0f,$0b,$0f,$0f .byte $0f,$0b,$0f,$0b,$07,$07,$0e,$00 @@ -36,7 +33,6 @@ soft80_lo_charset1: .byte $05,$05,$05,$05,$0b,$05,$05,$05 .byte $05,$05,$0d,$0b,$07,$0b,$0f,$0a -soft80_lo_charset2: .byte $0f,$03,$0f,$0f,$0f,$07,$0a,$0e .byte $0f,$05,$0e,$0b,$0f,$0b,$0f,$0f .byte $0f,$0b,$0f,$0b,$07,$07,$0e,$0f @@ -54,7 +50,6 @@ soft80_lo_charset2: .byte $05,$05,$05,$07,$0b,$05,$05,$05 .byte $0b,$05,$0b,$0b,$0b,$0b,$0a,$05 -soft80_lo_charset3: .byte $09,$03,$0f,$0f,$0f,$07,$0a,$0e .byte $0f,$0a,$0e,$08,$0f,$08,$03,$0f .byte $08,$00,$00,$03,$07,$07,$0e,$0f @@ -72,7 +67,6 @@ soft80_lo_charset3: .byte $03,$05,$03,$0b,$0b,$05,$05,$01 .byte $0b,$0b,$0b,$00,$0b,$0b,$05,$05 -soft80_lo_charset4: .byte $09,$03,$00,$0f,$0f,$07,$05,$0e .byte $05,$05,$0e,$08,$0c,$08,$03,$0f .byte $08,$00,$00,$03,$07,$07,$0e,$0f @@ -90,7 +84,6 @@ soft80_lo_charset4: .byte $07,$05,$03,$0d,$0b,$05,$05,$01 .byte $0b,$0b,$0b,$00,$07,$0b,$05,$0a -soft80_lo_charset5: .byte $0f,$03,$00,$0f,$0f,$07,$05,$0e .byte $05,$0a,$0e,$0b,$0c,$0f,$0b,$0f .byte $0b,$0f,$0b,$0b,$07,$07,$0e,$0f @@ -108,7 +101,6 @@ soft80_lo_charset5: .byte $07,$0b,$05,$05,$0b,$05,$0b,$05 .byte $05,$0b,$07,$0b,$07,$0b,$05,$0a -soft80_lo_charset6: .byte $0f,$03,$00,$0f,$0f,$07,$0a,$0e .byte $0a,$05,$0e,$0b,$0c,$0f,$0b,$00 .byte $0b,$0f,$0b,$0b,$07,$07,$0e,$0f @@ -126,7 +118,6 @@ soft80_lo_charset6: .byte $07,$0d,$05,$0b,$0b,$0b,$0b,$05 .byte $05,$0b,$01,$0b,$0b,$0b,$05,$05 -soft80_lo_charset7: .byte $0f,$03,$00,$0f,$00,$07,$0a,$0e .byte $0a,$0a,$0e,$0b,$0c,$0f,$0b,$00 .byte $0b,$0f,$0b,$0b,$07,$07,$0e,$0f @@ -144,147 +135,3 @@ soft80_lo_charset7: .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f .byte $0f,$0f,$0f,$0b,$0b,$0b,$0f,$05 -soft80_hi_charset0: -.byte $f0,$30,$f0,$00,$f0,$70,$50,$e0 -.byte $f0,$50,$e0,$b0,$f0,$b0,$f0,$f0 -.byte $f0,$b0,$f0,$b0,$70,$70,$e0,$00 -.byte $00,$f0,$e0,$f0,$c0,$b0,$30,$30 -.byte $f0,$b0,$50,$50,$b0,$50,$b0,$b0 -.byte $d0,$70,$f0,$f0,$f0,$f0,$f0,$d0 -.byte $b0,$b0,$b0,$b0,$50,$10,$b0,$10 -.byte $b0,$b0,$f0,$f0,$d0,$f0,$70,$b0 -.byte $b0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$90,$70,$30,$b0,$f0 -.byte $f0,$b0,$30,$b0,$30,$10,$10,$b0 -.byte $50,$10,$90,$50,$70,$50,$50,$b0 -.byte $30,$b0,$30,$b0,$10,$50,$50,$50 -.byte $50,$50,$10,$b0,$70,$b0,$f0,$a0 - -soft80_hi_charset1: -.byte $f0,$30,$f0,$f0,$f0,$70,$50,$e0 -.byte $f0,$a0,$e0,$b0,$f0,$b0,$f0,$f0 -.byte $f0,$b0,$f0,$b0,$70,$70,$e0,$00 -.byte $00,$f0,$e0,$f0,$c0,$b0,$30,$30 -.byte $f0,$b0,$50,$50,$90,$50,$50,$b0 -.byte $b0,$b0,$50,$b0,$f0,$f0,$f0,$d0 -.byte $50,$b0,$50,$50,$50,$70,$50,$50 -.byte $50,$50,$f0,$f0,$b0,$f0,$b0,$50 -.byte $50,$f0,$70,$f0,$d0,$f0,$90,$f0 -.byte $70,$b0,$d0,$70,$30,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$b0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$b0,$70,$b0,$b0,$b0 -.byte $f0,$b0,$50,$50,$50,$70,$70,$50 -.byte $50,$b0,$d0,$50,$70,$10,$10,$50 -.byte $50,$50,$50,$50,$b0,$50,$50,$50 -.byte $50,$50,$d0,$b0,$70,$b0,$f0,$a0 - -soft80_hi_charset2: -.byte $f0,$30,$f0,$f0,$f0,$70,$a0,$e0 -.byte $f0,$50,$e0,$b0,$f0,$b0,$f0,$f0 -.byte $f0,$b0,$f0,$b0,$70,$70,$e0,$f0 -.byte $00,$f0,$d0,$f0,$c0,$b0,$30,$30 -.byte $f0,$b0,$50,$00,$70,$d0,$b0,$70 -.byte $b0,$b0,$b0,$b0,$f0,$f0,$f0,$b0 -.byte $10,$30,$d0,$d0,$50,$30,$70,$d0 -.byte $50,$50,$b0,$b0,$b0,$80,$b0,$d0 -.byte $10,$b0,$70,$90,$d0,$b0,$b0,$90 -.byte $70,$f0,$f0,$70,$b0,$50,$30,$b0 -.byte $30,$90,$30,$90,$10,$50,$50,$50 -.byte $50,$50,$10,$b0,$b0,$b0,$50,$b0 -.byte $f0,$50,$50,$70,$50,$70,$70,$70 -.byte $50,$b0,$d0,$30,$70,$10,$10,$50 -.byte $50,$50,$50,$70,$b0,$50,$50,$50 -.byte $b0,$50,$b0,$b0,$b0,$b0,$a0,$50 - -soft80_hi_charset3: -.byte $90,$30,$f0,$f0,$f0,$70,$a0,$e0 -.byte $f0,$a0,$e0,$80,$f0,$80,$30,$f0 -.byte $80,$00,$00,$30,$70,$70,$e0,$f0 -.byte $f0,$f0,$50,$f0,$c0,$30,$30,$30 -.byte $f0,$b0,$f0,$50,$b0,$b0,$b0,$f0 -.byte $b0,$b0,$10,$10,$f0,$10,$f0,$b0 -.byte $50,$b0,$b0,$b0,$10,$d0,$30,$b0 -.byte $b0,$90,$f0,$f0,$70,$f0,$d0,$b0 -.byte $10,$d0,$30,$70,$90,$50,$10,$50 -.byte $30,$30,$d0,$50,$b0,$10,$50,$50 -.byte $50,$50,$50,$70,$b0,$50,$50,$50 -.byte $50,$50,$d0,$b0,$b0,$b0,$50,$00 -.byte $00,$10,$30,$70,$50,$30,$30,$10 -.byte $10,$b0,$d0,$30,$70,$50,$10,$50 -.byte $30,$50,$30,$b0,$b0,$50,$50,$10 -.byte $b0,$b0,$b0,$00,$b0,$b0,$50,$50 - -soft80_hi_charset4: -.byte $90,$30,$00,$f0,$f0,$70,$50,$e0 -.byte $50,$50,$e0,$80,$c0,$80,$30,$f0 -.byte $80,$00,$00,$30,$70,$70,$e0,$f0 -.byte $f0,$f0,$30,$30,$f0,$30,$f0,$c0 -.byte $f0,$f0,$f0,$00,$d0,$70,$40,$f0 -.byte $b0,$b0,$b0,$b0,$f0,$f0,$f0,$b0 -.byte $50,$b0,$70,$d0,$d0,$d0,$50,$b0 -.byte $50,$d0,$f0,$f0,$b0,$80,$b0,$b0 -.byte $70,$90,$50,$70,$50,$10,$b0,$50 -.byte $50,$b0,$d0,$30,$b0,$10,$50,$50 -.byte $50,$50,$70,$b0,$b0,$50,$50,$10 -.byte $b0,$50,$b0,$b0,$b0,$b0,$f0,$00 -.byte $00,$50,$50,$70,$50,$70,$70,$50 -.byte $50,$b0,$d0,$30,$70,$50,$10,$50 -.byte $70,$50,$30,$d0,$b0,$50,$50,$10 -.byte $b0,$b0,$b0,$00,$70,$b0,$50,$a0 - -soft80_hi_charset5: -.byte $f0,$30,$00,$f0,$f0,$70,$50,$e0 -.byte $50,$a0,$e0,$b0,$c0,$f0,$b0,$f0 -.byte $b0,$f0,$b0,$b0,$70,$70,$e0,$f0 -.byte $f0,$00,$30,$30,$f0,$f0,$f0,$c0 -.byte $f0,$f0,$f0,$50,$30,$50,$50,$f0 -.byte $b0,$b0,$50,$b0,$b0,$f0,$b0,$70 -.byte $50,$b0,$70,$50,$d0,$50,$50,$b0 -.byte $50,$50,$b0,$b0,$b0,$f0,$b0,$f0 -.byte $50,$50,$50,$70,$50,$70,$b0,$90 -.byte $50,$b0,$d0,$50,$b0,$50,$50,$50 -.byte $30,$90,$70,$d0,$b0,$50,$b0,$10 -.byte $50,$90,$70,$b0,$d0,$b0,$f0,$b0 -.byte $f0,$50,$50,$50,$50,$70,$70,$50 -.byte $50,$b0,$50,$50,$70,$50,$50,$50 -.byte $70,$b0,$50,$50,$b0,$50,$b0,$50 -.byte $50,$b0,$70,$b0,$70,$b0,$50,$a0 - -soft80_hi_charset6: -.byte $f0,$30,$00,$f0,$f0,$70,$a0,$e0 -.byte $a0,$50,$e0,$b0,$c0,$f0,$b0,$00 -.byte $b0,$f0,$b0,$b0,$70,$70,$e0,$f0 -.byte $f0,$00,$70,$30,$f0,$f0,$f0,$c0 -.byte $f0,$b0,$f0,$50,$b0,$50,$80,$f0 -.byte $d0,$70,$f0,$f0,$b0,$f0,$b0,$70 -.byte $b0,$10,$10,$b0,$d0,$b0,$b0,$b0 -.byte $b0,$b0,$f0,$b0,$d0,$f0,$70,$b0 -.byte $b0,$90,$30,$90,$90,$90,$b0,$d0 -.byte $50,$10,$d0,$50,$10,$50,$50,$b0 -.byte $70,$d0,$70,$30,$d0,$90,$b0,$50 -.byte $50,$d0,$10,$90,$d0,$30,$f0,$b0 -.byte $f0,$50,$30,$b0,$30,$10,$70,$b0 -.byte $50,$10,$b0,$50,$10,$50,$50,$b0 -.byte $70,$d0,$50,$b0,$b0,$b0,$b0,$50 -.byte $50,$b0,$10,$b0,$b0,$b0,$50,$50 - -soft80_hi_charset7: -.byte $f0,$30,$00,$f0,$00,$70,$a0,$e0 -.byte $a0,$a0,$e0,$b0,$c0,$f0,$b0,$00 -.byte $b0,$f0,$b0,$b0,$70,$70,$e0,$f0 -.byte $f0,$00,$f0,$30,$f0,$f0,$f0,$c0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$70,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$70,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$30 -.byte $f0,$f0,$30,$f0,$f0,$f0,$f0,$f0 -.byte $70,$d0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$30,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0 -.byte $f0,$f0,$f0,$b0,$b0,$b0,$f0,$50 - diff --git a/libsrc/c64/soft80_chline.s b/libsrc/c64/soft80_chline.s index de6ab7637..ac9d123d3 100644 --- a/libsrc/c64/soft80_chline.s +++ b/libsrc/c64/soft80_chline.s @@ -17,7 +17,7 @@ soft80_chline: cmp #0 ; Is the length zero? beq L9 ; Jump if done sta tmp1 -L1: lda #96 ; Horizontal line, screen code +L1: lda #96 ; Horizontal line, petscii code jsr soft80_cputdirect ; Direct output dec tmp1 bne L1 diff --git a/libsrc/c64/soft80_conio.s b/libsrc/c64/soft80_conio.s index 199ac3584..fd2d7fd4d 100644 --- a/libsrc/c64/soft80_conio.s +++ b/libsrc/c64/soft80_conio.s @@ -8,6 +8,8 @@ .import soft80_kclrscr .import soft80_textcolor, soft80_bgcolor + .importzp ptr1, ptr2, ptr3 + .include "c64.inc" .include "soft80.inc" @@ -28,22 +30,36 @@ soft80_init: lda #$34 sta $01 - lda #>soft80_lo_charset0 - sta @hi1+2 - lda #>$d000 - sta @hi2+2 + lda #>soft80_charset + sta ptr1+1 + lda #soft80_lo_charset + sta ptr2+1 + lda #soft80_hi_charset + sta ptr3+1 + lda #