AminetAminet
Search:
84714 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/src/Filter.shell.txt

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Create AF Filter Commands w/ AMIGA(D)OS
Author:wisecracker at tesco.net (Barry Walker)
Uploader:wisecracker tesco net (Barry Walker)
Type:dev/src
Version:0.00.10
Architecture:generic; m68k-amigaos
Date:2013-03-06
Download:http://aminet.net/dev/src/Filter.shell.txt - View contents
Readme:http://aminet.net/dev/src/Filter.shell.readme
Downloads:801

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, and
then see how to create two real AMIGA commands that turn the Audio Filter on
OR off. To run the script just rename to Filter.shell and execute it in the
normal 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.asm<RETURN/ENTER>
Some reports here...
Prompt> blink AMIGA_Filter.o<RETURN/ENTER>
Some 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<RETURN/ENTER>
                                    ;<Some reports here.>
                                    ;blink AMIGA_Filter.o<RETURN/ENTER>
                                    ;<some more reports here.>
      move.b   #252,$BFE001         ;Set audio filter to bootup default
condition ON.
                                    ;Decimal 252 sets the filter to ON and
                                    ;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<RETURN/ENTER>

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 using
a shell script to create two executable commands to turn the Audio Filter on
and 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 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)

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

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 the
identical 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...*n"
ECHO "Please wait...*n"
SETENV binary ""
SETENV store ""
SETENV count 1
SETENV filterstart
"000003F30000000000000001000000000000000000000003000003E90000000313FC00"
SETENV off "FE"
SETENV on "FC"
SETENV filterend "00BFE00142804E75000003F2"
SETENV filteroff $filterstart$off$filterend
SETENV filteron $filterstart$on$filterend
;
; Generate the audio filter OFF binary...
LAB filteroffloop
; Once built quit the loop.
IF $count GT 95
    SKIP gotonext
ENDIF
; The working loop to create the binary...
ECHO $filteroff FIRST $count LEN 2 NOLINE > ENV:store
EVAL 0x$store LFORMAT %C >> ENV:binary
EVAL $count + 2 LFORMAT %N TO ENV:count
SKIP BACK filteroffloop
; Enable the binary as an executable...
LAB gotonext
COPY ENV:binary T:FilterOff
PROTECT 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 getout
ENDIF
; The working loop to create the binary...
ECHO $filteron FIRST $count LEN 2 NOLINE > ENV:store
EVAL 0x$store LFORMAT %C >> ENV:binary
EVAL $count + 2 LFORMAT %N TO ENV:count
SKIP BACK filteronloop
; Enable the binary as an executable...
LAB getout
COPY ENV:binary T:FilterOn
PROTECT T:FilterOn +rwed
; Remove all of the _variables_.
UNSETENV filteron
UNSETENV filteroff
UNSETENV filterend
UNSETENV on
UNSETENV off
UNSETENV filterstart
UNSETENV count
UNSETENV store
UNSETENV binary
ECHO "FilterOff and FilterOn finished...*n"
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:-     wisecracker at tesco.net

   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/

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

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>