Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .var picture = LoadBinary("picture.kla", BF_KOALA)
- .var music = LoadSid("music.sid")
- .pc = $0801 "Basic UpStart"
- basic:
- :BasicUpstart2(start)
- .pc = * "Entrypoint"
- start:
- jsr $ff81 // initialise VIC and screen editor
- jsr $ff84 // initialise SID, CIA and IRQ
- jsr $ff8a // initialise I/O vectors
- lda #$00
- jsr music.init // initialise music
- // copy the color screen to $d800-$dbff (actually $d800-$dbf7 is used)
- ldx #$00
- copycolors: lda color,x
- sta $d800,x
- lda color+$100,x
- sta $d800+$100,x
- lda color+$200,x
- sta $d800+$200,x
- lda color+$300,x
- sta $d800+$300,x
- dex
- bne copycolors
- lda backg // set background and border color
- sta $d020
- sta $d021
- lda #%00111011 // enable bitmap mode (bit #5)
- sta $d011
- lda #%00111000 // point screen memory to $0c00, bitmap memory to $2000
- sta $d018
- lda #11011000 // enable multicolor
- sta $d016
- // wait until raster is at $ff, then play music and repeat waiting
- repeat: lda #$ff
- rasternotff: cmp $d012
- bne rasternotff
- jsr music.play
- jmp repeat
- .pc=music.location "Music"
- .fill music.size, music.getData(i)
- .pc = $2000 "Bitmap data"
- bitmap: .fill picture.getBitmapSize(), picture.getBitmap(i)
- .pc = * "Bitmap Color data"
- color: .fill picture.getColorRamSize(), picture.getColorRam(i)
- .pc = * "Bitmap background color"
- backg: .byte picture.getBackgroundColor()
- .pc = $0c00 "Bitmap Screen data"
- screen: .fill picture.getScreenRamSize(), picture.getScreenRam(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement