home/david/8bit/sid_system/banksw.s650100664000076400007640000000142507072454065016740 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: banksw.s65 ; ; Function: Provides functions to facilitate bank-switching ; for intra-ROM calls. ; ; Notes: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "BANKSW", absolute .include "banksw.i65" home/david/8bit/sid_system/header.s650100664000076400007640000000316207072660003016672 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: header.s65 ; ; Function: Supplies the required header info that the ; Atari OS PBI extensions need. Also, the SID System ; jump table is available from this file. ; ; Notes: This segment *must* load first. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "HEADER", absolute .include "header.i65" .include "pbiiocb.i65" .include "pbiint.i65" ; ; Definitions ; PBI_CHECKSUM = $0000 ; To be calculated later ; ; PBI Header Data ; .word PBI_CHECKSUM ; Checksum will be computed some other time .byte $10 ; ROM Revision 1.0a1 .byte $80 ; ID Number ($80 I guess) .byte $00 ; Device type (no idea) jmp PBI_IOVEC ; I/O Vector jmp PBI_INTVEC ; PBI IRQ Vector .byte $91 ; Anther ID number ($91) .byte "A" ; Device name is "A" for Audio .word PBI_OPEN-1 ; IOCB Open vector .word PBI_CLOSE-1 ; IOCB Close vector .word PBI_GETBYTE-1 ; IOCB Get byte vector .word PBI_PUTBYTE-1 ; IOCB Put byte vector .word PBI_STATUS-1 ; IOCB Status vector .word PBI_SPECIAL-1 ; IOCB Special vector jmp PBI_INIT ; PBI Initialization .byte $00 ; Reserved home/david/8bit/sid_system/jumptab.s650100664000076400007640000000210407072665700017110 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: jumptab.s65 ; ; Function: Jump table for calling intra-ROM functions. ; ; Notes: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "JUMPTAB", absolute .include "jumptab.i65" .include "sndalloc.i65" .include "sidctl.i65" S_SIDALLOC: jmp sidalloc ; Global SID allocation vector S_SIDFREE: jmp sidfree ; Global SID free vector S_VOICEALLOC: jmp voicealloc ; Global voice allocation vector S_VOICEFREE: jmp voicefree ; Global voice free vector S_SIDRESETALL: jmp sidresetall ; Reset all SID devices home/david/8bit/sid_system/pbiint.s650100664000076400007640000000142507075173260016736 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: pbiint.s65 ; ; Function: PBI Interrupt handling system ; ; Notes: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "PBIINT", absolute .include "pbiint.i65" PBI_INTVEC: rts ; Not yet implemented home/david/8bit/sid_system/pbiiocb.s650100664000076400007640000000215007072425117017052 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: pbiiocb.s65 ; ; Function: IOCB functions for sending MIDI data to the ; SID System. ; ; Notes: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "PBIIOCB", absolute .include "pbiiocb.i65" PBI_IOVEC: rts ; Don't know what this is for PBI_OPEN: rts ; Not yet implemented PBI_CLOSE: rts ; Not yet implemented PBI_GETBYTE: rts ; Not yet implemented PBI_PUTBYTE: rts ; Not yet implemented PBI_STATUS: rts ; Not yet implemented PBI_SPECIAL: rts ; Not yet implemented PBI_INIT: rts ; Not yet implemented home/david/8bit/sid_system/sidctl.s650100664000076400007640000000216707072665444016746 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: sidctl.s65 ; ; Function: Miscellaneous SID control features. ; ; Notes: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "SIDCTL", absolute .include "sidctl.i65" .include "sidreg.i65" sidresetall: ldx #00 _loop: tax lda #VCTL_TEST sta SID+V1+Control,X sta SID+V2+Control,X sta SID+V3+Control,X lda #$00 sta SID+V1+FreqLo,X sta SID+V1+FreqHi,X sta SID+V1+Control,X sta SID+V2+FreqLo,X sta SID+V2+FreqHi,X sta SID+V2+Control,X sta SID+V3+FreqLo,X sta SID+V3+FreqHi,X sta SID+V3+Control,X txa adc #$20 bcc _loop rts home/david/8bit/sid_system/sndalloc.s650100664000076400007640000000243507072451333017247 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: sndalloc.s65 ; ; Function: Functions for allocating and freeing SID voices ; and SID chips. ; ; Notes: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "SNDALLOC", absolute .include "sndalloc.i65" ; ; function: sidalloc ; ; description: allocates a SID chip for use. ; ; returns: X register has a pointer (relative to $D100) that ; refers to the SID. Carry is clear for OK, set for error. ; sidalloc: rts ; Not yet implemented ; ; function: voicealloc ; ; description: allocates a single voice for use. ; ; returns: X register has a pointer (relative to $D100) that ; refers to the voice. Carry is clear for OK, set for error. ; voicealloc: rts ; Not yet implemented sidfree: rts voicefree: rts home/david/8bit/sid_system/timer.s650100664000076400007640000000127007075173301016563 0ustar daviddavid;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; SID System for Atari 16K Control ROM source ;; ;; ;; ;; Release 1.0a1 ;; ;; ;; ;; (C) 2000 By David M Lloyd ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Filename: ; ; Function: ; ; Notes: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .segment "", absolute .include ".i65" home/david/8bit/sid_system/banksw.o650100664000076400007640000000030307075173216016725 0ustar daviddavidUzna8L'sJ ca65 V2.4.0@85X8 banksw.s65S8 banksw.i65CODERODATABSSDATAZEROPAGEBANKSWhome/david/8bit/sid_system/header.o650100664000076400007640000000107207075173216016674 0ustar daviddavidUzna8LN8 ca65 V2.4.0@8`8r header.s65`8 header.i65+8d pbiiocb.i65)8 pbiint.i65CODERODATABSSDATAZEROPAGEHEADERL( *L+ +A/ 1 2 3 4 5 6L8 8: PBI_INTVEC PBI_INIT  PBI_SPECIAL  PBI_STATUS  PBI_PUTBYTE  PBI_GETBYTE  PBI_CLOSE PBI_OPEN  PBI_IOVEC  PBI_CHECKSUM home/david/8bit/sid_system/jumptab.o650100664000076400007640000000101707075173216017105 0ustar daviddavidUzna8LQ=R~  ca65 V2.4.0@8k8D jumptab.s65k8D jumptab.i65R8  sndalloc.i65Dk8 sidctl.i65CODERODATABSSDATAZEROPAGEJUMPTABL L L L L! ! sidresetall  voicefree sidfree  voicealloc sidalloc  S_SIDRESETALL   S_VOICEFREE   S_VOICEALLOC  S_SIDFREE  S_SIDALLOC home/david/8bit/sid_system/pbiint.o650100664000076400007640000000033607075173216016733 0ustar daviddavidUzna8L'sR ca65 V2.4.0@8)8 pbiint.s65)8 pbiint.i65CODERODATABSSDATAZEROPAGEPBIINT` PBI_INTVEC home/david/8bit/sid_system/pbiiocb.o650100664000076400007640000000062407075173216017055 0ustar daviddavidUzna8L)uZ ca65 V2.4.0@8O*8h pbiiocb.s65+8d pbiiocb.i65CODERODATABSSDATAZEROPAGEPBIIOCB````````*PBI_INIT  PBI_SPECIAL  PBI_STATUS  PBI_PUTBYTE  PBI_GETBYTE  PBI_CLOSE PBI_OPEN  PBI_IOVEC home/david/8bit/sid_system/sidctl.o650100664000076400007640000000044207075173216016726 0ustar daviddavidUzna8L:   ca65 V2.4.0@8$k8w sidctl.s65Dk8 sidctl.i65~8O sidreg.i65CODERODATABSSDATAZEROPAGESIDCTL11ѝ ѝѩѝѝѝѝѝ ѝѝѝъi `+ sidresetall home/david/8bit/sid_system/sndalloc.o650100664000076400007640000000045407075173216017246 0ustar daviddavidUzna8L+wWZ* ca65 V2.4.0@8R8 sndalloc.s65R8  sndalloc.i65CODERODATABSSDATAZEROPAGESNDALLOC````# voicefree sidfree  voicealloc sidalloc home/david/8bit/sid_system/Makefile0100664000076400007640000000104307075173314016546 0ustar daviddavid# # Makefile for SID system Hardware # # OBJECTS = header.o65 pbiiocb.o65 pbiint.o65 sndalloc.o65 banksw.o65 jumptab.o65 sidctl.o65 timer.o65 all: sidrom.rom clean: rm -f *.o65 sidrom.rom sidrom.map # # Individual Additional Object dependencies # header.o65: pbiiocb.i65 pbiint.i65 jumptab.o65: sndalloc.i65 sidctl.i65 sidctl.o65: sidreg.i65 # # Global object definitions # $(OBJECTS): %.o65: %.i65 $(OBJECTS): %.o65: %.s65 ca65 -o $@ $< sidrom.rom: $(OBJECTS) sidrom.cfg ld65 -vm -C sidrom.cfg -m sidrom.map -o sidrom.rom $(OBJECTS) home/david/8bit/sid_system/sidrom.cfg0100664000076400007640000000326007072665555017101 0ustar daviddavid# # SID System ROM linker config file. # MEMORY { BANK0: start = $0D800, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK1: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK2: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK3: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK4: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK5: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK6: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK7: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK8: start = $0D800, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK9: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK10: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK11: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK12: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK13: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK14: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; BANK15: start = $0DC00, size = $0400, type = ro, file = %O, fill = yes, fillval = 0; RAM: start = $D500, size = $0200; } SEGMENTS { HEADER: load = BANK0, type = ro; JUMPTAB: load = BANK0, type = ro; PBIIOCB: load = BANK0, type = ro; PBIINT: load = BANK0, type = ro; SNDALLOC: load = BANK0, type = ro; SIDCTL: load = BANK0, type = ro; # RAM: load = RAM, type = bss; }