Author: larsonmars at email.de (Lars Stockmann) Uploader: larsonmars email de (Lars Stockmann) Type: util/boot Version: 0.12 Architecture: m68k-amigaos >= 1.3 Distribution: Aminet Kurz: Legt System infos in Umgebungsvariablen Date: 2024-04-14 Readme: http://aminet.net/util/boot/sysvars.readme Downloads: 597
http://aminet.net/util/boot/sysvars.lha
___ _ __ _ _ ____ ____
/ __| | / _| | | |/\ | _ \/ ___)
| (__| | | (_| | | / \| | \| (__
\__ \ \/\__| | |/ /\ | |_/ \__ \
) )\ / )\ \// ____| _ ( ) )
__/ // / __/ /\ / / | | \ \_/ /
(___//_/ |___/ V_/ |_| (___/
https://github.com/larsonmars/sysvars
sysvars is a small CLI tool for the Amiga that creates several environment
variables holding valuable system information. These variables can be used,
for example, in the startup-sequence to enable/disable certain patches,
assigns, and so on.
To install it, copy sysvars into your c directory and add it to your
startup-sequence or User-Startup, depending on how early you need the
variables.
You can extract the content of the sysvars directory inside this archive to a
bootable floppy disk or use the CreateTestDisk script, which formats a disk,
installs a bootblock and copies the files.
Currently, the following variables are set by sysvars
$CPU: installed CPU, for example 68030 (see NOTES for OS 1.3)
$FPU: installed FPU, one of 68881, 68882, internal (for non-LC/EC
040 and 060 CPUs), or empty if no FPU is available (see NOTES
for OS 1.3)
$Chipset: installed graphics chipset, one of OCS, ECS, AGA
$VFreq: the vertical frequency of the native display, can be either
50 (PAL 50Hz) or 60 (NTSC 60Hz)
$KickVer: Kickstart version
$KickRev: Kickstart revision
$BSDSockLib: The id of bsdsocket.library, empty if unavailable
$BSDSockLibVer: The version of bsdsocket.library, empty if unavailable
$BSDSockLibRev: The revision of bsdsocket.library, empty if unavailable
$UAEMajor: The major version of UAE, empty if it was not detected
$UAEMinor: The minor version of UAE, empty if it was not detected
$UAERev: The revision of UAE, empty if it was not detected
_____________________________________________________________________________
NOTES
- 68080 and SAGA (Vampire) detection implemented following
http://adevnoo.wikidot.com/detect-080-code.
- UAE is detected via the uae.resource, which is only there if a virtual hard
drive or another UAE expansion to be enabled. Thus, detection will fail on
floppy-only-unexpanded Amiga configurations
_____________________________________________________________________________
REQUIREMENTS
- The tool works best with Amiga OS 2.0 or later. Here, it calls SetVar,
which allows for local scope variables. Local scope is no limitiation,
because the workbench is also loaded in the scope of the startup-sequence.
Another advantage is that it does not require ENV:. This means it can run
very early, even before SetPatch.
- For the purists, sysvars runs happily also on OS 1.3 and even down to
OS 1.1. However, there are some limitations to consider
- In OS 1.3 and below, sysvars will currently detect CPUs above 68020 as
68020 and any FPUs as 68881.
- in OS 1.3, environment variables can only have global scope (i.e., they
reside in ENV:). This means you must have ENV: mounted (e.g., to some
folder on RAM:). This is not required for OS 2.0 and above.
- In OS 1.3, environment variables are not useable with every command, but
only with IF. Thus, things like 'ECHO $CPU' do not work. You must use
something like 'IF $CPU GE 68010'.
- Below OS 1.3, UAE detection does not work
- Below OS 1.3, the IF command does not support environment variables.
You must use the IF command from Workbench 1.3. Also, only EQ (equal)
seems to work here.
_____________________________________________________________________________
WHY SUCH A TOOL?
As many Amiga users, I have multiple Amigas, booting from flash memory.
However, I do not want to maintain multiple operating system configurations.
In the past, I have used several tools to branch during startup, which
yielded a complex startup-sequence/user-startup and an extended boot time.
I wanted a small fast utility that gives me neat environment variables, so I
can write something like this in the startup-sequence:
IF $CPU GE 68020
MCP
ENDIF
or
IF $FPU EQ internal
FastIEEE
ENDIF
Also, I always wanted to learn M68k assembler. After 30 years using an Amiga
this was about time!
_____________________________________________________________________________
FUTURE PLANS
The tool is already quite useable, but there are still some things missing,
which I want to fix in future versions (no particular order):
- Add memory-related variables, such as $Chipmem, $Fastmem, and $Slowmem
(especially to distinguish Amiga 5000 trapdoor/slow memory from actual
Z2/Z3 Fast memory)
- Add $RTG variable to enable/disable stuff like FBlit or swap screen mode
configurations
- For Os 1.3: add detection for CPUs > 68020 and at least the 68882
- Make use of boards.library and identify.library if available for even more
expansions.
- Make a WinUAE/FS-UAE-based test suite for automated tests (CI/CD-like)
_____________________________________________________________________________
LICENSE
The code is licensed under the MIT License
_____________________________________________________________________________
RELEASE HISTORY
Version 0.12
- Added 68080 and SAGA (Vampire) support following
http://adevnoo.wikidot.com/detect-080-code
- minor code cleanup
Version 0.11
- Added the tiny tool KSGE36 to the distribution
- Stands for KickStart greater or equal 36
- Tests if the current OS is at least version 36 (i.e., OS 2.0)
- Used in the test script to decide if an ENV: assign is necessary (which
is for OS below 2.0) and commands have to be made resident (see below)
- It is more or less equivalent to calling Version 36 from Workbench, with
the difference that it can be freely distributed (unlike the Version
command) and also works below OS 1.3
- Improved the speed of the test script in OS1.2 and OS1.3 by putting the
ECHO, IF, ELSE, and ENDIF commands into RAM (via resident if in shell)
- The test (in test/echo-test) can be run from workbench or deployed on a
bootable floppy for real Amigas. The script CreateTestDisk can be called
with a device name (e.g., df1:) to create such a disk
- Fix for AROS (here, SetVar cannot access the bsdsocket.library id string)
- Code builds with most ASM-One flavors again.
- Added version information so you can call Version sysvars[6]
- Code/comment cleanup
Version 0.10
- Added $KickVer and $KickEnv that provide kickstart version and revision
- $UAE is now split in $UAEMajor, $UAEMinor and $UAERev for more convenient
scripting
- Added detection of bsdsocket.library ($BSDSockLib contains the id string,
$BSDSockLibVer the version, and $BSDSockRev the revision)
- Refactoring and code improvements (still learning though)
- Easy way to disable certain variables/features at the beginning of the
file using constants (Adapt to your need and make the tool as tiny as
possible)
- Unified SetVar approach using macros
- Easier integration of new features via consistent scheme
- Better comments
- added test script for startup-sequence
Version 0.9:
- Added limited OS 1.3 Support (CPU/FPU detection up to 68020/68881) via a
custom SetVar implementation (setenv-like functionality)
- small code improvements
Version 0.8:
- Initial Release on GitHub and Aminet
PERMISSION UID GID PACKED SIZE RATIO METHOD CRC STAMP NAME ---------- ----------- ------- ------- ------ ---------- ------------ ---------- [unknown] 273 628 43.5% -lh5- 0a72 Oct 16 2022 sysvars.info [unknown] 40 40 100.0% -lh0- 44df Nov 10 03:16 sysvars/.info [unknown] 26 26 100.0% -lh0- df1b Nov 9 14:23 sysvars/Add OS 1.3 Support [unknown] 309 870 35.5% -lh5- 6e30 Jun 2 2020 sysvars/Add OS 1.3 Support.info [unknown] 435 1478 29.4% -lh5- 6c64 Nov 20 02:22 sysvars/add-os1.3-support [unknown] 149 222 67.1% -lh5- cb38 Nov 20 01:00 sysvars/CreateTestDisk [unknown] 144 430 33.5% -lh5- 1366 Jun 2 2020 sysvars/Disk.info [unknown] 90 92 97.8% -lh5- 3948 Apr 14 23:57 sysvars/ksge36 [unknown] 1217 4499 27.1% -lh5- 098f Nov 19 21:07 sysvars/s/startup-sequence [unknown] 394 1231 32.0% -lh5- 7d94 Nov 20 03:06 sysvars/source/ksge36.S [unknown] 7345 27429 26.8% -lh5- e8dd Apr 14 22:37 sysvars/source/sysvars.S [unknown] 1207 1880 64.2% -lh5- f41a Apr 14 23:57 sysvars/sysvars [unknown] 3316 8028 41.3% -lh5- 6db9 Apr 14 23:57 sysvars/sysvars.readme [unknown] 35 35 100.0% -lh0- e805 Nov 7 22:26 sysvars/TEST [unknown] 920 3536 26.0% -lh5- 30ce Jun 2 2020 sysvars/TEST.info ---------- ----------- ------- ------- ------ ---------- ------------ ---------- Total 15 files 15900 50424 31.5% Apr 15 03:00
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminet aminet net>