home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 2
/
crawlyvol2.bin
/
apps
/
telecomm
/
hsmoda06
/
hsm_doku
/
drvin.eng
< prev
next >
Wrap
Text File
|
1994-12-30
|
8KB
|
204 lines
DRVIN.PRG
=========
(I have no time for typing everything in the long form. When somebody
wants to write a driver for different hardware or so, he may contact me.
In the future here will appear the complete documentation of the
functions.)
This program (DRVIN) supports loadable device driver. It has to be loaded
before the drivers. DRVIN and drivers must be executed before the programs
using this drivers. This program should be placed into the AUTO-folder
(for specialists: or an equivalent program collection place). It can be
startet from the desktop too for test purposes.
TOS
---
DRVIN works with all TOS versions I know.
Mag!X, MagiC
------------
DRVIN runs under Mag!X from version 2.00 up. It should be run under older
Mag!X versions too, but this isn't tested. With MagiC >2.00 some functions
of DRVIN are no longer needed and not used. It will exist a MagiC,
probably MagiC3, in the future which contains all functions of DRVIN. In
this case DRVIN is not necessary and the drivers will be startet without
DRVIN.
MiNT
----
If DRVIN and the drivers are started before MiNT only a little of the
functions will remain. That's why DRVIN and the drivers should be started
after MiNT. In this case all functions are realized as under TOS, but no
more. Redirections and sleep and other plays are impossible with this file
handles. I don't know whether the AUX-device switching for the aktual
process will continuosly work. I use neither MiNT nor MultiTOS. As long as
no MiNT freak is to be found who takes over the adaption and support, no
special versions for MiNT will exist.
Configuration
-------------
The configuration is done by using SETTER.TTP.. See SETTER.TXT for use.
Because the explainations in the drivers are German I added an
abbreviation.
FASTINT:
DRVIN.PRG is able to modify the timer interrupt of the TOS to achieve
57600Bd on MODEM1 on a 8MHz-68000. Even on MegaSTE, TT and Falcon the
modification can provide some enhancements. Under MagiC the madification
will never be done because MagiC (version 2.0 and newer) has already a
"friendly" timer routine. FASTINT should be switched off for
experiments with other operating systems or if mystic errors/behavior
occur.
Function (for interested users):
I discovered it's enough to call the routine (GEMDOS-timer) in NEXT_TIM
(negatvie LineA variable) with an IPL < 6 to enable 57k6Bd receive with an
68000/8MHz. So I insert a piece of code to set the IPL down to 5. That's not
without any risk but only creates problems when other programs do such hacks
too.
EXOPEN:
(works only if the GEMDOS-part of DRVIN is used, not under Magic
version3.)
"Yes" activates a very restricted GEMDOS-Fopen. It becomes impossible to
Fopen a device more than ones at a the same time. It may protect (open)
devices against influences of other programs on the GEMDOS-level. Normally
you should answer "No", because some programs don't expect an error code
from Fopen (reactions from senseless displayings till crashes) and because
the program termination (normal and abnormal = crash) isn't watched, that
means if the program doesn't close a device it remains open! (In few
words: It's a game for developers.)
Construction
------------
DRVIN consist of three import parts: making the RSVF-cookie, new Bconmap-
and MAPTAB-manager for BIOS and XBIOS, basic routines for installation of
simple Mag!X compatible devices drivers.
RSVF-Cookie
-----------
A RSVF-cookie is created which value points to two 0-LONGs, representing
an end-object. So devices drivers aren't in need of creating a cookie.
They hook themselves only in the RSVF-lists. The RSVF-cookie provides a
structure for providing the basic information about interfaces. The
description is contained in the file RSVF_COO.TXT.
MAPTAB-Verwaltung
-----------------
This part hooks in the BIOS- and XBIOS-trap and manages the
XBIOS-functions Bconmap, Rsconf and Iorec(for AUX). The BIOS-functions
Bconstat, Bconin, Bcostat and Bconout for device AUX and all devices from
included 6 up are managed. Bconmap and a MAPTAB are provided under every
TOS-version. The routines of the actual setted device by bconmap are
copied in the xco*-vectors (except TOS1.00) too, but not used there. Two
new Bconmap-subfunctions with the opcodes -400 and -401 are provided for
overwriting a MAPTAB-entry and for adding a new entry.
The length of the MAPTAB is no longer limited. ## The actual limit in this
DRVIN is 10 entry, but this is only a constant in the source, easy to
change and extend.
GEMDOS-part
-----------
It looks like the old HSMODEM1-version from outside and from inside like
(### at the moment) a reduced Mag!X-beta. Fopen, Fread, Fwrite, Fcntl are
directed to the driver, but all with fileptr == NULL.
Actions
-------
When DRVIN is started under TOS>2.00 oder Mag!X>2.00, all old routines
from the old MAPTAB are copied in the new one, so that the
(X)BIOS-functions will work with the old routines if no driver is
installed. Under TOS1.00 it looks very bad, the MFP-driver must be loaded,
otherwise serialI/O will not work (only the IOREC-pointer is copied).
Under 1.00<TOS<2.00 will it work a litte without drivers because only
Rsconf is not copied, that's why the MFP-driver must be loaded.
Mag!X- (and DRVIN-) friendly Bco*-routines
------------------------------------------
modificable registers A0-A2/D0-D2 (for Rsconf too)
Bconout has to start with the instruction
lea 6(sp),a0
and will be called mostly after this (startadr+4) with the pointer to
parameter (WORD) in A0.
New XBIOS-Bconmap-functions (-400, -401)
----------------------------------------
These functions may only be used to install Mag!X-friendly functions.
In the MAPTAP there is room for more than 4 devices. The provider of the
XBIOS-functions (DRVIN or a future Mag!X) provides enough room to install
additional devices. It may create the room dynamically or have a fast
upper limit. Never the less a driver could get an error message caused by
insufficent memory or other reasons.
The XBIOS-function Bconmap is extended by two new subfunctions. If the
extensions are unavailable, the caller gets a 0 as error message.
LONG Bconmap((WORD)-400, (WORD) dev_nr, (LONG) ptr_to_6_longs) dev_nr is a
device number from 6 up which is already exists in the MAPTAB, otherwise
the error code -15 EUNDEV is returned. ptr_t_6_longs points to a structure
equal to a MAPTAB-entry. This structure is copied to te according
MAPTAB-place. If the new installed device is the actual AUX-device, the
routines are copied to xco* and the actual rsconf and iorec cells to. This
function is only for installing Mag!X-friendly routines. The device number
is returned as a success message, that is, the dev_nr is return value too.
LONG Bconmap((WORD)-401, (LONG) ptr_to_6_longs)
similar -400, but adds a device to the MAPTAB. Return message is either
the device number selected by this function or the error code -12 EGENRL
if it's impossible to enlarge the MAPTAB. This function will never
transfer the vectors to xco* because a added device can't be the actual in
the moment of adding.
Driver
------
DRVIN doesn't provides all possibilities of the Mag!X(beta)-versions. Who
wants to write a driver running under DRVIN too, could contact me for
details.
Versions
--------
1993-11-23
GEMDOS-trap modifies only A0/D0 as adaption to very unclean programs
Fopen and Fclose directed to the drivers
1993-11-28
Bug under TOS1.00 in Bconmap removed
own environment string _PNAM=DRVIN.PRG
1994-06-17
Pointer array for Dcntl M_DEV_INSTALL has changed to the format of MagiC
version 3 (ex Mag!X). INKOMPATIBLE to earlier versions of DRVIN and
Drivers.
1994-08-13
Only pointer to the driver block is stored during Dcntl M_DEV_INSTALL as
Magic does (not the block itself). Space available for 16 GEMDOS devices.
1994-08-18
FASTINT configuration moved from MFP* to here
1994-08-25
internal change
1994-10-12
EXOPEN option
1994-10-29
Changes in Dcntl, Fdelete added. Deleting an re-installing drivers should
work as in MagiC3. FASTINT automatically off under MagiC.
1994-12-30
fast Bconout parameter passing changed -> new MAPT_APP/MAPT_OVE function
numbers
Harun Scheutzow, Nov. 21st 1993 and later
(Harun_Scheutzow@B.maus.de)
---EOF---