Deja Vu #08
31 мая 1999
  TR-DOS  

CODING - How to create uncopyable whereas sector.

<b>CODING</b> - How to create uncopyable whereas sector.
AY-Track: -= 17 INSTANTS OF SPRINGS 
=__________________________________________ 


(C) ALLEN / XLNC.
__________________________________________



     How to create uncopyable whereas sector

     ...............................


First paragraph. Instead of joining ...



   Many of us frequently encounter such
programs that are not in any copy
        Xia no copiers. And this

        well, since The authors of these programs

        have the opportunity to dispose of

        their product such as this ho
        tyat they, and not Uncle Vasya barahol
        ki, who is used to make

        money with the help of McDonald Copy.
Do not think it wrong if I say that in every
the city has its own uncle Vasya and even without one.
And to the authors raises the question of how
would be so tricky to write to disk, what would it no one can 
copy so even that it can be read.

Many authors have spit on this issue and leave everything to 
chance - maybe a couple of bucks perepadet of lamers who do not 
even unaware of the existence of Uncle Vasya on

flea market. Others are turning to a friend
IBM'schikam. Still others are beginning to be subverted
on the Speccy, though, everything is still on
Speccy done is copied as easily
(Remember, there were times when not everyone could copy the 
IS-DOS). Of all these ways the most appropriate was the second 
based on uncopyable whereas sectors. But it is associated with

drop dead expenditure of time: you can hover to run to 
IBM'schiku and back home uncopyable whereas with a bunch of 
disks. Well, when HRC is at home, but it's expensive, and 
inconvenient. 

Item Two. Closer to the case.



   The article is about how you can
do uncopyable whereas sector Speccy.
To start sort out why it
Some sectors are not copied. Yes, because they can not be 
formatted using standard Speccy. That is, create a title for 
this sector to the SH then found it and knew where to write

data. And that can prevent you create it?
Yes, one simple fact: not all bytes are received by the data 
register the SH during the recording tracks are transferred to 
disc directly. There are three bayta that can not be written on

track the standard means: it
# F5, # F6, and # F7. The reason is simple: it's control codes. 
(By the way, we are talking only about mode MFM. FM mode to use 
is inappropriate.) Valid they only (!) Mode recording track, 
ie, format. The first of these causes account code # A1 on 
disk, which is part of sync, in which SH determines that Next 
comes the title of the sector or the same data. But we will not 
go into details. The second of these causes account code # C2 on

floppy disk, that is again harmonic registers
not what they want from it. But the most useful code - code # 
F7, because it generally causes Record checksum, which is

two bytes, which usually breaks all heading. And of course, 
this code # F7 on drive itself is not passed. So what happens 
when the SH is trying to create on the road such sectors. 
Here's what: instead of parameter (the number of the road, 
head, sector, length of the sector), which recorded the number

# F5, # F6, or # F7, prescribes # A1, # C2
or checksum came bytes
that is practically a random number, and double-byte, that is, 
his record demolishes even the order of numbers, and what comes 
after # F7, written not in a position where it was actually the 
title of full destroyed. And as the sector will have no

TE parameters, the SH does not write data from uncopyable 
whereas sector anywhere, that is, if there were clues ksorki, a 
copy will be at least broken. Of all of the above Private 
encoder can be concluded that uncopyable whereas a sector on 
the track Speccy means impossible (at

least, this idea runs through all of the text). You can, of 
course, to distort and make checksum is these three numbers, 
but, recognizing frankly, I do not know for sure what the 
algorithm is this checksum. Especially because there is

much more simple way ...

The third point. But how?



   Here's how. The numbers listed above,
can not be written on the track in all cases
except one. I do not know what caused this
effect, most likely it is some kind of flaw of the 
microcontroller program VG93, but us this stuff is even on 
hand. A case it is this: after writing

Checksum, SH somehow writes
to drive an absolutely any byte, including
the three ruleznyh. If you understand how to make the WG to 
create a sector number (length) # F7, can stop reading. If you 
have poorly understand with SH, read and memorize. For a start 
tell you what is in the sector (or, rather, as his form). 

# F5, # F5, # F5
# FE


CN-cylinder number. Like all the other parameters, this number 
is only a formality, it does not affect the positioning of the 
head during formatting, and only recorded on

drive, with all the exceptions listed above.
HN-head number. Although the range of values
this number is only a single bit, the number of
Again, you can write any, other than those
most three, and again for the second harmonic is indifferent 
while formatting. SN-sector number. Everything is still the 
number simply transferred to the track.

