Please consider updating player program listing in wiki
SteveGuidi opened this issue · 3 comments
The player program listing from the "Anleitung zur SID‐Karte" wiki page has a couple of problems:
- Memory addresses for op codes bytes and assembly instruction are ambiguous (Interrupt-Routine)
. 3038 20 cd cd jsr $cecd ;TED-Sound bearbeiten
. 303b 4c be fc jmp $fcc3 ;Interrupt beenden (2)
The correct address is the one listed in the assembly instruction, not the op code. Note: The original PDF documentation for the SidCard project has the same error.
- Missing
Y
register for memory offset in theSTA
instruction (Musik Beenden)
. 3084 99 40 fd sta $fd40, ;...löschen =
This should read sta $fd40,y
Finally, the player program distributed with the SidCard d64 disks is slightly different and corrects a couple of music play/stop issues. Perhaps you can add it to the wiki, or note that code on the current page is a copy of the original documentation (with errors) and has since been updated.
Here is a listing of the updated player subroutines:
Music initialization
. 3000 a9 00 lda #$00
. 3002 78 sei
. 3003 8d 3f ff sta $ff3f
. 3006 20 00 10 jsr $1000
. 3009 a9 18 lda #$18
. 300b a0 30 ldy #$30
. 300d 8d 14 03 sta $0314
. 3010 8c 15 03 sty $0315
. 3013 8d 3e ff sta $ff3e
. 3016 58 cli
. 3017 60 rts
Interrupt routine (music playback)
. 3018 ad 09 ff lda $ff09
. 301b 8d 09 ff sta $ff09
. 301e 8d 3f ff sta $ff3f
. 3021 20 03 10 jsr $1003
. 3024 a0 18 ldy #$18
. 3026 b9 00 d4 lda $d400,y
. 3029 99 40 fd sta $fd40,y
. 302c 88 dey
. 302d 10 f7 bpl $3026
. 302f 8d 3e ff sta $ff3e
. 3032 20 bf cf jsr $cfbf
. 3035 20 cd ce jsr $cecd
. 3038 20 11 db jsr $db11
. 303b 4c be fc jmp $fcbe
Stop playback
. 3070 78 sei
. 3071 a9 0e lda #$0e
. 3073 a0 ce ldy #$ce
. 3075 8d 14 03 sta $0314
. 3078 8c 15 03 sty $0315
. 307b 58 cli
. 307c a0 18 ldy #$18
. 307e a9 00 lda #$00
. 3080 99 40 fd sta $fd40,y
. 3083 88 dey
. 3084 10 fa bpl $3080
. 3086 60 rts
Hi @SteveGuidi, thanks a lot for your corrections! I have removed editing restrictions from the wiki, could you please apply the modifications yourself? I'm afraid I would still miss something!
This was still a work in progress BTW, when I have time I would like to translate the docs to English, but I guess it'd be better to do that once everything looks correct!
Wiki changes committed: https://github.com/SukkoPera/ReSeed/wiki/Anleitung-zur-SID%E2%80%90Karte/_history.
Great job, thanks a lot!