Filter.shell

Embed Size (px)

Citation preview

  • 8/12/2019 Filter.shell

    1/4

    Short: Create AF Filter Commands Using AMIGA(D)OS.Author: [email protected] (Barry Walker)Uploader: [email protected] (Barry Walker)Type: dev/srcVersion: 0.00.10Architecture: generic; m68k-amigaos

    Distribution: Public Domain, Emailware.

    ============================================================================

    Architectures: Classic AMIGAs and WinUAE.-----------------------------------------

    MINIMUM Requirements Are:- --------------------------

    68EC020 CPU and 2MB RAM total, example, a standard A1200(HD). WinUAE Version 1.5.3 minimum.

    Standard OS3.0x install or better.

    ----------------------------------------------------------------------------

    History.

    --------

    06-03-2013.Version 0.00.10:- Original upload to AMINET...

    ----------------------------------------------------------------------------

    Just download The Filter.shell.txt file, edit it as explained below, andthen see how to create two real AMIGA commands that turn the Audio Filter onOR off. To run the script just rename to Filter.shell and execute it in thenormal way. The binaries created are saved to the T: volume.

    ----------------------------------------------------------------------------

    The DEMO assembly code that would be compiled and converted.Call the code AMIGA_Filter.asm...From a CLI and using the a68k and blink from AMINET:-

    Prompt> a68k AMIGA_Filter.asmSome reports here...Prompt> blink AMIGA_Filter.oSome reports here...

    This code is TOTALLY, even address, position independent.

    start:

    ;Assembler source to switch the ;audio filter and power light to ON. ;Compiled under a68k and linked under blink. ;A68k AMIGA_Filter ; ;blink AMIGA_Filter.o ; move.b #252,$BFE001 ;Set audio filter to bootup default condition ON. ;Decimal 252 sets the filter to ON and

  • 8/12/2019 Filter.shell

    2/4

    ;decimal 254 sets the filter to OFF. clr.l d0 ;Set return code as OK. rts ;Exit program. end ;End...

    ----------------------------------------------------------------------------

    The text HEX file to be edited for the shell script:-

    Prompt> Type HEX AMIGA_Filter > AMIGA_Filter.hex

    Gives a text file "AMIGA_Filter.hex" that has the contents:-

    0000: 000003F3 00000000 00000001 00000000 ................0010: 00000000 00000003 000003E9 00000003 ................0020: 13FC00FC 00BFE001 42804E75 000003F2 ........B.Nu....

    ----------------------------------------------------------------------------

    This is just a DEMO showing how to "bang the metal" by the back door usinga shell script to create two executable commands to turn the Audio Filter onand off.

    It goes without saying that by generating the necessary assembly code, DMA

    to the hardware is easily possible in Classic AMIGAs. This method could justas easily access the Parallel, Serial, Games and Disk Drive ports withcareful pseudo-HEX string manipulation within the limits of the shell "ECHO"command. And believe me, the "ECHO" command is seriously limited... ;oO

    Enjoy finding simple solutions to often very difficult problems... ;o)

    ----------------------------------------------------------------------------

    IMPORTANT NOTE:-----------------

    This ReadMe file and the text download file are absolutely identical.

    You will have to edit to extract the script from the ";" line below to theidentical line at the end of the script to be able to run it.MEmacs is your friend here...;; Filter.shell;; This is just a DEMO showing how to "bang the metal" by the back door using; a shell script to create two executable commands to turn the Audio Filter on; and off. See the "Filter.shell.readme" file for more information.;; It goes without saying that by generating the necessary assembly code, DMA; to the hardware is easily possible in Classic AMIGAs. This method could just; as easily access the Parallel, Serial, Games and Disk Drive ports with

    ; careful pseudo-HEX string manipulation within the limits of the shell "ECHO"; command. And believe me, the "ECHO" command is seriously limited... ;oO;; Enjoy finding simple solutions to often very difficult problems... ;o);; $VER: Filter.shell_Version_0.00.10_Public_Domain_2013_B.Walker_G0LCU.;; Allocate _variables_.ECHO "*ec*nGenerate two simple execuable commands inside the T: volume...*n"ECHO "These are FilterOff and FilterOn and switch the audio filter off or on...*

  • 8/12/2019 Filter.shell

    3/4

    n"ECHO "Please wait...*n"SETENV binary ""SETENV store ""SETENV count 1SETENV filterstart "000003F30000000000000001000000000000000000000003000003E90000000313FC00"SETENV off "FE"SETENV on "FC"SETENV filterend "00BFE00142804E75000003F2"SETENV filteroff $filterstart$off$filterendSETENV filteron $filterstart$on$filterend;; Generate the audio filter OFF binary...LAB filteroffloop; Once built quit the loop.IF $count GT 95 SKIP gotonextENDIF; The working loop to create the binary...ECHO $filteroff FIRST $count LEN 2 NOLINE > ENV:storeEVAL 0x$store LFORMAT %C >> ENV:binaryEVAL $count + 2 LFORMAT %N TO ENV:countSKIP BACK filteroffloop

    ; Enable the binary as an executable...LAB gotonextCOPY ENV:binary T:FilterOffPROTECT T:FilterOff +rwed; Reset the _variables_ for the audio filter ON binary.SETENV binary ""SETENV store ""SETENV count 1; Generate the audio filter ON binary...; This is exactly the same proceedure as before except changing the control byte...LAB filteronloop; Once built quit the loop.

    IF $count GT 95 SKIP getoutENDIF; The working loop to create the binary...ECHO $filteron FIRST $count LEN 2 NOLINE > ENV:storeEVAL 0x$store LFORMAT %C >> ENV:binaryEVAL $count + 2 LFORMAT %N TO ENV:countSKIP BACK filteronloop; Enable the binary as an executable...LAB getoutCOPY ENV:binary T:FilterOnPROTECT T:FilterOn +rwed; Remove all of the _variables_.

    UNSETENV filteronUNSETENV filteroffUNSETENV filterendUNSETENV onUNSETENV offUNSETENV filterstartUNSETENV countUNSETENV storeUNSETENV binaryECHO "FilterOff and FilterOn finished...*n"

  • 8/12/2019 Filter.shell

    4/4

    LIST T:; FilterOff and FilterOn DEMO end.;Edit this script to the line above...

    ----------------------------------------------------------------------------

    The archive is Public Domain/Emailware and you may modify it/them as you please for your OWN experiments. See below. I would dearly love an Email from you even if you think it is absolute rubbish... :)

    (Original working idea and (C)2013 goes to B.Walker, G0LCU.)

    ----------------------------------------------------------------------------

    IMPORTANT:- -----------

    The Legal Stuff:- -----------------

    These programs are Public Domain and no profit will be made from them, also all of the files must remain unaltered and intact including this one. The author is not responsible for any damage to, or loss of, or

    failure of equipment or data caused in any way by the use of these programs. There is NO warranty with the use of these software releases and YOU USE THEM AT YOUR OWN RISK.

    ----------------------------------------------------------------------------

    Testing Evaluation:- --------------------

    All WinUAE and Classic AMIGA test conditions were/are running standard OS3.0x/OS3.1x and using standard ~topaz 8~ fonts throughout.

    I have no idea what strange configuration setups will create so refer

    to the ~The Legal Stuff~ above.

    ----------------------------------------------------------------------------

    Contact:- ---------

    Mr Barry Walker, G0LCU.

    Email:- [email protected]

    Author of the ~TestGear?~ projects in the ~docs/hard~ drawer of AMINET.

    ----------------------------------------------------------------------------

    A very useful HardWare related site, (C) Anthony Hoffman, for modifications, schematics, repairs and the like is:-

    http://amiga.serveftp.net/

    ============================================================================