[comp.sys.amiga.tech] Bypassing the Audio Filter

L98CC@CUNYVM (07/14/90)

Hello!
   I want to write a program to turn off the hi-frequency filter on A500.
I do know that setting a certain bit in certain address will turn it off.
What is that address and bit?  But even better, is there a system call I can
make to do it?  If there is a system call, in DOS 1.3, which library is it in
and what is the vector offset?  Please E-mail the responses.  I will summerize
it and post.  Also more info you provide, the better. :-)

Thank you.
-------
????????? | SH941727%CCNYVME.BITNET@CUNYVM.CUNY.EDU
?       ? |        OR
?   !   ? | JW Bahk ( a.k.a  Lupin IV )
?       ? | P.O. Box 251
????????? | Flushing, NY  11352-0251

jcs@crash.cts.com (John Schultz) (07/15/90)

In article <90195.001845L98CC@CUNYVM.BITNET> L98CC@CUNYVM writes:
>Hello!
>   I want to write a program to turn off the hi-frequency filter on A500.
>I do know that setting a certain bit in certain address will turn it off.
>What is that address and bit?  But even better, is there a system call I can
  
  The address is hex BFE001. In assembly:

     bclr.b   #1,$BFE001   ; turns filter off (dims LED)

     bset.b   #1,$BFE001   ; turns on ...


  In C:

  unsigned char * filter = (unsigned char *)0xBFE001;

     *filter = (*filter) & 0xfe; /* Turn off */

     *filter = (*filter) | 1;    /* Turn on */
   


  John
 

alex@bilver.UUCP (Alex Matulich) (07/21/90)

In article <3519@crash.cts.com> jcs@crash.cts.com (John Schultz) writes:
>In article <90195.001845L98CC@CUNYVM.BITNET> L98CC@CUNYVM writes:
>>   I want to write a program to turn off the hi-frequency filter on A500.
>>I do know that setting a certain bit in certain address will turn it off.
>>What is that address and bit?  But even better, is there a system call I can
>
>  In C:
>  unsigned char * filter = (unsigned char *)0xBFE001;
>     *filter = (*filter) & 0xfe; /* Turn off */
>     *filter = (*filter) | 1;    /* Turn on */

No, NO!  You only need to switch the second bit!

For example, to toggle the bit on and off, you would say,

*filter ^= 2;

You shouldn't mess with the other bits... you don't know what they
might be for!


-- 
     ///  Alex Matulich
    ///  Unicorn Research Corp, 4621 N Landmark Dr, Orlando, FL 32817
\\\///  alex@bilver.UUCP    ...uunet!tarpit!bilver!alex
 \XX/  From BitNet try: IN%"bilver!alex@uunet.uu.net"

jcs@crash.cts.com (John Schultz) (07/25/90)

In article <826@bilver.UUCP> alex@bilver.UUCP (Alex Matulich) writes:
>In article <3519@crash.cts.com> jcs@crash.cts.com (John Schultz) writes:
>>In article <90195.001845L98CC@CUNYVM.BITNET> L98CC@CUNYVM writes:
>>>   I want to write a program to turn off the hi-frequency filter on A500.
>>>I do know that setting a certain bit in certain address will turn it off.
>>>What is that address and bit?  But even better, is there a system call I can
>>
>>  In C:
>>  unsigned char * filter = (unsigned char *)0xBFE001;
>>     *filter = (*filter) & 0xfe; /* Turn off */
>>     *filter = (*filter) | 1;    /* Turn on */
>
>No, NO!  You only need to switch the second bit!
>
>For example, to toggle the bit on and off, you would say,
>
>*filter ^= 2;

  Whoops. Looks like I goofed the translation from assembly to C. Good eye,
Alex. The above example only changes one bit, albeit the wrong bit. Should
read:

  *filter = (*filter) & 0xfd; /* Turn off */
  *filter = (*filter) | 2;    /* Turn on */

  Toggling will work as well, but the prior state cannot be guaranteed, so
explicit on/off is best.