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

dev/src/AMIGA_HW.py.txt

Mirror:Random
Showing:ppc-morphosgeneric
No screenshot available
Short:Basic hardware control using Python
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:2012-09-09
Download:http://aminet.net/dev/src/AMIGA_HW.py.txt - View contents
Readme:http://aminet.net/dev/src/AMIGA_HW.py.readme
Downloads:5551

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. 
       Full Python 1.4.x, minimum, installed.
       (Python 1.5.2 to 2.0.x are also available on AMINET.)
       (Now Python 2.4.6 is available for advanced 68K machines.)

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

History.
--------

01-06-2012.
Version 0.00.10:-  Original upload to AMINET...

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

To install just download the "AMIGA_HW.py.txt" file and rename it to
"AMIGA_HW.py" without the quotes. Drag this file into the PYTHON:
volume and away you go...

From a Python prompt:-

>>> execfile("PYTHON:AMIGA_HW.py")<RETURN/ENTER>

And away you go...

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

The DEMO assembly code that will be compiled and converted.
Call the code AMIGA_Filter.asm...
From a CLI and using the a68k anf 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 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 Python code:-

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.
It goes without saying that by generating the necessary assembly code DMA
to the hardware is easily possible in Classic AMIGAs. This code is just the
TV style Video Mode change and the Audio Filter ON/OFF, but, the Parallel,
Serial, Games and Disk Drive ports could be utilised with careful binary
string manipulation.

Enjoy finding simple solutions to often very difficult problems...

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

  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 idea and (C)2007 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>