___ _ __ _ _ ____ ____
/ __| | / _| | | |/\ | _ \/ ___)
| (__| | | (_| | | / \| | \| (__
\__ \ \/\__| | |/ /\ | |_/ \__ \
) )\ / )\ \// ____| _ ( ) )
__/ // / __/ /\ / / | | \ \_/ /
(___//_/ |___/ V_/ |_| (___/
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
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
- 68080 (Vampire) support for the CPU is untested/experimental
- SAGA (Vampire) support is not yet available. I do not own one, so I do not
know what VPOSR might be on the Vampire.
- 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
- 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
IF $FPU EQ internal
Also, I always wanted to learn M68k assembler. After 30 years using an Amiga
this was about time!
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
- For Os 1.3: add detection for CPUs > 68020 and at least the 68882
- Add full support for Vampire
- Make use of boards.library and identify.library if available for even more
- Make a WinUAE/FS-UAE-based test suite for automated tests (CI/CD-like)
The code is licensed under the MIT License
- 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
- Code/comment cleanup
- Added $KickVer and $KickEnv that provide kickstart version and revision
- $UAE is now split in $UAEMajor, $UAEMinor and $UAERev for more convenient
- 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
- Unified SetVar approach using macros
- Easier integration of new features via consistent scheme
- Better comments
- added test script for startup-sequence
- Added limited OS 1.3 Support (CPU/FPU detection up to 68020/68881) via a
custom SetVar implementation (setenv-like functionality)
- small code improvements
- Initial Release on GitHub and Aminet