Deja Vu #06
30 сентября 1998 |
|
CODING - 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:
Similar articles:
В этот день... 21 November