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

util/boot/detect_vampire.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Detects Vampire expansion card
Author:Olrick Lefebvre
Uploader:olrick lefebvre olrick fr
Type:util/boot
Version:1.1
Architecture:m68k-amigaos
Distribution:Aminet
Date:2021-01-15
Download:http://aminet.net/util/boot/detect_vampire.lha - View contents
Readme:http://aminet.net/util/boot/detect_vampire.readme
Downloads:201

This small util detects a Vampire expansion card based on Exec AttnFlags.

Context
=======
This is just a small tool I wrote as an exercice and because I forgot to
have a look at VControl which already does the job.
I wanted to use the same CompactFlash memory card with my A500 and with UAE.
As I didn't want to manage two different boot disks, I had to detect presence
of my Vampire Card to adapt configuration files (ScreenMode.prefs ...) at boot.

Technical details
=================
After nice suggestions from Holger Hippenstiel and Flype,
I've dropped detection based on ram expansion "VampireFastMem"
and now just check the 68080 bit in Exec AttnFlags.
* if the bit is set, the return code is 0,
* if not, the return code is 5 (WARN).

You can use it early in startup-sequence, either to put in place dedicated 
configuration files, or to set a variable used later.

Example:
; Vampire detection
C:detect_vampire
if warn
    set Vampire no
    C:copy ENVARC:Sys/ScreenModes/ScreenMode_PAL.prefs
ENVARC:Sys/ScreenMode.prefs
    ...
else
    set Vampire yes
    C:copy ENVARC:Sys/ScreenModes/ScreenMode_Vampire.prefs
ENVARC:Sys/ScreenMode.prefs
    ...
endif

Annex
=====
Project hosted at  https://github.com/Agg242/detect_vampire.git
Built with vasm




Contents of util/boot/detect_vampire.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                   50      56  89.3% -lh5- 7c0d Jan 15 18:32 detect_vampire
[unknown]                  757    1466  51.6% -lh5- 8ca0 Jan 15 18:46 detect_vampire.readme
[unknown]                  225     352  63.9% -lh5- 431c Jan 15 18:32 detect_vampire.s
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total         3 files    1032    1874  55.1%            Jan 16 02:22

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