[comp.sources.amiga] v91i078: BattMem 1.1 - edit battery-backed memory on A3000, Part01/01

amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator) (04/05/91)

Submitted-by: blgardne@javelin.sim.es.com (Blaine Gardner)
Posting-number: Volume 91, Issue 078
Archive-name: utilities/battmem-1.1/part01

[ uuencoded executable and icon enclosed  ...tad ]

Battmem is an editor for the battery backed RAM in the Amiga 3000.  Battmem
requires AmigaDOS 2.0 and an Amiga 3000.  Currently there are four items
that can be changed, SCSI controller ID, Synchronous SCSI, SCSI Timeout,
and SCSI luns.

#!/bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 1)."
# Contents:  battmem.doc battmem.uu battmem0.uu changes.doc
# Wrapped by tadguy@ab20 on Thu Apr  4 17:06:22 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'battmem.doc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'battmem.doc'\"
else
echo shar: Extracting \"'battmem.doc'\" \(2228 characters\)
sed "s/^X//" >'battmem.doc' <<'END_OF_FILE'
X
X                               BattMem v1.1
X
X                                    By
X                                Doug Keller
X
X                   Copyright 1990 Synthetic Technologies
X
X
X[0] Introduction
X
XBattmem is an editor for the battery backed RAM in the Amiga 3000.  Battmem
Xrequires AmigaDOS 2.0 and an Amiga 3000.  Currently there are four items
Xthat can be changed, SCSI controller ID, Synchronous SCSI, SCSI Timeout,
Xand SCSI luns.
X
XIt is pretty self explanatory how Battmem works.  Near the bottom of the
Xwindow there is a box that shows the 96 bits of the battery backed memory.
X
XIf Battmem is run on a machine other then an A3000, it will appear to work.
XApparently the ReadBattMem() and WriteBattMem() functions do not return
Xerrors if run on a non A3000 machine.
X
X
X[1] SCSI Controller ID
X
XThis is the SCSI ID of the hard disk controller.  The default is 7.  These
Xare bits 65, 66, and 67 of the battery backed ram.
X
X
X[2] Initiate Synchronous SCSI
X
XThis will tell the driver to initiate synchronous SCSI transfers.  Only use
Xthis if the hard drive you have supports synchronous SCSI.  All Quantums
Xsupport synchronous SCSI.  This is bit 68 for the battery backed ram.
X
X
X[3] SCSI Timeout
X
XThis is the amount of time the 3000 waits on power up for the hard drive.
XWith Quantums 128ms is fine but from what I hear Seacrates need it set to 2
Xsecs since they take longer to power up.  This is bit 1 of the battery
Xbacked ram.
X
X
X[4] SCSI Lun
X
XThis determines weather the 3000 checks just lun 0 or checks all luns.  If
Xyou have an adaptic or some other SCSI device that supports multiple luns
Xthen you might need to set this bit.  This is bit 2 of the battery backed
Xram.
X
X
X[5] Legal junk
X
XPermission is granted to distribute this program and its documentation for
Xnon-commercial purposes as long as the copyright notices are not removed.
XThis program may not distributed for a profit without permission from Doug
XKeller.  Fred Fish has permission to distribute this program as part of the
XFred Fish library.
X
X
X[6] Bugs and Info
X
XIf you would like to get in touch with me I can be reached on the following
X
X	BIX: dkeller
X
X	UUCP: dsk@ibm.com  until December 1990
X
X	      dkeller@lynx.northeastern.edu  starting Jan 1991
END_OF_FILE
if test 2228 -ne `wc -c <'battmem.doc'`; then
    echo shar: \"'battmem.doc'\" unpacked with wrong size!