SL-length sectors. All the same, the number of
also postponed.
CC-checksum. For the record it should
once written in the data register number
# F7.


22 bytes # 4E
12 bytes # 00
 3 bytes # F5
 1 byte # FB


These sectors.


(Incidentally, at a reasonable question, given
some, like this: "And why, when
Restoration does not write data immediately, without a team 
record sector, and during formatting? "reply to know those

who still do not understand: if the data will fall
all the same ill-fated three bytes can be written
bullshit. So, if you wish - you can
prescribe, check to see that, once ordered, are already 
recording sector). 

   So if any of these numbers is replaced by # F7, then this 
option and the next followed by replacing pseudorandom numbers

(Practice shows that they are usually alone
the same), and after them we can write _lyuboe_ number ... That 
is, I do so: if when to submit cylinder number by filing

# F7. Then the cylinder number and head (hand) will replace the 
random numbers. After that, I submit the following # F7, it 
falls right in the place facilities sector, followed by possible

feeding the length of the sector. Attention! There is
one fine, but about her below.

   That program, which rasformatit track
in accordance with the table at the end of the program. 
Addresses are given for DOS v5.03/5.04 



        di

        ld hl, # 3d98; Sub-head drags on

        call dos; zero cylinder.


        ld hl, # 1feb; Sub-sets of the current hand
        call dos; well, which is the zero track.

                   ; There is confusion: Zero side is

                   , One of which corresponds to the track 
number 

                   ; One, if you count to 160.


        ld a, # f4; Filing team record a track with a pause.

        ld bc, # 1f;

        call otac;



        ld hl, tabl; Table sectors discussed below.

        ld c, # 7f; Data Register VG93.
m1 ld b, # 0a; This p / n gives B B D values ​​in the reg. C

        ld d, # 4e; But in general, creates probelchik.

        call l20b1;



        ld b, # 0c; An array indicating Headers
        ld d, 0; wok sector.

        call l20b1;

        ld b, 3;

        ld d, # f5;

        call l20b1;



        ld d, # fe; This p / n produces a single byte value D.

        call l20af;



        ld d, (hl); Take the cylinder number from the table

        call l20af

        inc hl

        ld d, (hl); Number of heads

        call l20af

        inc hl

        ld d, (hl); Number sector

        call l20af

        inc hl

        ld d, (hl); length of the sector

        call l20af

        ld d, # f7; header checksum.

        call l20af



        ld b, # 16; Space number two

        ld d, # 4e

        call l20b1

        ld b, # 0c; Sinhropromezhutok

        ld d, 0

        call l20b1

        ld b, 3; sync, written # A1

        ld d, # f5

        call l20b1

        ld d, # fb; Tag Data

        call l20af

        ld a, (hl); Checking volume sector.

        and 3; As SH programm checks for two

        cp 0; bits. Incidentally, it is convenient when

        jr z, k128; length of the sector, non-standard number.

        cp 1;

        jr z, k256;

        cp 2;

        jr z, k512;
k1024; So. Kilobyte sector, trivia,

        ld b, 0; most importantly, what you read

        ld d, 0, at the end of applets.

        call l20b1;

        ld b, 0;

        ld d, 0;

        call l20b1;

        ld b, 0;

        ld d, 0;

        call l20b1;

        ld b, 0;

        ld d, 0;

        call l20b1;

        jr m5;

                   ;
k128 ld b, 128

        ld d, 0

        call l20b1

        jr m5
k256

        ld b, 0

        ld d, 0

        call l20b1

        jr m5
k512

        ld b, 0

        ld d, 0

        call l20b1

        ld b, 0

        ld d, 0

        call l20b1
m5

        ld d, # f7; counter. sum

        call l20af

        ld b, # 32

        ld d, # 4e

        call l20b1

        inc hl

        ld a, (hl)

        cp # ff; if not the end-repeated.

        jp nz, m1;

        ld b, 0, finished the end of the track,

        ld d, # 4e;

        call l20b1;

        jp m, m2;

        call l20b1;
m2

        ret; exit applets.
l20b1 ld iy, # 20b1

        push iy

        jp # 3d2f
l20af ld iy, # 20af

        push iy

        jp # 3d2f
otac ld iy, # 2a53

        push iy

        jp # 3d2f
dos push hl

        jp # 3d2f
