Last Updated or created 2023-08-02
Started with a example from https://codebase64.org/
But that didn´t work (see movie clip)
looking at the sid info:
Title Bottom Author Richard Bayliss Released 2011 The New Dimension Load Address $8000 Init Address $8000 Play Address $8003 Number of tunes 1 Default tune 1 Speed $00000000 SID Model 8580 Clock PAL File Format PSID Format Version 2 BASIC false PlaySID Specific false
I saw that I have to move the load/init/play address.
Luckily there is sidreloc !
wget https://hd0.linusakesson.net/files/sidreloc-1.0.tgz tar xzvf sidreloc* cd sidreloc make
~/Downloads/sidreloc-1.0/sidreloc -p 10 ~/projects/sidplaybottomdemo/bottom.sid ~/projects/sidplaybottomdemo/bottom1000.sid
I could successfully move the sid to $1000
Final code (for now, next time i’ll add a picture).
(Using ACME as compiler, and X64 (vice as emulator))
;https://codebase64.org/doku.php?id=base:simple_irq_music_player !to "bottom.prg",cbm * = $0801 sysline: !byte $0b,$08,$01,$00,$9e,$32,$30,$36,$31,$00,$00,$00 ;= SYS 2061 * = $080d sei lda #<irq ldx #>irq sta $314 stx $315 lda #$1b ldx #$00 ldy #$7f sta $d011 stx $d012 sty $dc0d lda #$01 sta $d01a sta $d019 ; ACK any raster IRQs lda #$00 jsr $1000 cli hold jmp hold ; we could also RTS here, when also changing $ea81 to $ea31 irq lda #$01 sta $d019 ; ACK any raster IRQs jsr $1003 ;Play the music jmp $ea31 * = $1000 !binary "bottom1000.sid" ,, $7c+2