tomp@pro-micol.cts.com (Tom Peng) (12/01/90)
Here is a question: After witnessing GS playing music at the background, my adventurous mind began to seek possibilities to create a music player for the 8-bits Apple IIs that will play beep and buzz at the background like the GS. After a bit reading, I came to the conclusion that the only way to do this is through some sort of multitasking using an interrupt such as the VBL. It would be easy to do with the GS since it has an vector which points to the subroutine that you want to call when VBL is on. However, I was unable to find a vector that the Apple IIs use for its VBL interrupt. As I recall, the Apple II mouse uses VBL interrupt to update its stats, so perhaps there is a VBL vector for the Apple II as well? Hmmm... I just want to write a music player, now I probably have to write a full-blown multitasking application? Hmmm... anyone can help? ---------------------------------------------- Tom Peng U. of Toronto Mechanical Engineering InterNet: tomp@pro-micol.cts.com cindy@pnet91.cts.com "Let's rewrite the Canadian constitution!!!" ----------------------------------------------
toddpw@nntp-server.caltech.edu (Todd P. Whitesel) (12/01/90)
8 bit II's don't have a VBL interrupt vector. The official way to do it is to add an interrupt handler to Prodos 8 that services VBL's. For music, VBL isn't going to do you any good. Since the speaker output is a flip flop (or equivalent), the sound is not going to change unless the CPU is doing it -- i.e. music takes an ungodly percentage of the CPU and is too inconvenient to do with interrupts. This is why we bought MockingBoards. The Mockingboard has two programmable sound generators and plenty of interrupt and timing facilities. The GS uses the sound chip for all of that, which means that one of the voices is used to provide a tempo interrupt, and the others sit there pumping out sound while the computer goes about its merry business. Todd Whitesel toddpw @ tybalt.caltech.edu
cindy@pnet91.cts.com (Tom Peng) (12/16/90)
Thanks for the various reply on the VBL interrupt on 8-bits Apple IIs. However, I would like to know if there is any other interrupts that can be used to create a background music player. Does clock cards generate an interrupt that can be trapped so that periodically, the 6502 will jump to the music player and click the speaker before passing control back to whatever it was doing... What I am saying is that, any ideas as to how I should approach to a background music player program on an 8 bits Apple II? As most people agreed, some sort of multitasking mechanism is required, but am I stuck with using the VBL? Is VBL trappable on the II? Is so, how? Is there any 'better' interrupt to use? Thanks in advance for all the replies. I am seriously devouted in getting something like this completed. -------------------------------------------- Tom Peng University of Toronto Mechanical Engineering Email: tomp@pro-micol.cts.com cindy@pnet91.cts.com "Rewrite the Canadian constitution!!" -------------------------------------------- UUCP: torag!pnet91!cindy INET: cindy@pnet91.cts.com