tabl

        db 0,0,1,1

        db 0,0,2,1

        db 0,0,3,1

        db 0,0,4,1

        db 0,0,5,1

        db 0,0,6,1

        db 0,0,7,1

        db 0,0,8,1

        db 0,0,9,1

        db # f7, # f7, 3, # f7

        db # ff


, The first number - a cylinder
And the second - head
And the third - the number of sectors,
, The fourth - the length.


   Not necessarily the second (first -
- Always # F7) to make the number # F7. I prefer it, but 
someone more suitable # F6 or # F5. Since the method is 
described as a method, and not as an example program, which for 
some reason work, do what you like.


   And in the end the most important. As long uncopyable 
whereas the sector is third number in line, and the fourth 
should be # F7. This Several limits the programmer because

If this number is not # F7, then for some reason
data field is not. The length of such
sector will be equal to KB. If
just need to make the sector pomenee,
you'll have after formatting it to register it with zeros, 
otherwise it will be of header only. The reason is that 
shifting the start of the header data. If this does not 
guarantee the safety sector, should be him. In short, safer to 
work with the applets, so as it is written. Although an 
experienced coder myself sort out my problem was only prompt 
method of creating uncopyable whereas sector. 

Attention! On paper there is a sign copyright
It means that everyone take advantage of my method of creating 
uncopyable whereas sectors, was supposed to note this fact in a 
conspicuous place where the thread in HELP'e in Credits. Since 
there is another method as it turned out, he used to programmke

"Protect", placed in an annex to DEJA
VU 7, it is easy to distinguish which one is used: different 
number of cylinders and hand. So, while working my utilities 
that they are, respectively, # B2 and # 30. Although, if

who wants to, can not specify whose method was used, if he does 
not respect copyright, and therefore the Spectrum scene. 

   At this point I would like to finish my articles, apologized 
for the awkwardness presented and taken away for lengthy 
speeches while. Hopefully, the above need at least someone.


I will be glad to answer all questions related to the Speccy. 
Write to me: 

454129 Chelyabinsk,
Novorossiysk,
house 93, Apt. 14
Mazyrko Boris V.
(As ALLEN / XLNC)






Other articles:

Aperativchik - On the control of the shell DEJA VU

Aperativchik - Number came late in the month.

Aperativchik - Freebies will be no more.

Topic - Provision # 2. Perspective.

Topic - On working with electronic drive in the IS-Dos.

Topic - A new crossroads - some of the complexities of the game The Castle.

Topic - the printer and the ZX-Spectrum (command system printer family Epson).

drop of solder - Ode to watch.

drop of solder - Scanner v1.3.

drop of solder - Disk protector v1.4 (scheme).

SOFTWARE - Overview of new products demos: Iris UltraDemo, Lazarus Trackmo, Russian Fields of Experiments, Pressure Trackmo.

SOFTWARE - Overview of new products games: White Eagle, Leprekon, Kozel, Puzzle (prerelease of Flash), Space, Translate Worlds, Devil-s Curse, Choppers: death match, Twilight: The Land of Shadows, Falen Angel, 12 Secret Book, The Cezar, Chainick horror in Flat.

SOFTWARE - Review sistemok: ASCII Convertor v2.71, Global Commander v1.31, BA v1.0, X-Copy.

SOFTWARE - Men like gods: the script for the game Elite III

SOFTWARE - The work of the program to print images XL-graph.

CODING - The Optimization - Building a table repetition of bytes.

CODING - Universal Player - Pro Tracker v3.31.

CODING - an undocumented feature of the processor Z80.

CODING - Conversion of graphics into text format ASCII.

CODING - How to create uncopyable whereas sector.

CODING - BUGS in Plaeyer-e Pro Tracker 3.x

ANOTHER WORLD - CPU Pentium III.

ANOTHER WORLD - At the crossroads of three worlds.

ANOTHER WORLD - News from the world of Amiga.

ANOTHER WORLD - My Choice - PC?.

Hall of Fame - What do we think about the scene.

Hall of Fame - Everyone on party!

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

Seven and 1 / 2 - April Fools' Day.

Seven and 1 / 2 - Purposely not think: seven stories from the seller to ZX software.

Seven and 1 / 2 - Anecdotes.

attempt at writing - Amiga rulez or suxx?

Advertising - Advertisements and announcements ...


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

Similar articles:
Tutorials - hewle splines.
various shots - Ultrosovremennaya tale about near the end of the world.

В этот день...   4 May