unit misc

Miscellaneous procedures for detect additional hardware

author: Tomasz Biela (Tebe)

Register Variables:

name:address:type:description:
banks$0101array [0..63] of bytearray with code of banks PORTB

Interface:

name:description:
DetectHighMem

function DetectHighMem: word;


Detect 65816 linear memmory
http://atariki.krap.pl/index.php/Obliczenie_rozmiaru_pami%C4%99ci_liniowej
    returns:
  • amount of memory in KB
DetectVBXE

function DetectVBXE(var p: word): Boolean; assembler; register;


Detect VBXE card
    parameters:
  • word variable
  • returns:
  • TRUE present, FALSE otherwise
  • bit 0..6 variable: VBXE CORE
  • bit 7 variable: =1 RAMBO
  • bit 8..15 variable: VBXE PAGE
DetectEvie

function DetectEvie: Boolean; assembler;


Detect EVIE card
    returns:
  • TRUE present, FALSE otherwise
DetectStereo

function DetectStereo: Boolean; assembler;


Second POKEY detect routine
author: Seban/SLIGHT
(c) 1995,96
    returns:
  • TRUE present, FALSE otherwise
DetectCPU

function DetectCPU: byte; assembler;


How to detect on which CPU the assembler code is running
(This information is from Draco, the author of SYSINFO 2.0)
You can test on plain 6502-Code if there is a 65c816 CPU, the 16-Bit processor avaible
in some XLs as a turbo-board, avaible. Draco told me how to do this:
First we make sure, whether we are running on NMOS-CPU (6502) or CMOS (65c02,65c816).
I will just show the "official" way which doesn`t uses "illegal opcodes":
    returns:
  • $00 - 6502
  • $01 - 65c02
  • $80 - 65816
DetectCPUSpeed

function DetectCPUSpeed: real;


Detect CPU speed in megahertz
author: Draco
    returns:
  • speed (Q24.8)
DetectMem

function DetectMem: byte; assembler;


Detect amount additional memmory PORTB
    returns:
  • amount of banks (0..255)
  • banks code PORTB = BANKS[0..63] at address $0101
DetectMapRam

function DetectMapRam: Boolean; assembler;


Detect MapRAM
http://xxl.atari.pl/mapram/
    returns:
  • TRUE present, FALSE otherwise