ZX Pilot #29
30 сентября 1998 |
|
HARD and SOFT - Error STS v6.2 and fixing it.
HARD AND SOFT (C) IVAN ROSCHIN Error in STS 6.2 and fixing it. When referring to drive STS 6.2 (as well as older versions) believes that in case the actual recorded tracks VG93 The track number on which the magnetic head drive. But for various reasons in case the track may contain invalid value, and in this case, any operation with a disk will be completed with an error. Suppose we loaded the STS with the drive 'A', and after load magnetic head is located, for example, the 10-th path (And the contents of register paths, respectively, equal to 10). Establish Drive = 'B'. What if this happens? STS will not be initialize the drive to install the magnetic Head to the initial state (at zero track). STS will not be perform and read the first team got the title sector to find out what path is the magnetic head (like the TR-DOS). STS believes that and drive 'B' magnetic head is on the 10 th track, and move it to 10 steps backward for positioning on the 0-th track (to read the directory). If the magnetic head really is on the 10 th track or on track with smaller rooms, all completed successfully. But otherwise If, you know - after a long wait Color border changes to red, signaling a disk error. Moreover, we can not go back to the drive 'A' - STS believes that he has already established a magnetic head on the 0-th track, and she remained at the 10 th ... Such troubles arise not only when working with two drives, but, for example, when debugging your own programs to the disk, which alter the contents of the register track. Assembliruem such a program, run - and then STS refuses to work with the disk. And the old version of STS in general stuck in disk errors ... Fortunately, there is a simple way to overcome this problem: enough to go to the TR-DOS, see the directory of the drive and return in the STS. In this case, the contents of the register comes into the track conformity with the reality that the magnetic head drive. And if you go to the TR-DOS does not want (or not)? In this case will have to make some changes in the STS. How did this do? You can determine where the STS routine is called reading directory (it is called, and when you change the drive), and before each its challenge to implement code that initializes drive - and the problem is solved! But after some thought, I found more simple way: instead of initializing the drive should write to register tracks some sufficiently large number (at At least more than 160), for example, 255. In this case the STS at positioning of the 0-th track moves the magnetic head on 255 steps backward, and wherever she was, she must be the 0-th track (as required). Thus, changes made to the STS: routine reading a directory is located at # E7F8, and called it the following command: # E495: JP # E7F8. At # E495 put a team on the transition piece of software that writes the register 255 in track. That this fragment: LDA, 255; this number track record in the register LDDE, # 1E3A; in ROM TR-DOS: # 1E3A - OUT (# 3F), A: RET CALL # E4D3; appeal to the TR-DOS ROM JR # E7F8; proceed to read the directory Where can you find for him a free place? At # E7CF find a program section, reset the attributes of the screen. STS sometimes uses for its own needs lower third of the screen (# D000-# D7FF), and that it was invisible, for it establishes a Null attributes. # E7CF: EXX LDHL, # D800 LDDE, # D801 LDBC, # 02FF LD (HL), L LDIR EXX Here and place our fragment: # E7CF: JR # E7DD; to bypass the fragment # E7D1: LDA, 255 LDDE, # 1E3A CALL # E4D3 JR # E7F8 At # E495, respectively, put the team JP # E7D1. Well that, one can only write the modified STS on disk - and You can work with. ° ° ° ° °
Other articles:
Similar articles:
В этот день... 23 November