|
Inferno #08
30 ноября 2005 |
|
Softinka - Technical Reference disk system DISCiPLE / + D.

RAMSOFT presents:
TECHNICAL GUIDANCE ON DISCiPLE / + D
Version 8 (September 9, 1999)
Translated from English - Alone Coder
CONTENTS:
===========
1 .... The main features of DISCiPLE / + D
2 .... Memory Allocation
3 .... I / O ports (I / O)
3.1 .. Port 7Bh (123 dec) in DISCiPLE
4 .... UFIA Structure
5 .... System calls (hook codes)
5.1 .. Internal system calls
.. 5.2 Programming Example: Load file
6 Disc format ....
7 Structure of the file handle ....
Table 8 .... file types
9 .... Advanced. BASIC commands GDOS / G + DOS
9.1 Network ..
9.2 snapshot button ..
9.3 .. Error Messages G (+) DOS and UNIDOS
10 ... Sis. variables GDOS / G + DOS and UNIDOS
11 ... Additional commands BASIC UNIDOS
12 ... Pin Connectors
12.1.Podklyuchenie drive PC 5.25 "
13 ... Programming VL1772 FDC
14 ... The authors and contact addresses
WARNING
==============
Although we have tried to be careful to
kument may contain errors. The authors do not
responsible for any loss and /
or damages directly or indirectly, Nane
hay your system from the use of
information contained herein. List of cars
ditch, see end of document.
PREFACE
===========
We (Ramsoft) long use interface
DISCiPLE and appreciate the power of this disk system
temy.My spent many hours in trying to
nyat the smallest details to get a dos
tup to all opportunities, but more
to be seen. Now we have decided to pub
rejoice all the information you have collected in
mostly for yourself, and hope that it will help
each, and that through it there will be more
programs under this remarkable system.
GENERAL TERMS
=============
DRAM - Sector buffer.
RPT - system variable pointing to
byte DRAM.
UFIA - 24-byte file handle (User File
Information Area, a 24 byte
structure which describes a file
for system calls).
DFCA - Scope channel file (Disk File
Channel Area).
1. Features DISCiPLE / + D
============================
8 KB EPROM (for the disk BIOS)
8 KB RAM
Magic button NMI (snapshot)
Parallel port (unidirectional)
Floppy disk port (controller VL1772 FDC)
High-speed disk operations:
Loading 128K less than 7 seconds.
Features DISCiPLE:
Two Port Joystick ATARI (Sinclair 1,
Sinclair 2 / Kempston)
Two network connectors (3.5mm mono jack,
network is compatible with the Interface 1)
Mute button (block interface)
System connector rear
(For connecting other devices)
2. Memory Allocation
=======================
When the memory interface is open (paged
in), ie included in the address space
Z80 (see below), the first 16K of address
spaces are distributed as follows:
Address DISCiPLE GDOS DISCiPLE UNIDOS + D
0000h 8K RAM, 8K ROM, 8K ROM
2000h 8K ROM, 8K RAM, 8K RAM
Thus, the memory allocation in
UNI-DOS the same as the + D, and on
DISCiPLE. See [3.1] for the exchange of Adre
joint ROM / RAM DISCiPLE.
3. I / O ports and DISCiPLE PlusD
======================================
NOTE: Joystick 1 - simultaneously
Kempston (port 1Fh) and Sinclair 2 (buttons
6,7,8,9,0). Joystick 2 - Sinclair 1 (Button
1,2,3,4,5). Network is compatible with the Interface 1.
Ports DISCiPLE:
Port In Out Note.
1Bh status of the FDC team FDC [13]
5Bh reg.dorozhki track
9Bh reg.sektora reg.sektora
DBh reg.dannyh reg.dannyh
1Fh Joystick 1: Governance:
b0 right choice of drive
b1 left the choice of
b2 down the SD / DD density
b3 up bank select ROM
b4 fire upr.blokirovkoy
b5 ext. select (?)
b6 BUSY printer printer STROBE
b7 Network Network
3Bh wait until the network = 0 (*)
7Bh vkl.perezagr vykl.perezagr. see [3.1]
BBh unlocked. memory to hide memory (**)
FBh printer data
FEh Joystick 2 Sinclair
(*) Port 3Bh used for network syn
chronicity (the same as that bit 5 ports EFh
Interface 1). Any OUT to port 3Bh retarding
tains Spectrum, while logic level
network will not rise to 0. It is used to
expectations of the start-bit frame peredachi.Setevaya
bus has TTL level (0 = 0 volts, 1 = 5
volts). Frequency of bits of 87.5 Kbps,
data is transmitted in packages up to 256
bytes including a simple pro
tocol level data-link.
Ports PlusD:
Port In Out Note.
E3h status FDC FDC team, see [13]
EBh reg.dorozhki track
F3h reg.sektora reg.sektora
FBh reg.dannyh reg.dannyh
EFh Management:
b0 / a choice of drive
b2 SD / DD density
b3 bank select ROM
b4
b5 ext. select (?)
b6 STROBE printer
b7 choice of
E7h unlocked. memory to hide memory (**)
F7h b7 = BUSY printer data
(**) In addition, memory and DISCiPLE + D include
is obtained when the Z80 goes to the following addresses:
0x0000, 0x0008, 0x0066, 0x028E.
3.1. PORT 7Bh and memory addresses DISCiPLE
======================================
Port 7Bh (123 decimal) is available then
lko at DISCiPLE and has a trigger. Changes
places of RAM and ROM:
Access ROM RAM Result
IN 0x0000 0x2000 reset flip-flop
OUT 0x2000 0x0000 setting trigger
This feature uses GDOS for op
definitions, whether you need to load a file system
drive (when you turn on or reset twice
without executing DOS commands between discharges);
UNIDOS this opportunity to ignore, so that
attempt to fill up the switching system.
In GDOS is a variable that lies in memory of
shift 0x1DE4 - it is set to
0x44 ('D') after checking the syntax of BASIC
(Ie, after the RST 08h code less 1Bh) and
after boot: this variable
shows that the DOS is invoked as a means of
minimum odnazhdy.Kogda user sbrasy
Vaeth PC, trigger port 7Bh discharged
is, resulting in falls in the ROM of
region of 0x0000. When is the first pre
on closing, the survey procedure is called key
0x028E - and memory DISCiPLE automatically
becomes apparent. At offset 0x028E in
ROM DISCiPLE available procedure, checking
yuschaya that same variable, which is 0x44:
- If there is, then this procedure
puts back 00h, which means "means
DOS does not invoked since reset;
- Otherwise (t.e.esli there 0x44) procedure
puts in the variable number of 0x53 ('S') and
copies the first 2335 (0x091F) bytes of ROM
RAM: in this case, the file system must be
rebooted.
When everything is completed, the memory
again rearranged (t.e.trigger establishes
Lebanon) through the port OUT 7Bh, then PA
rumple DISCiPLE hidden by OUT at the port
BBh and - finally - called procedure
Poll keys.
Reading from a port 7Bh for DOS means that
the same as resetting the computer, so after two
Readings from the port 7Bh (without entering DOS commands
between readings) file system requires
reboot.
NOTE: Because all of this
based on a survey of key procedure in ROM
Spectrum, then nothing will happen when reading
Research from the port 7Bh, if this vysheuka
ciated procedure is invoked (ie if
interrupt is prohibited, or if we are in a mode
IM 2 and scan the keyboard to other PIC
bong), but the last (before calling DOS)
operation with port 7Bh should be OUT, EC
Do we want to leave the DOS in the inviolability
surface.
4. File handle (UFIA)
=====================
This Dosov structure, often using
May core procedures and usually sits on
at IX.
An Offset Value
0 1 Number of drives (1,2, or '*' (2Ah)
for current)
January 1 Number of programs (directory)
February 1 Number Flow
March 1 Areal density ('d' = DD, 'D' = SD)
April 1 Number type file from a directory
(See below)
May 10 File Name (supplemented by spaces)
/ Extensions net.Mozhno use
point to conditionally show the distribution
shirenie.8.3 impossible - for this
would require 12 bytes. - A.C. /
January 15 ROM-ID - a cassette type
(See below)
February 16 length of the file
February 18th starting address
February 20 Length for Basic
February 22 number-line startup
5. System calls
(Same for DISCiPLE and + D)
===================
For access to the system used
do so, use a protocol interface (IF1):
RST 8
DB # service
All functions return an error code as a result
Giustra A.
Important note: You can not call
RST 8 of the procedures underlying the memory interface
ca. You can not call a procedure 0x028E
(Survey of keys) from an interrupt handler -
this will fail if DISCiPLE / + D connected
chen, some programs because it does not
work (eg, SoundTracker v1.1) - you
can remedy this situation, replacing
CALL # 028E by RST # 38. Some programs
(Type diskofitsirovannyh games) do not use
RST mechanism 8 and do absolutely CALL'y
procedures for DOS or BIOS - this is a bad method!
Here is a list of hook code'ov GDOS3 (G + DOS2)
with the input parameters:
Supported hook code'y Interface 1:
CONSIN (1Bh) - Input from the console
CONSOUT (1Ch) - Output to console
PRTOUT (1Fh) -
KBDTST (20h) -
SELDRV (21h) - Select the drive
OPTMPM (22h) -
CLOSEM (23h) -
ERASE (24h) -
RDSEQ (25h) -
WRREC (26h) -
OPTMPM (2Bh) -
DELBUF (2Ch) -
UNPAGE (31h) - Hide the shadow ROM
CALL (32h) - Call the procedure ten. ROM
Specific GDOS3 (G + DOS2) hook code'y:
HXFER (33h) - Copy. file handle in DFCA.
IX = address handle (UFIA)
OFSM (34h) - View the map of sectors
file (file sector map) from
information from DFCA.
Pointer RPT laying down
is at the top of the DRAM.
HOFLE (35h) - Open File.
IX = UFIA
The combination of the two previous
functions. Sets
the last 9 bytes UFIA in
resp. with the file header.
SBYT (36h) - Save the bytes of DRAM
at RPT. / This function
and functions 37h, 3Ch, 3Dh not
lacking in TR-DOS. - A.C. /
A = B
If the sector buffer variables
comprehensive, it automatically
saved to disk.
HSVBK (37h) - Save the data block.
DE = start of data
BC = length in bytes
CFSM (38h) - Close file sector map.
Unloads (flush) DRAM,
closes the file and updates
directory.
PNTP (39h) - Output byte parall.port.
A = B
COPS (3Ah) - Display screen on the printer.
HGFLE (3Bh) - Open the data block file.
IX = UFIA
1 st boot sector file
in DRAM. RPT sets
Camping at the beginning. / To read
hardly uses the
same sector buffer that
to write (in Chap. 9 leads
den sample copy of
one open file in the
other) .- A.C. /
LBYT (3Ch) - Read byte adr.RPT.
Returns A = byte.
If necessary, the disk
read the next sector.
RPT is incremented.
HLDBK (3Dh) - Download the data block.
DE = start address (where
put data)
BC = length in bytes
WSAD (3Eh) - Record DRAM to disk.
D = path
E = Sector
RPT put to beg. DRAM.
RSAD (3Fh) - Read sector in the DRAM.
D = path
E = Sector
Similarly 3Eh.
REST (40h) - Reset the drive and look for
Track 0. Number of drives
specified in UFIA.
HERAZ (41h) - Remove a disk file
specified in UFIA.
IX = UFIA.
(42h) - Large screen print.
PCAT (43h) - directory of the drive / no functions
return a list of files in
User Program
(Unless it is creating its own satellite
signal and redirecting directory
in it). And even cursed
Mr. TR-DOS can be read
directory "honestly": Challenges
function # 08! - A.C. /
Uses information from
UFIA. Drive, and stream
must be installed.
At offset +0 Fh in UFIA
gb one of the following:
02h for CAT!
04h for CAT
12h for CAT! with mask
filename
14h for CAT with a mask
filename
The file name should be based on
offset 05 in UFIA and
may contain characters
masks (wildcards).
HRSAD (44h) - Read Sector
A = number of drive
D = number of lanes
E = number of sectors
IX = address to read
HWSAD (45h) - Write sector
A = number of drive
D = number of lanes
E = number of sectors
IX = from record
(46h) - open / close streams
(How?)
PATCH (47h) - Call? (To page) shadow
memory.
Resume. HL = 0 for DISCiPLE
HL = 1 for PlusD
HL = 2 for DiSCDOS
Specific UNIDOS hook code'y:
(48h) - Load file
(49h) - Verify file
(4Ah) - Merge
(4Bh) - Save file
(4Ch) - Open File
(4Dh) - POINT (see UNIDOS)
(4Eh) - Empty (flush) buffers
disk
(4Fh) - Close file
(50h) - Clear Channels
(51h) - Rename file
(52h) - Move stream
(53h) - Move file
(54h) - Select the drive and directory
5.1. INTERNAL SYSTEM CHALLENGES
(Same for DISCiPLE and + D)
================================
Here is the result of commands RST, when
Memory DISCiPLE or + D open (paged in).
RST 00h - Reset
RST 08h - Call the function systems; room
function must be in the next
byte (1) (2)
RST 10h - Call the procedure ROM Spectrum;
address should be in the next 2
bytes (3)
RST 18h - GDOS, G + DOS: reserved
(For testing syntax)
Uni-DOS: low-level systems
correlation functions, the function number must
be in the next byte
RST 20h - Print Dosov message
error: error code should be
next byte
RST 28h - call the RST 20h ROM
Spectrum
RST 30h - Read the state of the interpreter:
Z = 0 if the syntax check,
Z = 1, if the execution
RST 38h - Enable interrupt
(1) = B Spectrum 128K should be included
ROM 1
(2) = In a call interface automatically
cally opens (page in) your memory
(3) = Make sure that the rule was included
correctly ROM Spectrum
5.2. Example: File Download
===========================
Here is a simple downloader, often ISPO
lzuemy in our programs. He will ship to
dovy file "blk0.DF" in memory of its beginnings
flax address. The procedure is efficient for
DISCiPLE, + D and UNIDOS (all versions). Attention
attention: there is no error handling.
LOAD LD IX, UFIA; IX points to handle
RST 08: DB # 3B; HGFLE: open file
LD DE, UFIA +0 F; zagol.fayla will be here
LD B, 09; (first 9 bytes of the file)
L_HDR RST 08: DB # 3C; LBYT: bytes of DRAM
LD (DE), A; put bytes
INC DE
DJNZ L_HDR; get all 9 bytes
LD DE, (UFIA +10); nachaln.adres file
LD BC, (UFIA +12); length of the file
RST 08: DB # 3D; HLDBK: boot. data
RET; end!
UFIA.Tolko below shows the first 15 bytes
must be specified by the user before you
call of HGFLE. The last 9 bytes are filled
9-th bytes of the file header.
UFIA 01; room ('*'= drive current)
00
00
'D'
04; type 04 = CODE
"Blk0.DF"; filename
, (Supplemented by spaces)
UFIA +0 F 00; will contain ROM-ID
UFIA +10 00,00; will contain the address of the file
UFIA +12 00,00; will contain the file length
00
00
00
00
Note that the load address and
length is read from the 9 bytes of the header
file. To get the file to boot from
another address, simply replace the manual
LD DE, (UFIA +10) (eg, direct LD DE, nn).
DISCiPLE / + D - Format
6. Disc format
===============
The disc has 80 tracks with 10 sectors
(512-byte for double-density, 256baytnyh for single), the total
capacity of 800KB (DS / DD). The first 4 tracks on a disc (track
0-3 of 0) are reserved for system
and contain the directory, leaving 780KB free
the free space. The Directory consists of 80
sequential file descriptors, each
of which takes 256 bytes, for example., desk
riptor file # 48 is in the first 256 bytes
Sector 4 track 2. Directory has
fixed capacity and can contain
only 80 files. UNIDOS overcomes this
restriction by introducing the subdirectories and enabling
specify the maximum number of files
each of them.
Drives formatted on DISCiPLE or
+ D, can be read / written to the usual
GOVERNMENTAL PC-shnyh drives - and vice versa.
7. STRUCTURE file descriptor
==============================
NOTE: All numbers are decimal.
The basic structure
----------------- Offset Value
0 Type of file (see table types fi
fishing), 0 = deleted (free entry)
1.10 File Name (Revised spaces)
12.11 The number of sectors occupied by the file
(Byte ahead)
1913 Track number 1 sector file
14 Number of Sector 1 of the first sector of file
15-209 Map Sectors
(Sector allocation bitmap = s.a.b.)
Each bit corresponds to the sector
disc. Bit is set if the resp.
Sector refers to faylu.Primery:
byte 15, bit 0 = lane 4, Section 1;
byte 16, bit 3 = lane 5, Section 2.
IMPORTANT NOTICE: S. a. b. used
only during the save operation: sab
All 80 files are grouped by OR, and so
the system know which sectors are free. / Y
who came up with this format, it is obvious
there were problems with the head:) - AC / At
BitTorrent uses a high-speed metal
method: each sector contains only 510 bytes
data in the last 2 bytes store the number
track and sector number for the next cross
Ktorov fayla.Posledny sector chain soda
rzhit (0,0) in the last 2 bytes.
210-255 depends on the type of file.
BASIC (Type 1)
------------ 211 is always 0 (this is ROM-ID -
identifier, taken from
Cassette title)
212-213 Length
214-215 starting address in memory (PROG
Startup - usually 23,755)
216-217 length without variables
218-219 Line Startup
NOTE: These 9 bytes are also
the first 9-th bytes of the file.
NUMBER ARRAY (type 2)
------------------- 211 is always 1 (this identifier
taken from the cassette title)
212-213 Length
214-315 starting address in memory
216-217 name of the array - is ignored?
218-219 not used
NOTE: These 9 bytes are also
the first 9-th bytes of the file.
STRING ARRAY (type 3)
------------------- Always 211 2 (an identifier
taken from the cassette title)
212-219 As in type 2
NOTE: These 9 bytes are also
the first 9-th bytes of the file.
CODE FILE (type 4)
Always 3 ---------------- 211 (an identifier
taken from the cassette title)
212-213 Length
214-315 Starting Address
216-217 not used
218-219 Address autorun (0 if not)
48K SNAPSHOT (type 5)
------------------- 211-219 Not used
220-255 registers Z80 (as a 2-byte
words) in the following order:
IY IX DE'BC'HL'AF 'DE BC HL I SP
(See below about R & AF)
Register I - high byte, respectively
the corresponding word (offset 239),
it is loaded as follows:
POP AF
LD I, A
Trap mode is determined by
value of the register I: if I soda
rzhit 00h or 3Fh, then IM 1, otherwise
IM 2. The flag resolution
Interrupt IFF2 (IFF1 = IFF2) sex
obtained from the flag P / V.
Instead, SP actually stored SP-6,
since the original stack
"Spoiled" by the following 6-byte:
R AF PC
| |
SP SP +6 (original SP)
(R - byte resp. Words)
so zapuskalka ends
something like this (in fact
somewhat more complicated):
POP AF
LD R, A
POP AF
RET
MDRV (type 6)
-----------
This image of the cartridge mikrodrayva. Details
omit.
NOTE: The files in mdrv UNIDOS differ
are of similar files in GDOS.
SCREEN $ (type 7)
--------------
Same as Type 4, with initial
e = 16384, length = 6912
SPECIAL (type 8)
211-255 -------------- At the discretion of the
programmer.
128K SNAPSHOT (type 9)
--------------------
Similarly 48K Snapshot. The first byte
file - the page number (port 0x7FFD), Oba
chno lies in the system variable BANKM
(23,388). 8 pages of memory are stored in air
increasing order - from 0 to 7.
OPENTYPE (type 10)
---------------- 64kilobaytnyh 210 Number of blocks
in the file 211 Always 9? (No confidence)
212-213 Length of last block
214-255 not used
NOTE: Files can be opentype
more than 64K and are typically created and managed
Xia stream operators BASIC, such
as OPEN #, CLOSE #, PRINT #, INPUT #, etc.
See chapter [9] - a short description of these operators
operators.
EXECUTE (type 11)
--------------- 210-255 as in file CODE (type 4);
length = 510, start address = 0x1BD6
(0x3DB6 for + D). Sector in Georgia
the RAM interface and run (he
must contain a floating
program!).
Subdirectory (Type 12) - UNIDOS
--------------------------- 210-212 As in Opentype (type
10). This file
always stored in consecutive
located sectors. Latest
two bytes of the sector do not store the address
the next sector. Structure
similar to the root directory, but
first record contains a number Zago
agile file (file header number)
parent directory. Latest
two bytes of the last sector soda
neigh 0xFFFF.
/ It is not clear how the system, working with the root
catalog, may impose an OR sabvseh
files, including lying in subdirectories. Ve
bly in sabpodkataloga installed bi
you through all the files that are in this for
directory. But in this case, as the
deep subdirectory have to spend
a lot of effort: update sab'y under this
directory, its parent, grandparents and
etc. - A.C. /
213 Capacity (maximum number of
entries in this subdirectory).
CREATE (type 13) - UNIDOS
----------------------- 210-255 Similarly, the file
CODE, but
starting address is ignored.
8. TABLE TYPES OF FILES
=======================
This table lists the various
file types with their corresponding identification
fikatorami (ID). Where possible, specify ISPO
lzuemy in the tape header (standard
LIMITED-ROM shny) filetype -
abbreviated as ROM-ID. ROM-ID - Part 9-B
Nogo file header (bytes 211-219 ale
NTA directory).
ATTENTION: the code is added UNIDOS
128 for hidden files and 64 for the protected
files.
Code Type inscription ROM-ID
in CAT
0 removed (an empty entry) No No
1 BASIC BAS 0
2 NUMBER ARRAY D. ARRAY 1
3 STRING ARRAY $. ARRAY 2
4 CODE CDE 3
5 48K SNAPSHOT SNP 48k no
6 MICRODRIVE MD.FILE no
7 SCREEN $ SCREEN $ is not
8 SPECIAL SPECIAL No
9 128K SNAPSHOT SNP 128k no
10 OPENTYPE OPENTYPE no
11 EXECUTE EXECUTE no
12 (UNIDOS) subdirectory DIR No
13 (UNIDOS) CREATE CREATE No
9. ADDITIONAL COMMANDS BASIC GDOS
======================================
GDOS extends BASIC to organized
vat disc surgery. When you turn
Spectrum, you must initialize the system
theme, for this, insert the disk containing
operating system file ("SYS *" on
DISCiPLE and "+ SYS *" for + D), the first discrete
kovod and enter the "RUN". DOS, in addition, seeking
first file is called "auto *", and triggering
follows it, if it finds. File "auto *" is not
sought, if you type the command "RUN boot".
NOTE: Filenames are sensitive
sensitive and can contain wildcards
('*' And'?').
To see the contents of the disk, enter:
CAT 1 (for drive 1) or
CAT * (current drive)
You can also enter commands such as
such:
CAT 1; "a *"
CAT # 3, 1; "sys *"
CAT 1!
CAT # 3 1!
Hence it is clear that you can redirect
catalog copy to any channel and can indicated
show the file name, which may contain
wildcards, if you want to show only
matching mask files. If a team
ends with '!', it shows reduce
scheny directory that contains only a list of
(Suitable) for file names.
To download / save the file:
LOAD d ; "filename"
[CODE | SCREEN $ | DATA | etc]
LOAD p <fn>
SAVE d ; "program"
[CODE | LINE | SCREEN $ |, etc.]
where - drive number (1-2)
<fn> - file number (1-80)
You must specify the type 'S' to download 48K
snapshot and 'K' for a 128K snapshot. Register
the letters 'S' and 'K' is important.
Examples:
LOAD d1; "screen" SCREEN $
LOAD d *; "pippo" ships with a tech. drive
LOAD d1; "snap128" K ship 128K snapshot
SAVE d2; "rom" CODE 0,16384
saves memory DISCiPLE!
NOTE: "d1" with a lowercase 'd' with respect
pertains to the DS DD discs (80 tracks, 2 side
ies), the ROM version 3, the only difference
it seems that if you use the 'D',
after the operation, a command CAT.
Early versions of the OS used "D1" (Zaghlah
vnoe 'D') for one-sided discs. This
applies to all cases where you have
specify the field 'd '. Use only
DS / DD disks.
When you save files can be indicated CODE
address auto show in the 3 rd option:
SAVE d *; "runme" CODE 32768, 8192, 33000
if you load it back through the LOAD
CODE, he will run as if on
RANDOMIZE USR 33000.
Each file can be addressed both by
name and by number in the directory, and if
file "screen" is in the 7-th element of Directors
Torii, you can write:
LOAD p7
Please note that if you use
shorthand notation, each file will be zag
Disarmament Affairs, in accordance with its type (ie,
You can download the file to its beginning CODE
flax address).
Naturally, MERGE and VERIFY are analogous
logical syntax.
To delete a file from the disk, enter:
ERASE d1; "file2del"
ERASE d1; "*" is dangerous!
ERASE command can be used
to rename a file:
ERASE d1; "oldname" TO "newname"
To format the disk, enter:
FORMAT d1 dvoyn.plotnost (250 Kbit / sec)
or
FORMAT sd1 single-density
GDOS also extends the flow system,
so you can redirect to
current file and vice versa. When you open
channel to write to a file, a file Tee
na OPENTYPE. Opentype files can be more
lshe 64K.Kanaly available through the normal to
Manda PRINT, INPUT, INKEY $, etc. Examples:
OPEN # 4; d1; "archive"
OPEN # 5; d1; "temp" OUT open for entries
OPEN # 5; d1; "temp" IN open reading
MOVE # 3 TO # 4
MOVE # 4 TO d1; "temp1"
MOVE d1; "temp2" TO # 4
CLOSE # 4
Please note that access channels
buffered disk and data read /
written to disk only when a 512-byte
buffer is empty / full. When accessing files
BASIC, CODE, DATA and SCREEN $ flows through
Remember, these files start with a 9-byte
Nogo header, but the real data come from
10-th byte.
To copy one file to another,
write:
SAVE d1; "file1" TO d2; "file2"
Since the SAVE TO command uses all
free memory, then its completion occurs
leads to reset the system.
You can load / save individual
sectors of the following commands:
LOAD @ d, t, s, address
SAVE @ d, t, s, address
where 'd' - drive number (1 or 2)
'T' - sector number (0 .. 79
plus 128, if the side 1)
'S' - sector number (1 .. 10)
'Address' - the address 512-byte buffer
by sector
For example, you can read the first cross
Ktorov disk (which contains the descriptors
number 0 and 1) through LOAD @ 1,0,1,40000.
DISCiPLE GDOS understand the syntax of the micro
drive, so you can enter commands
like this:
LOAD * "m"; 1; "pippo"
it will load BASIC PROGRAM IS pippo
to drive 1. All of your programs for micro
rodrayva will work under GDOS without change
tions. Remember that PlusD does not support
Syntax Interface 1 (IF1).
9.1 NETWORK
========
GDOS (DISCiPLE) supports a network, owls
patibility with the Interface 1, with some improvement
sheniyami. Together may be connected to 63
Spectrum'ov, and they can share their
resources (files or printers) via cable
3.5mm mono jack. Each station receives
unique number from 1 to 63. Station Number
assigned to the command:
FORMAT Ns
where 's' - station number (1-63).
This command can be entered even
when the file system is not loaded (ie when
system is not booted).
Station number 0 is reserved for
broadcasting (broadcasting). If you enter
FORMAT N0, the network turned off, type FORMAT
Ns, to enable it.
Station numbers are divided into 4 classes:
Number Assignment
0 Broadcasting (Broadcasting)
1 Main Station (Master station)
9.2 Assistants (load the file system)
10-63 students (pupils) or assistants
(Students do not load the file system)
The following network configuration:
1. Network with shared access
(Shared Access Network)
-----------------------------
In this model, station # 1 has
their resources (disk drives and printers) and work
melts as a master. Other stations called
are students, have access to files on
the Master drive and can print to the principle
Tere the Master. Only the master has loaded
reap the file system. Because students are not
must load the file system, they get
rates of 10 and above. If you try
enter FORMAT N8, without loading the system,
you get the message 'Invalid station
number '.
Master can send a file "pippo" allowance
nick number 16 as follows:
LOAD d1; "pippo" first ship file
in this case, BASIC program
SAVE N16 send it to station 16
Sure, you can send files CODE,
SCREEN $, etc. too!
You can send a file to all stations,
using the broadcast:
SAVE N0 send all
Station 6 can receive the program from
the Master, if you enter:
LOAD N1 taken from station 1 (the Master)
Each station can receive broadcast
message as follows:
LOAD N0
Pupils can also send a broadcast to
communication via the SAVE N0 and can communicate
with other students in the same way.
The most interesting is that the student can for
climb to the drive and type commands as if
disk drives and printers are connected to his room
puter. So, the station number 6 can other
a thief in the Master Catalog CD usual commands
Doi:
CAT d1
and download the file "pippo" command:
LOAD d1; "pippo"
Naturally, students can also conserved
nyat files on the disk and the Master can ISPO
lzovat his usual printer commands
LLIST, LPRINT or COPY SCREEN $
Master can force the transfer of data
GOVERNMENTAL station student and vice versa. If you
enter on master'e:
LOAD F4 SCREEN $
Spectrum is number 4 will stop and give
master'u your current screen, which can
so see what is going on
Station 4. Likewise, you can
type:
SAVE F8
to make the station number 8 download
BASIC program loaded on master'e.
Again, all the options command LOAD / SAVE
workable (CODE, SCREEN $...).
Of course, master can use the system
topic as usual.
2. Network of independent stations
(Independent Station Network)
--------------------------
Similar to the previous model, but each
station has its own disk drives and
nter.Estestvenno, all stations in this case
need to download the file system, command
FORMAT should be done after that.
For example, station 4 may send a kodo
vy block station 3 via:
SAVE N3 CODE 32768,16384
and station 3 will receive it via:
LOAD N4 CODE
You can use the station number 0
for broadcasting.
Please note that the station master in
the previous model - an independent station.
Important note: only the station number
1 - 10 can be independent. Station 2
- 10 are called assistants (working as
master, but can not enter the SAVE command F and LOAD F-).
3. Mixed Network
(Mixed Network)
----------------
You can have a network that includes a teaching
Cove, as well as independent stations - in this case
station, students do not have their disk drives
and printers. So you can have more than one
the Master.
9.2. BUTTON SNAPSHOT
====================
When you press the magic button
NMI is generated and control is transferred
the address 0x0066 (102 decimal) of memory
DISCiPLE / + D. The subsequent behavior of the system
depends on the downloaded version.
Under the standard systems (eg systems
themes 3a/3b/3d) you should keep CAPS
SHIFT key while you click the button, then on
the curb will color bars and will be
5 keys are available:
1 = Display screen on the printer
2 = Large print (A4)
3 = Save the current screen to disk
4 = Record 48K snapshot
5 = Record 128K snapshot.
Snapshots are saved to disk with the names of
type "Snap A" and follow the indices, which depend
that depend on the position in kataloge.Pri Conservation
128K snapshot system stops Village
le a file and waits for the user
did not say whether the screen is changed after the opera
tion, the user must respond by pressing
'Y' or 'n'. This is due to the fact that
DISCiPLE and + D, in contrast to the Multiface, not
have a trigger to save the state
Bit 3 Port 0x7FFD, which indicates ka
Koi screen is displayed. Prior expectation
user intervention, the system including
em the first screen (0x4000), so that if every
map has changed, it means that
was once enabled second screen.
Thereafter, control is returned
the interrupted program.
NOTE: The procedure snapshot spoils
a stack of six bytes (PC, AF, and R + F). This can
Jette disrupt some programs
which use a stack of non-standard
Thus (for example, Batman the Movie). subgenera
bnee see snapshot (type 5) in
Chapter [7].
NOTE: The snapshot can not
be used during the network operation.
9.3. ERROR GDOS and UNIDOS
=======================================
Here is a list of error codes that are available
through the RST 20h, for both systems.
Code GDOS G + DOS
2000 Nonsense in GDOS Nonsense in G + DOS
2001 Nonsense in GNOS
02 Statement END error
03 BREAK requested
2004 SECTOR error
05 FORMAT data lost
06 NO DISC in drive CHECK DISC in drive
07 No "SYSTEM" file NO "+ SYS" file
08 Invalid FILE NAME
09 Invalid STATION
10 Invalid DEVICE
11 VARIABLE not found
1912 VERIFY failed
13 Wrong FILE type
14 MERGE error
15 CODE error
16 PUPIL set
17 Invalid CODE
18 Reading a WRITE file
19 Writing a READ file
20 O.K. GDOS 3 O.K. G + DOS
21 Network OFF
22 Wrong DRIVE
23 Disc write PROTECTED
24 Not enough SPACE on disc
1925 Directory FULL
26 File NOT FOUND
27 END of file
28 File NAME used
29 Not a MASTER station NO G + DOS loaded
30 STREAM used
31 CHANNEL used
Code UNIDOS
128 Nonsense in Uni-Dos
129 O.K Uni-Dos
130 Break requested
131 Corrupt sector
132 Sector missing
133 Check disc in drive
134 DOS file not found
135 Invalid filename
136 Invalid sector number
137 Invalid device / channel
138 Wrong stream type
139 Verification failed
140 Wrong file type
141 CODE parameter error
142 Directory not found
143 File has zero length
144 Reading a write file
145 Writing a read file
146 POINT outside file
147 Channel out of order
148 Illegal drive number
149 Disc write protected
150 Not enough disc space
151 Directory full
152 File not found
153 End of file
154 Filename already used
155 File still open
156 File in use
157 Channel already open
158 Protected file
159 Unavailable RST 8
10. System variables and GDOS UNIDOS
======================================
System permennye GDOS and storage UNIDOS
nyatsya the RAM interface and can be measured
are satisfied POKE command to the following:
POKE @ var, value
where var - a variable number
value - the new value.
In fact, the operator '@' is understood as
offset in the RAM interface. Base addresses
following:
0x2000 UNIDOS and G + DOS (+ D)
0x0298 GDOS (DISCiPLE)
A list of system variables:
Number Description
0 Flash border during disk
operations. Set to 0 to curb
did not change. This byte is superimposed on
And the number of sectors, the result throws
to port 0xFE.
1-capacity disk 1 = number of lanes, plus
128 if the two sides.
2 Capacity Disc 2, is similar.
3 Speed moving the head
drive. 1 = minimal (1 ms).
NOTE: Record here the origin may
lock the drive. It can be
unlocked when reinstalling the OS with
tape.
4 GDOS: disable printer port
Centronics (0 = enabled)
UNIDOS: if set, allows
button BREAK.
5 Length of the line printer in characters (for
default is 80)
6 Flag of the printer. If
installed, the codes are sent to the
printer, are not filtered (binary
output = binary output). Need for
sending control codes to
printer.
7 Distance between lines on
printer, measured in 1 / 72 shares
inches. Sent to the printer before
each carriage return (CR) (for
default: GDOS = 12, UNIDOS = 8).
8 Number of transfer lines after the CR (at
default: GDOS = 1, UNIDOS = 0).
9 The left border when printing. This number
spaces to insert before the first
character string (default = 0).
10 Flag of the printer.
GDOS: is established, the driver
printer generates a graphical
representation of characters and the pound
copyright / not sure what it is these,
as characters in the text have been damaged,.
- A.C. / (default is 1).
UNIDOS: flag of the printer (default
0x80).
11 GDOS: number of the station network (
default 1).
UNIDOS: allows Centronics,
similarly variable # 4 GDOS'a (by
default 1).
12 UNIDOS: number of columns the printer (for
default 1).
13 UNIDOS: color screen CLS #.
14 Address Advanced Syntax (2
bytes). This address is called when
error, which is not
refers to the hook codes and syntax
DOS. Can be used to
adding new commands.
Ignored if 0.
16 UNIDOS: e hook
(Interrupt address) (2 bytes).
18 UNIDOS: printer initialization codes
(8 bytes). Sent to the printer after
NEW or before pressing the 'P' in
snapshot'a time.
26 UNIDOS: setting the height of the symbol (8
bytes).
34 UNIDOS: Installation Interline
distance n/72 inch (8 bytes).
42 UNIDOS: plant density graphics
characters UDG (8 bytes).
50 UNIDOS: more codes
initialize (Second initialise
codes) (8 bytes).
58 UNIDOS: Codes for the pound sign (8 bytes)
66 UNIDOS: Codes for the sign '#' (8 bytes)
74 UNIDOS: Codes for the sign (c) (8 bytes)
82 UNIDOS: stores 2 parameters SCREEN $
(Save SCREEN $ 2 parameters) (7 bytes).
89 UNIDOS: setting a graphics mode
(Set dump graphics) (8 bytes).
97 UNIDOS: address additional community
tions of error (default 0x1C68).
99 UNIDOS: error code.
100 UNIDOS: address of a procedure LPRINT (for
default 0x34AA).
102 UNIDOS: the return address by mistake DOS
(Default is 0x0000).
104 UNIDOS: Workspace snapshot'a
(20 bytes).
124 UNIDOS: call to reset (by
Default 0x0000).
126 UNIDOS: invoked at boot time (for
default 0x21A4).
7667 UNIDOS: write here 0 for relief
DOS.
11. ADDITIONAL COMMANDS BASIC UNIDOS
=========================================
UNIDOS - an advanced operating system
theme that runs on DISCiPLE and PlusD.
Distributed in the form of EPROM, various
for these two interfaces. Replace these
EPROM'om chip ROM GDOS. You will need
is the system disk that contains the memory-resident
Part Dos - File "Uni-Dos", launched
RUN command after restarting the computer.
The system file is the same for DISCiPLE and
+ D (hence, we believe the name UNI-DOS). He
has a length of 6654 bytes, "Missing" 2 bytes
contain a checksum, which is often
DOS checked to detect damage
assertion sistemy.Etot mechanism works Euclidean
flax is good, and sometimes you can see,
that the system file is reloaded without NEs
Nogo out advice: do not worry! :) Pom
filamentary that DISCiPLE address RAM and ROM variables
ponent UNIDOS'om. See chapter [2], [3.1].
The main features UNIDOS - a powerful system
system subdirectories excellent tools ne
chati and has many professional touches
to find during use.
UNIDOS supports a set of standard
GDOS functions and G + DOS (some, however,
have been changed) - see them on the proper
chapter. Something is missing, in particular, ce
tevye procedures - for them is not enough memory
TUE. FORMAT operator is now not in the set
teams, this operation is a special
anti-virus application, which lies on the system disk.
Files have two attributes: hidden
(Hidden) and secure (protected). Hidden
files do not appear in the directory is protected
nye files available for zapisi.Disk floor
denotes the name (a string containing up to 10 symbols
fishing) during the formatting.
In UNIDOS appeared subdirectories. They pa
been operating exactly as you would expect, can
specify a file name with full path:
"/ Dir1/dir2/file"
Note that the slash (slash) '/' IS
uses to separate the directory names,
as in Unix. Paths can be relative
(From the current directory) or absolute
(Ie, relative to the root, start with
'/'). There is no limit to the depth of the tree
directories. The root directory has a fixed
uncompensated capacity to 80 file entries
and subdirectories can be of any capacity
/ No more than 256 files - see the handle .- AC /.
If a line ends with a slash, then
is the name direktorii.Spetsialnye names Dir
Ktorov. " and ".." indicate the current and
parent directory.
Equivalent to the command 'cd' (change dir):
IN d1; "pathname /"
with a slash at the end of the path (as it is long
zhno be a directory name), this team is chosen
raet current directory and current drive
vod.Vy can also use the IN only
to select the current drive if you do not introduce
Dete path and the semicolon.
There is no standard commands to create and succeeded
leniya direktoriy.Sm.nizhe of files CREATE.
Operators LOAD and SAVE has not changed;
appeared more condensed form
for LOAD (for MERGE and VERIFY too):
LOAD p "filename"
which loads the "filename" with the tech. disc.
Executable files (EXECUTE files) can
be run through:
LOAD d1; "exe" X,
In the SAVE statement you can specify the key
chevoe word OVER, which disables the verify
CGS to overwrite:
SAVE OVER d1; "program"
This command will overwrite the file without asking
for confirmation.
ERASE command has not changed. If, after
ERASE statement added NOT, it does not deduce
converge error messages. You can not
delete the file if it is currently open
or if it is protected.
Operator CAT has a new format:
CAT d1
CAT d1; "pathname"
You must now specify 'd1' instead
'1 'As in GDOS. All options are taken into
GDOS, razresheny.Esli you add NOT after
CAT, and the list will be hidden files. If
you specify a directory name, CAT will display with
derzhimoe directory.
It is now possible merger (MERGE) and
code files, but the only effect of
is in that removed Autorun.
MOVE operator works as usual (times
resolved OVER) and can now be used
to copy one file to another, for
changing the old SAVE TO manner:
MOVE [OVER] d1; "file1" TO d2; "file2"
MOVE [OVER] d1; "file1" TO "file2"
MOVE can copy files snapshot, MDRV
and opentype, even longer than 64K. It can
copy directories if the path is
(Ending in'/'). MOVE, in contrast
from SAVE TO, uses only the memory between
BASIC and machine stack, and therefore does not require
buet reset the system after completion.
Team CLS can be used to
reset the screen colors to the state, which lies
in the system variable 13:
CLS #
In UNIDOS appears a powerful tool
- File access (RANDOM
ACCESS FILES), ie, the files can OPENTYPE
processed in any way, and not just
row. To open a file with an arbitrary
access operator is used in OPEN #
as follows:
OPEN # 4; d1; "file" RND
If you specify IN instead of RND, then the file
will only be available for reading, but also with
random access. On a single file
simultaneously can be connected to 16 ka
channels. This statement:
OPEN # 4; d1; "file" RND <length> [, ]
creates a file specified length and fill
it specified a byte (if available!). Not
Remember to close all or clear all channels
before you eject the disc from the drive,
otherwise, after changing the disc when trying satisfied
Thread DOS commands will result in errors.
You can work with the channels through
normal commands PRINT, INPUT and INKEY $ in
all variations. Available and new commands:
POINT # 4, <offset>
set file pointer to the specified
offset into the file with random access,
connected to channel # 4. When crossing
Borders file error.
CLEAR operator now has two forms:
CLEAR #
CLEAR # * []
First clears all the channels without creating
openout file, the last closing of one or
All disk channels, creating openout file
(? - A.C.) and emptying the buffers. You can
separate empty (flush) buffers, without a
covering the file:
OUT #
As we said above, in particular UNIDOS
attention is paid to PRINT. LPRINT command and
LLIST work as usual, but now re
directed to the parallel port interface
sa.Mozhete make a print screen via:
SAVE SCREEN $ 1 or SAVE SCREEN $ 2
These 2 options have separate sets
parameters. 2-th mode can be redefined
Delen user through a change in the system
facil variables. These procedures also vyzy
vayutsya snapshotnymi keys '1 'and '2'
(See below). The general form of SAVE SCREEN $:
SAVE SCREEN $ # flag [, pass [, margin [, y
[, X [, h [, w ]]]]]]
where flag = horizontal increase (0-7)
+ 8 * vertical increase (0-7) +
+ 64 to convert the colors +
+ 128 for the print side.
Increase of 0 means 8.
pass = the number of passes for printing one
line
margin = left border of the symbols
y and x = lev.verh.ugol printed box
w and h = width, height, printed box
For details, see the system variables.
Following useful operator implements
mechanism of ON ERROR GOTO:
LINE 9000
includes error trapping, and all errors, except
OK, STOP and BREAK, intercepted, and the
control is transferred to the specified line, where
program can determine the type of error
reading a system variable 99 via
(PEEK @ 99).
UNIDOS also implements a new FUNCTION
BASIC; they are enclosed in parentheses, ie, pi
shutsya in the form of (<function>). We have already seen:
(PEEK @ offset)
which reads the system environment variable (in about
general case, the RAM address offset +8192).
Length of the channel random access
(Random channel) can be found via:
(LEN # )
where:
(POINT # )
returns the current offset pointer
file, or 0 if we are at end of file (EOF).
Specified number of bytes can be pro
read from any channel via:
(IN # , <length>)
Alternatively you can check for a file or
directory via:
AT d1; "pathname"
that returns 0 if the file does not exist
or the number of its directors, if it is found.
A new type of files -
CREATE. This program, native
(Usually new teams or expand sin
taxis) that are loaded between the domains
Tew, channels and area of BASIC, so they
lost after the NEW or reset. You can
load and save files create by:
LOAD d1; "pathname" USR
SAVE d1; "pathname" USR , <length>
You can upload as many files, create,
as will fit in memory. System
ROM that accompanies UNIDOS, contains two
create a file with the following add. functions:
"Ext_code" includes:
FORMAT d1; "diskname"
to format the disk preserving diskov.Imya
varies in the last byte of the first element
root directory.
(LINE)
returns the number of the current drive + 128,
if the disk is write-protected, value has
opposite sign, if there is no disk in the drive.
(STR $ # )
returns an empty string if the channel is not on
Indoor, or 'd', if it openout flow or
'D', if a stream with an arbitrary sufficiently
assistant, or letter that uses the channel.
"Dir_code" includes:
SAVE [OVER] d1; "dirname" CAT
creates a directory capacity in the specified
file number.
ERASE d1; "dirname" CAT
removes the specified directory.
(STEP [d finish without interruption
(Terminate with no interrupt)
/ "At the same chip do not produce
confirmation signal the completion of the
command "(ibid.). - A.C. /
Command Name Code Notes
FORCE_INTERPT 0xD0 End team
specified condition
(Force interrupt)
The status register (R)
Some bits have different meanings for
depending on the last serving team.
Following commands like 1:
Bit Value Notes
0 BUSY busy, wait for BUSY = 0
before applying the new
Team
1 INDEX PULSE Index pulse
2 TRACK00 head on the 0-th path
3 CRC ERROR Sector is damaged
4 SEEK ERROR Error Search
5 HEAD LOADED head lowered to the disk
6 WRITE PROTECT disk is write protected
7 MOTOR ON motor is turned on or
drive not ready
After the command types 2 / 3:
Bit Value Notes
0 BUSY busy, wait for BUSY = 0
before applying the new
Team
A DRQ is required to read /
write to
data register
2 LOST DATA Error (for example,
complied with the order
exchange)
3 CRC ERROR Sector is damaged
4 RECORD NOT FOUND nonexistent address
(Track / sector) or
ran out of data
read (no more data
to read)
5 REC.TYP / WR.FAULT Reading: record type
(A type of dam); Record:
write error
6 WRITE PROTECT Protection of records
7 MOTOR ON motor is turned on or
drive not ready
REGISTER TRACKS (RW)
Contains the current track number / s point
of the program. - A.C. /.
REGISTER OF SECTOR (RW)
Number of sects. for read / write operations.
Data Register (RW)
Through it, read and write data in
controller. To check the status register
before reading or writing bytes of data.
14. AUTHORS AND CONTACT INFORMATION
==============================
This document was from Luca Bisti
Ramsoft. Stefano Donati wrote the chapter 3.1,
5.1, 9.3 and helped with bug fixes.
Thank Dominic'u Morris'u, which gave John
information on the hook codes 43h, 44h, 45h and 47h.
Petri Andras document sent to the head
12.1.
You can contact these people to
the following addresses:
* THE RAMSOFT STAFF:
Ramsoft WHQ (WWR) ... ramsoft@retroplay.com
Luca Bisti ...............................
.......... Luca.bisti @ studenti.ing.unipi.it
Stefano Donati ....... the.king @ flashnet.it
* Dominic Morris .......... djm@jb.man.ac.uk
* Petri Andras ............ petri@mit.bme.hu
You can always get the latest
version of this text on the home page
RAMSOFT:
http://www.retroplay.com/Mecenate/ramsoft
(World Wide Ramsoft)
If this address is working, try:
http://www.geocities.com/SiliconValley/
Bay/5673
There will be a reference to the current URL to
World Wide Ramsoft.
See you there!
Other articles:
Similar articles:
В этот день... 14 November