Deja Vu #06
30 сентября 1998

CODING - Ultra-fast disk drives SPECCY.

<b>CODING</b> - Ultra-fast disk drives SPECCY.
SoundTrack: ... HAPPY RAVE 4EVA ... RLA / CRG
__________________________________________


Author: Card! Nal / PGC / BD
__________________________________________



  Ultrafast formatting disks

        Speccy - this is reality.



    - Something you look today, it does not matter.

    - Yes piss head hit :-(

    - Why a black eye?

    - And you thought the pot by flying?

                         (Instead of the epigraph)



   Hello, dear readers Deja Vu! C
you again myself. At this time I'll tell you about
quick format TR DOS disks. On
pages Revyushek repeatedly appeared
articles, in which people expressed different ideas at the 
expense of formatting track per revolution. Assumptions were 
many but they all boil down to one thing - need to format the 
track is not full, and very nearly gets to the end and abort 
the operation, "a track record." After This should have time to 
repositioning drive heads, and before The current track is 
finished, ie Prior to joining index pulse, it is necessary to 
do everything to prepare for formatting the next track. But the 
rub is that the interrupt formatting is almost impossible. A

Why? - You ask. Because the recording track is commonly used 
routine at # 3FCA in ROM TR DOS. That's it listing, HL points 
to the data: 

# 3FCA IN A, (# FF)

        AND # C0

        JR Z, # 3FCA

        RET M

        OUTI

        JR # 3FCA



   It shows that, indeed, yield
carried out by the arrival of the index pulse. But in Rom TR 
DOS have another routine to write data to disk. Located it is 
at # 20AF: 


# 20AF LD B, 1
# 20B1 IN A, (# FF)

        AND # C0

        JR Z, # 20B1

        RET M

        OUT (C), D

        DJNZ # 20B1

        RET



   Here we will take it on vooruzhenie.Zdes
immediately evident that the output is possible not only
on the arrival of the index pulse, but when
Register B will be equal to zero. But first, let's count. Drive 
spinning discs at a rate of 300ob/min. One turn drive takes 0.2 
seconds. On one track is about, 6150 bytes means for writing 
one byte to be spent no more than 0.2 * 50 * 70000/6150 = 113.8

cycles. But since Brake is a Spectrum
we assume that the limit of 100 cycles.
So, to use the procedure for
at # 20B1, to speed up
the process of calling this procedure with the required
data in the register D. One irresponsible
People argued that it is impossible, but it
was wrong. You can do this, approximately
as follows:


        LD HL, # 3D2F

        LD (STACK1 +1), SP

        LD SP, ADRTAB

        LD C, # 7F
FAQ POP DE

        LD B, E

        JP (HL)
STACK LD A, # D0; forced interruption

        LD C, # 1F

        JP (HL)
STACK1 LD SP, 0

        RET


Table Format ADRTAB as follows:

ADRTAB DEFB COUNTER; how many bytes to write

        DEFB BYTE; bytes to write

        DEFW # 20B1

        DEFW FAQ; Tag FAQ

        ...
and so on ... ends with a table like this:


        DEFB COUNTER

        DEFB BYTE; last byte to write

        DEFW # 20B1

        DEFW STACK

        DEFW # 2A53

        DEFW STACK1



   The speed of the procedure = 92 cycles,
As you see, is enough time to
time to give sleduyutsy bytes to write
it to disk. Also on track are not recorded in all the 6150 
bytes, but 5980. After recording the last sector of the 
checksum, formatting track breaks. You can even speed up the 
procedure, if the HL Record # 3D30 instead # 3D2F. Speed ​​at 
the same time to increase by 4 cycles and was 88 strokes. True 
some have argued that some of Spectrum for switching pages-ROM 
requires a couple of other CPU cycles. I well imagine how is, 
roughly speaking, switching ROMs. PZU'shka TR DOS is enabled 
when the bus address, addresses # 3D00 - # 3DFF, in addition, 
at this time must be connected to ROM BASIC-48, rather than 
BASIC-128, TR DOS otherwise not connect. All are engaged in IC, 
and in my CPU cycles are not being. My opinion that the TR DOS 
can be safely handled and by # 3D30. Everything should work. I 
personally do not heard that someone did not work the game:

DOUBLE XINOX; 48 irons (crack by MAFIA)
or there ZX-FORMAT'y. But in these programs in all used # 3D30. 
Saw it myself. I change my mind if I can prove (Or better show) 
the reverse. But I digress. Of course, before calling this 
program must unleash the drive to position the head, correct 
values ​​in the table (number of sectors and tracks), and then 
another and be able to read the status register VG'shki

(Suddenly, by a plastic disc). Fully program
formatting I do not give, you will find everything
in the source of the formatter in Appendix
magazine named FASTFORM.H format
assembler ALASM. Now I say that the tablet
ADRTAB not very big, a little less than 1.5Kb.
About the other stuff I will not speak, you
themselves understand everything, download the source code with 
detailed comments. Try to reformat the drive and then test it 
for quality RDS'koy. It is advisable to use high quality floppy 
disk. After all, the actual quality format is not done, but 
High speed - 32 seconds! 

   Finally I want to say one explanation
for some other topic. Some, again unconscious elements are 
trying to zapudrit brains, saying the following. Like, for 
Scorp'e can directly access the registers of the SH. And for 
that to put in the port # 1FFD unit to connect the page

RAM instead of ROM and freely programmable
VG'shku. And I say that so access to registers directly SH 
impossible. Sam checked in various ways. Want

wish that the idea should first check
in fact, before so to speak. But
on Scorp'e can easily read the status register of the 
controller. Apparently the developers took into account this 
fact, and at # 3FF3 flashed command: IN A, (C): RET. That's all.


                   Bye.




Other articles:

Aperativchik - On the control of the shell DEJA VU

Aperativchik - Accuracy - the politeness of kings, the new issue of the journal.

Topic - Fun Top-98 or the obvious and incredible.

Topic - An Interview with Vladimir. Balchukeem before Fun Top-98.

Topic - Results Fun Top-98.

Topic - Photos from Fun Top-98.

drop of solder - ROM, which we vybiraem.Obzor ROM: Penatagon128, Scorpion ZS256, Spectrum128-branded version, Spectrum +2, Spectrum +2, Spectrum +3, ROM from PROFI CLUB.

drop of solder - Additional graphics mode 512x192.

SOFTWARE - New demoscene: FOREVER, ADRENALIZE, BOOM, TYRANY, BLAME, EMERGENCY, KATNARSIS.

SOFTWARE - New game programs: A LAST HERO of the LIGHT FORCE, MONSTR LAND, MIRROR.

CODING - Ultra-fast disk drives SPECCY.

CODING - Lessons from the encoder: Fractal paparatnik.

CODING - Driver read / write.

CODING - Lessons from the encoder: Generilka balls.

CODING - The algorithms of data compression.

CODING - On obechatke Listing of stack (5 rooms).

ANOTHER WORLD - WINDOWS-95 and beyond.

ANOTHER WORLD - News from the INTEL-a ...

ANOTHER WORLD - work PC and software

Hall of Fame - On spektrumskih journals.

Hall of Fame - letters to the editor.

Hall of Fame - On CD-ROM project from the city of Kemerovo.

Seven and 1 / 2 - Features a national ruleza 2 or ordered motion of electrons.

Seven and 1 / 2 - Guide for consumers of beer.

Seven and 1 / 2 - What if your computer does not work (Instructions for Hacker).

Seven and 1 / 2 - Guessing on cockroaches (Advice to a beginning hunter).

Seven and 1 / 2 - Instructions for use with a ballpoint pen.

attempt at writing - Poems Bazhenova: Candles, Confusion, Fall, Bezishodnost.

attempt at writing - Many Adventures of Winnie the Pooh (Part 3).

attempt at writing - Daily Hacker ordinary.

Advertising - Advertisements and announcements ...


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Misc - the value of certain phrases in Eastern European languages: Poland, Czech Republic, Slovakia, Lithuania, Latvia and Estonia.
Our relish - Today I will teach you how to prepare salad konsepvipovannoy pyby.
For Coderz - Writing archive. Practical principles LZ packaging.
Profi Club - Music Editors in CP / M: ADJ, Synthmaster v1.3, Music.com.

В этот день...   28 April