fi
chmod +x 'battmem.doc'
# end of 'battmem.doc'
fi
if test -f 'battmem.uu' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'battmem.uu'\"
else
echo shar: Extracting \"'battmem.uu'\" \(6366 characters\)
sed "s/^X//" >'battmem.uu' <<'END_OF_FILE'
Xbegin 700 battmem
XM```#\P`````````"``````````$```/^````90```^D```/^2.=^_B1()`!)0
XM^0`````L>``$1_D```#L<@`@/````"I@`B;!4<C__"E/`2PI3@$D0JP!*'``J
XM(CP``#``3J[^SD/Z`91P`$ZN_=@I0`&09@9P9&```28F;@$4*6L`F`$@2JL`5
XMK&<``)(@#Y"O`#@&@````(`I0`#P(&L`K-'(T<@B:``0T\G3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@@64ZN_:(L7TYU``!(YP`Z)F\`%"!O`!A#5
XM[P`<1?H`$BQY````!$ZN_?9,WUP`3G46P$YU8```)DYQ```@;P`$8`#]9DYQQ
XM``!.=4YU(`A*&&;\4X@0V6;\3G4``$CG`#(F;`&$(`MG%"13(DL@*0`(+'@`2
XM!$ZN_RXF2F#HD<@I2`&(*4@!A$S?3`!.=7``3G4```/L````"@````$```]@$
XM```/2```#RX```\.```.\@``!BH```26```!\@```!0````*`````````_(`!
XM``/J````.P``````````````````````````````````````````````````H
XM`BH`"``````"-@```C@```(Z```"/````CX```)````"0@```D0````````"N
XM1@```DH````````"3@```E8````````"7@```F8````````"<````!0`````(
XM```"A`````````*2`((00F%T=&UE;2!R97%U:7)E<R!!;6EG841/4R!296QE3
XM87-E(#(N,"!O<B!H:6=H97(``0#('5!R97-S(&UO=7-E(&)U='1O;B!T;R!C_
XM;VYT:6YU90````!X`!0!(@`+```#[````!(`````````B````(````!T````Y
XM;````&@```!@````7````%0```!0````2````$0```!`````/````#@````TH
X4````,````"P````D`````````_)0%
X``
Xend
Xsize 4520
END_OF_FILE
if test 6366 -ne `wc -c <'battmem.uu'`; then
    echo shar: \"'battmem.uu'\" unpacked with wrong size!
fi
# end of 'battmem.uu'
fi
if test -f 'battmem0.uu' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'battmem0.uu'\"
else
echo shar: Extracting \"'battmem0.uu'\" \(767 characters\)
sed "s/^X//" >'battmem0.uu' <<'END_OF_FILE'
Xbegin 700 battmem.info
XMXQ```0`````!```/`#P`&P`%``$``0?7)'0```````1U5@```````````&0`+
XM```!`Z(`````!\V.*(````"````````````````````````````\`!H``@`"*
XM8Y`#``````````````````__````````/@?```````!\`^```````'X#X```)
XM```0?@/@`````#`\!^``````,``/P``````P`#^``````#``_@```X``,`'X,
XM```?^``P`\```/__`#`!X``'__X`,````#__]@`P`>`!__^T`#`!X`?__:``Y
XM,```!__M```P```'_V@``#````#[0```,`````H````P`````````#``````&
XM````,``````````P`````````#``````````,`'________P#_\````````PI
XM`,```````$'X(```````@@00``````"!!!______X($$%555555`0@@55555[
XM54`\,"?____]0`#`7_____U``0&?__Q__4`"!G__X`?]0`0Y__\``/U``A7_+
XM^``!_4`!Y?_```G]0`(5_@``2_U``A7X``)?_4`!Y?@`$O_]0`(5^`"7__U`Y
XM`U7_!+___4`#5?_U___]0`-5______U``U7______4`#5?_____]0`-55555G
X7555``U55555554`"``````````````1`Q
X``
Xend
Xsize 518
END_OF_FILE
if test 767 -ne `wc -c <'battmem0.uu'`; then
    echo shar: \"'battmem0.uu'\" unpacked with wrong size!
fi
# end of 'battmem0.uu'
fi
if test -f 'changes.doc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'changes.doc'\"
else
echo shar: Extracting \"'changes.doc'\" \(295 characters\)
sed "s/^X//" >'changes.doc' <<'END_OF_FILE'
XBattMem v1.1	Nov 18, 1990
X
X	Fixed Enforcer hit
X
X	Calling XCEXIT() instead of exit() saves a lot of space, since
X	exit() pulls in a bunch of cleanup stuff
X
X	Using _main instead of DEFINE @_main=@_tinymain, saves more space
X
X	Added 'by Doug Keller' text
X
X
XBattmem v1.0	Oct 13, 1990
X	First release
END_OF_FILE
if test 295 -ne `wc -c <'changes.doc'`; then
    echo shar: \"'changes.doc'\" unpacked with wrong size!
fi
chmod +x 'changes.doc'
# end of 'changes.doc'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
Mail submissions (sources or binaries) to <amiga@uunet.uu.net>.
Mail comments to the moderator at <amiga-request@uunet.uu.net>.
Post requests for sources, and general discussion to comp.sys.amiga.misc.