Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .macro ChrFile File, Address
- .word Address
- .local Start
- .local End
- .byt (End-Start)/128+1
- Start:
- .incbin File
- End:
- .endmacro
- .proc DecompressCHR
- ChunksLeft = 3
- ; write pointer to info
- sta 0
- sty 1
- ldy #2
- lda (0),y
- sta ChunksLeft
- .repeat 2 ; write both parts of address
- dey
- lda (0),y
- sta PPUADDR
- .endrep
- ; move pointer to the actual data
- lda 0
- add #3
- sta ciSrc+0
- lda 1
- adc #0
- sta ciSrc+1
- lda #0
- sta ciBufStart
- lda #128
- sta ciBufEnd
- ChunksLoop:
- jsr unpb53_some
- ldx #0
- : lda PB53_outbuf,x
- sta PPUDATA
- inx
- cpx #128
- bne :-
- dec ChunksLeft
- bne ChunksLoop
- rts
- .endproc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement