╔═══════════════════ ═══════════════════╗
║Section:Opening; ║
║Article: Capabilities of KR1818VG93; ║
║Music:Kurt; ║
║Text: Vorozhkin Alexander. ║
╚═══════════════════ ═══════════════════╝
The article will be useful for those who want
understand the KR1818VG93 device, so
and for those who want to create their own
programs for custom formatting
writing floppy disks, reading unusual formats,
removing and installing protection, etc.
The KR1818VG93 microcircuit is the center
nal element of the NGMD "Beta disk". It can-
can write information to disk with one
Nar and double density. Maximum
write and read speed at single
density is 250Kbit/sec, and at
double density - 500Kbps.
The microcircuit generates control signals
disk drive, providing clamping
magnetic heads to the disk surface and
stepper motor control, data for
writes to disk in sequential code,
recording data pre-compensation signals,
write permission signal.
From the drive to the microcircuit yes-
data, from which, using an external circuit
it is necessary to highlight: reading data and im-
pulses synchronization, and also arrives
signal of protection against unauthorized
pussy, whichgenerated when taped
slots on the floppy disk, and two binding signals
ki to disk: TROO (head on track 0
and index pulses generated by special
hole in the floppy disk) comes from them
numbering of sectors on the track.
It remains to give examples of programs that
which will help you finally sort out
by programming the microcircuit and working
that of the "Beta disk" controller.
To format a floppy disk, use
next command RECORD TRACK. Immediately after
passage of the index pulse signal
DRQ requests data to be written to the
horn. In this case, bytes 00...F4 are written -
without change, and the rest are perceived -
are expressed as commands:
Byte Single Double
density density
F5 Not allowed Write code and
start counting
control
code
F6 Not allowed Write code
F7 Write two Write two
byte control byte control
nogo code nogo code on
disk
F8-FB, Write F8-FB Write F8-FB
FE and start pods- accordingly
even control-
no code
FC,FD, Write FC,FD Write FC,FD
FF and FF correspond and FF correspond
veno veno
Here are examples of the contents of the array:intended for transmission to VG93
when formatting a floppy disk from a single
density and sector length of 128 bytes and
double density and sector length
256 bytes. In the examples we will indicate the code
number of bytes with this code: in brackets
and the purpose of these bytes.
Single density: FF or 00 (40) -
space after index pulse ;00 (6)
FC (1) - so-called index mark;00 (6);
FE (1) - title label; XX (1) - number
tracks;XX (1) - side number 00 or 01
XX (1) - sector number 01...#1A;00 (1) -
sector length 128 bytes; F7 (1) - write
two bytes of control code;FF or 00
(11) - space after the title;00 (6);FB
(1) - data label; XX (128) - space for
placement of the data array; F7 (1) - for-
writing two bytes of the control code; FF or
00 (...) - space before the next section
rum
Double density;4E (80) - space
after index pulse;00 (12);F6 (3)
code entry C2;FC (1) - index mark
before the first index array;4E(50)-
space;00 (12);F5 (3) - write code A1,
start of check code calculation;FE
(1) - title label;XX (1) - pre-number
horns 00...4C;XX (1) - side number 00
or 01;XX (1) - sector number 01...1A;01
(1) - sector length 256 bytes; F7 (1) - for
writing two bytes of control code; 4E (22)
space after the header;00 (12) - byte well
lei, labels. At the end of the array - control
code and one byte FF;F5(3) - record A1, on
start of control code calculation;FB (1)
data label;XX (256) - place for placing
data array; F7 (1) - write
two bytes of control code;4E (...) -
space before the next sector.
Calculate the length of the last space
themselves, based on the fact that the entire array is given
number for recording on a track must be
mother no more than 6 KB. Subsequent se-
which are marked in exactly the same way as the pe-
first. The data array cannot include
dy that the microcircuit can interpret
run as commands. Examples given
should not be taken as the only
possible.
Using the command OUT 255,...set the required
configurable system configuration before executing
command. The assignment of the bits of this
port is as follows:
0th and 1st - selection of float drive (0-A,1-B,2-C
3-D);
2nd - reset the VG93 chip
(0 - reset, 1 - work);
3rd - imitation of ready signal
magnetism to work
nal heads and index
impulses (1 - ready);
4th - which side of the disc
work(0 or 1);
6th - single density for-
pussy (1) or double -2
To work with the 0th side of the disk into the port
#FF is usually written #0C (12), and from the 1st
side - #1C (28).
Now let's try to move the magnetichead to the track we need, for example,
eighth. To do this, execute the command "BOS-
BECOMING": OUT 31.8. The head is moving
returned to track 0. Now let's put it in
RgDor current track number: OUT 63.0,
and in RgDan - the number of the desired track:
OUT 127.8 and execute the "SEARCH" command:
OUT 31.24. As has been repeatedly stated,
read write commands must
in your program directly follows
follow auxiliary commands.
For example:
...
50 OUT 31.24
60 PAUSE 50
70 RANDOMIZE USR 30000
...
At the address 30000 is located
program in machine codes. Let us give an example:
measures of such a universal program for
reading and writing information:
ORG 30000 ;Entry address
program
D.I.
LD HL,#E800 ;Starting address
data array
LD A,#F4 ;Instead of #F4 here
can be substituted
code
OUT (#1F),A ;any other co-
write commands or
reading
LD C,#7F ;Port #7F - RgDan
VG93 microcircuits
CALL METKA
EI
RET
METKA IN A,(#FF) ;Read the auxiliary
port
AND #C0 ;Isolate and analyzeLet's configure the bits corresponding to the signal
JP Z,METKA ;nalam DRQ (6th) and
RET M ;INTRQ (7th) VG93
OUTI ;To execute
JP METKA ;reading commands not -
you need to replace OUTI with INI
In this form, the program will execute the form -
Titting the floppy disk, i.e. marking the track,
on which the magnetic head is located,
according to the contents of the array,
located in memory from address 59392.
The contents of this array can be found in
the above text dedicated to the command
"RECORD TRACK".
If instead of the command code "ROAD RECORDING"
KI" substitute the command code "RECORD SEC-
TORA" and write down the number in advance
the desired sector in Prsec (for example, command
OUT 95,N), then the information is located
stored in memory from address 59392, will be written to
this sector on the disk. Similarly, you can
read from disk and write to memory
from the address 59392 (or another - according to your
desired) any information available to
mandam "READ SECTOR", "READ ADDRESS",
"READING THE TRACK".
Share your thoughts about the article