ZX Review #5-6
04 ноября 1997 |
|
forum - Reduction in the time format. On the recording sectors while formatting. Rebuilding the screen for one interrupt.
(C) M. Kuzmin, Moscow Region. REVIEW In an article about Roshchina reduction in the time format. The above is there a way theoretically good, the practice worse: on different drives while formatting a single track different, and therefore bind to the time zero can not be done. But in general, as can be done during the interruption formatting, if the program will hang in DOS'e on the block record?? Writing sectors simultaneously with formatting - just a waste of time. It lost to scan sectors to format (To detect # F5, # F6, # F7). Yes, of course, if these sectors do not have to track, then the payoff will be, but if any one sector "Unclean" (especially from the past on the track), it still lost the turnover drive on his record - loss is clearly greater. Ca. Ed.: Indeed, if the formatting a track by means of TR-DOS, you can not interrupt it. Hence, to directly control the VG93. An example of an algorithm format: - Written in the instruction register code to VG93 Manda formatting; - Grant to SH bytes corresponding selected format, as long as will be formatted in the last sector; - Use the force break; As can be seen, while formatting a track does not play a role, because it is generally not used. But it turns out one unpleasant fact: not enough speed Z80 in order to give on SH bytes to format. Indeed, the disc rotates at a speed of 300 rpm for 1 turnover is spent 0.2 seconds. or 700,000 cycles Z80. Since the track is recorded about 7000 bytes to write each of them must be spent not more than 100 cycles Z80. Meanwhile, the fragment program that writes to the disk a bytes will be performed at least 120 cycles: 140. ; Let the registers have the following meanings: ; C - # 7F (register address data) ; HL - # 20AF (address n / n write bytes) ; IX - address the following command to which , It hands over control after burning ; Bytes. LD D, B 3, 7 clocks PUSH IX 3, 1915 PUSH HL; 3 11 JP # 3D30; 3 10 # 3D30: RET; 3 10 # 20AF: LD B, March 1, 7 # 20B1: IN A, (255); 3 11 AND # C0; 3 7 JR Z, # 20B1; 3 7 / 12 RET M 3, 5 / 11 OUT (C), D 3, 1912 DJNZ # 20B1; 3 8 RET; 3 10 2 And all because it registers the SH appear in the address space only at the moment of TR-DOS. If there was free access to the registers, without the involvement of TR-DOS, then ultra-fast format would be a reality! All of the above applies to the record sectors simultaneously with formatting. The check for the presence of the sector of bytes # F5, # F6 # F7 and should be done direct formatting, so that the extra time it takes. Yes, if these bytes will be found, lost another turnover disc for recording sector. But not so often they occur - for example, on a disk with text files of their may be absent. Corr.: Now, about rebuilding the screen for one interrupt: as mentioned in various sources, it is impossible, but in specific cases, it is a very really. Take, for example, ACTION, LIFE SUX - demo. There's no just rebuilt the whole screen, but in a grid is displayed under a rather large sprite in the second line runs. Done this is simple: how could note that these screens are composed of identical segments (for example, in LIFE SUX 2 * 2 familiarity). Program to output a single line is this: LD SP, scradr +1 LD HL, BYTE PUSH HL; 16 times (16 * 2 = 32) As can be seen, the output of one line takes 11 * 16 +10 +10 = 191 bar, and as one line of video controller passes for 224 cycles, there are still plenty of time (if take into account also the upper and BORDER below). HELP ME! I have done recently scroller (a hobby I have is: do different VIEWER'y, text scrollers, help'y, etc.), and faced with a problem: stack was repositioned on the screen (Read / write lines), but were included IM 2, and although the program Interrupt rearranged in the stack buffer, the screen is still spoiled, because Z80 when you call IM 2 still puts on a stack of two bytes ... In the ZX-FORMAT'e Mednonogov said that the combined output Music and sprites through the stack - can anyone help this issue - would be very grateful ... Ca. Ed.: If the transfer of data through the stack and allowed termination, you must carefully plan time distribution Z80. Suppose that the interval between two interruptions 70,000 cycles procedure interrupt handling is 10,000 cycles, and the procedure for SCR, with stack shear screen content, is 100,000 cycles. Then it is better to break this procedure into several parts, say, 5 for 20000 cycles each, and the program will be as follows: HALT; performed procedure for handling ; Interrupt - 10000 cycles CALL SCR1; 20000 CALL SCR2; 20000 CALL SCR3; 20000 HALT; 10000 CALL SCR4; 20000 CALL SCR5; 20000 CALL SCR1; 20000 (next shift) ...
Other articles:
Similar articles:
В этот день... 21 November