30 Ağustos 2014 Cumartesi

Load and Display Koala PIC format in C64 Assembler


Koala PIC Format

Koala Painter Values:
Bitmap = $2000-$3f3f
Video = $3f40-$4327
Color = $4328-$470f
Background = $4710



; koala pic viewer for C64
; (c) 2014 Aug 30
; Coded by emarti, Murat Özdemir

*=$0900        

VIDEO      = $3F40
COLOR      = $4328
BACKGROUND = $4710

        JSR $E544       ; CLEAR SCREEN

        LDA #$00
        STA $D020       ; BORDERCOLOUR

        LDA BACKGROUND        
        STA $D021       ; BACKGROUNDCOLOUR

        LDA #$3B        ; bitmap mode on
        STA $D011

        LDA #$18        
        STA $D018       ; set bitmap address($2000) and screen($0400) 
        STA $D016       ; multi color on

        LDA #$03        ; set vic bank
        STA $DD00
        
        LDA #$40        ; set video ram
        STA $FB
        LDA #$3F
        STA $FC
        LDA #$04
        STA $FE
        LDA #$08
        STA VALBYTE
        JSR SET
        
        LDA #$28        ; set color ram
        STA $FB
        LDA #$43
        STA $FC
        LDA #$D8
        STA $FE
        LDA #$DC
        STA VALBYTE
        JSR SET

XXX     JMP XXX

; function move bytes
VALBYTE  BYTE $00

SET     LDY #$00
L1      LDA ($FB),Y
        STA ($FD),Y
        INY
        BNE L1
        INC $FC
        INC $FE
        LDX $FE
        CPX VALBYTE
        BNE L1
        RTS


Ne Mutlu Türküm Diyene!

Hiç yorum yok: