Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jb10320 From: jb10320@uxa.cso.uiuc.edu (Jawaid Bazyar) Newsgroups: comp.sys.apple Subject: Re: cassette click Message-ID: <1989Oct24.000408.8164@ux1.cso.uiuc.edu> Date: 24 Oct 89 00:04:08 GMT References: <2390@eagle.wesleyan.edu> Sender: paul@ux1.cso.uiuc.edu (Paul Pomes) Reply-To: jb10320@uxa.cso.uiuc.edu (Jawaid Bazyar) Organization: University of Illinois at Urbana-Champaign Lines: 43 In article <2390@eagle.wesleyan.edu> dkonerding@eagle.wesleyan.edu writes: > > Hello, folks. I sense the UPS man approaching with my IBM clone; it's >a matter of days. I'm trying to cram all the work I always wanted to do into >about 72 hours. One thing I'm doing to trying to get a check the cassette in >byte and see if there's sound coming in,and if so, click the speaker-- in >effect, making the Apple speaker sound like whatever my tape is playing. I >know that people have taped their voices and played them back with the Apple, >the following program won't do the first job I mentioned: >LDA C060 (or whatever the cassette-in byte is) >CMP #A0 (160 seems to equal "no sound") >BNE TOP >BIT C030... all this does is click the speaker when sound is coming in, no >pitch, nothing. How can I get this to work? > > Thanks. > >-- > Remember, while having sex, always, always wear a condiment. >DKONERDING@EAGLE.WESLEYAN.EDU >DKONERDING%EAGLE@WESLEYAN.BITNET As far as I remember, only one bit in the C060 (or whatever) cassette-in port is actually functional. I assume this is the high bit (7 or 8 for those of you who prefer). What you really need to check for is something like this: LDA C060 BPL TOP BIT C030 BRA TOP In addition, you might need to put some sort of delay in this loop, as this loop executes at around 100,000 times per second, far faster than the resolution of the speaker and sound hardware on the //e. Alas, I have only a GS with no cassette port to test my ideas. -- =============================================================================== jawaid bazyar jb10320@uxa.cso.uiuc.edu Junior/Computer Engineering UIUC Seepage from deep,black,brittle experiments which failed and transformations too hard to find. "I was overcome and turned to Red." Duster's dust became the sale. Lucifer the light. A restless motion came to move and then subside. In endless knocking at the door- it's time. TYRANNY & MVTATION. TYRANNY & MVTATION.