[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4372.0. "Disk format/backup" by FILTON::FENTON_R (Potassium Ethoxide Rules C2H5OOK) Wed Dec 19 1990 13:08

    Since I got my Amiga (nearly 2 years ago now), I have wrestled with the
    problem of backups. I have found a number of original disks to crash,
    and they're expensive. I've tried a number of backup packages
    (hardware-based, like Syncro Express, and S/W like X-Copy), but most
    are very unsatisfactory.
    
    This has led me to speculate on the nature of disks. I can understand
    various reasons why it is difficult to copy protected disks, but would
    someone care to explain to me some of the principles involved (purely
    for intellectual curiosity, I'm not much of a hacker I'm afraid).
    
    I believe that each side of a disk has 80 tracks, each of which is
    divided into 11 sectors. There are apparently gaps between the sectors,
    filled with $aa bytes. Each sector has a synch byte to tell the Amiga's
    disk controller a sector is starting.
    
    Does the Amiga recognise bytes? By this I mean, every track is just a
    series of 1's and 0's - how does it know where a byte begins and ends?
    Is it like asynchronous transmission, where each byte has a stop,
    start, and parity bit etc.? If so, and the track is a continuous
    series of bytes (or bits), how does it know where to start?
    
    I'm trying to figure how something like the Synchro Express (which
    copies tracks from one drive to another) knows where a track starts in
    the first place, in the absence of standard synch characters etc.
    
    All info gratefully received.
    
    -Rog
     
T.RTitleUserPersonal
Name
DateLines
4372.1Synchro express wiring.MQOFS::LEDOUXReserved for Future UseWed Dec 19 1990 14:4716
    If you look at the prints form the Synchro express,
    it looks at the INDEX signal from DF0: (the original)
    then the index from drive 2 is crossed passed to an
    other signal on the bus (Change) and when
    both are more or less synchronized, it starts writing
    for few sectors (The read DF0: signal becomes write DF1: by cross-wiring
    a second wire) , until the de-synchronize again. 
    It also keep sending some "init" to slow down DF1: until
    it re-synchronize again.  
    Note that Index is comming from the floppy drive. (i.e: magnet
    passing in a sensor every turn)
    If you want more details, let me know I can get more info
    from home.
    
    
    Vince.
4372.2KALI::VISSERWed Dec 19 1990 18:0218
    re.: .1, I don't know what you are talking about.
    
    re.: .0, with the risk of screwing up some of the details, here's how
    Amiga did it - 
    
    The Amiga transfers modified fm (mfm) data directly from memory to the
    drive, and therefore the disk.  The index pulse from the drive, which
    occurrs once per revolution, is used to roughly position the data in
    the buffer on receive, and to fire the dma on the write.  Entire tracks
    are read or written at once.  There is no physical sector access. 
    
    The bimmer is used to encode the data from nrz (non-return to zero) to
    mfm and the reverse.  On a receive, the data are examined to determine
    where the head of the track is in memory, and thereafter the sector can
    be located.  The sector(s) of interest are then moved to sector buffers
    for the file system.
    
    John
4372.3MFM or not, it doesn't matter.MQOFS::LEDOUXReserved for Future UseThu Dec 20 1990 11:4635
    re.2:
    What does the memory have anything to do with the syncro copier?
    The data obviously goes to memory but is not used. 
    
    The consern of the author was how is the synchro copier works
    as he expressed, here is the prints of the synchro if the switch
    is in "synchro mode". In normal mode, it is all one to one pinout.
    
    (All pins are wired one to one exept:)
    
    
    Floppy >>>   Wen ---- Sel 3B (2B for A1000) >>>> Amiga
                 Wrt ---- Rd
                 Index -- Chg
    
    Note that Sel3B is used for A2000 and Sel2B is used for A1000.
         (not quite sure about A500?, I guess like the A1000)
    On my floppy the index is comming from a little magnet rotating
    on the floppy spindle.
    As the DF0: is read, the data becomes write on the external drive.
    The amiga monitor the Change signal and when it's synchronized
    with Index (from DF0:) it reads DF0: while selecting drive 3 (2 on
    A1000) thus effectively copying EXACTLY what it reads from DF0:
    Whatever that is MFM or not, who cares? The Amiga permits to 
    have multiple SEL lines asserted at the same time (all LEDS lite
    at the same time)  As the indexes are monitored, it makes exact 
    copies with the same delay from the index.  It is very simple 
    as you can see.
    
    	The only problem is that the delay (index-start of data) is
    "almost" perfect.  BUT not EXACTLY the same.  Some backup I
    made worked, but a new backup of the backup would not, on some
    applications. But this is an other story.
    
    Vince.
4372.4My brain hurtsFILTON::FENTON_RPotassium Ethoxide Rules C2H5OOKFri Dec 21 1990 04:5912
    Thanks for the information - wish I understood it. Guess I'm not as
    technical as you people. So you're saying that there's a mark somewhere
    on each track, which gives an approximate start point, regardless of
    how these tracks are written? Will this be the case even if funny
    formats are used?
    
    Vince, I'm a little puzzled about what you say about the Synchro
    Express - mine doesn't have a switch (or if it does, I can't find it).
    Also, there are a LOT of disks it won't copy... I wonder why?
    
    -Roger
    
4372.5Synchro copier IIMQOFS::LEDOUXReserved for Future UseFri Dec 21 1990 08:4215
    RE:-.1
    The Synchro copier I have is a II (2)
    Perhaps you have version 1?
    The V2 has a little square black switch on the casing.
    
    So far the only games it won't back up are Hybris, Denaris (disk 2
    only) and it "almost" backup Dragon's lair but you get "floppy errors"
    more often than the original distribution.  I beleive that
    Hybris and Denaris uses low level writes as sometimes you read
    a "1" and other times a "0".  I tried copying those with NIB and
    some tracks are sometimes pointed as red, tried again, then they
    become green, meaning it "successfully copied" the track.  There
    is no way to copy those.
    
    Vince.
4372.6More incomprehension...FILTON::FENTON_RPotassium Ethoxide Rules C2H5OOKFri Dec 21 1990 11:0319
    I just spoke to the people at DATEL Electronics, who sold me the
    Synchro Express (this is a major achievement). They inform me that, if
    you press the right mouse button, a little window pops up with option
    to select Synchro or Index. So now I know...
    
    I'd still like to understand how these things work in general though.
    Are you saying that the Amiga reads an entire track at a time when it's
    loading S/W? That it measures the start and end of this track using
    the magnetic index you mention? If this is so, then what is the purpose
    of "synch" characters at the start of sectors (or, indeed, what is the
    point of sectors at all...)?
    
    If this IS the case, then presumably the Synchro just reads bits,
    starting from the index...?
    
    -Rog
    
    Have a merry Christmas anyway.
    
4372.7ECAFTB::COBURNGrowing older, but not up...Fri Dec 21 1990 13:0210
    Sector synch characters aren't used on an Amiga floppy - that is how
    they get more data on a floppy. The sectors are squeezed together on
    the track so there are more sectors/track than an MSDOS floppy. 
    
    Yes the Amiga reads a complete track (and writes a complete track) for
    every read (or write) operation. The track is buffered by
    trackdisk.device (I think) and the wanted sectors are passed back to
    the disk driver. 
    
    John
4372.8some background and speculationSAUTER::SAUTERJohn SauterFri Dec 21 1990 13:1159
    Older computers, such as the Apple II, would read and write single
    sectors on disks.  To make this work the disk controller had to be able
    to read the data under the head until it found the beginning of the
    correct sector, then either read or write one sector's worth of data.
    
    This ability to replace sectors had been used since the earliest days
    of disks on computers, going back to the IBM 1401 and 7090 in the mid
    60s.  One of the reasons it was used was that computers had small
    memories compared to disks, so they couldn't afford to buffer complete
    tracks.
    
    As disks got faster and denser one of the challenges that manufacturers
    faced was to "switch" the electronics from reading the sector header
    to writing the sector data without disturbing the sector header 
    information.  In all the designs that I have seen, this was done by
    specifying that a certain distance between the end of the sector header
    and the beginning of the data was "undefined", in the sense that any
    magnetic pattern was allowed.  When writing, the head would be switched
    just after the start of that area and then start writing a
    synchronization pattern.  When reading, the electronics would be blind
    at the start of that area, and then look for the end of the
    synchronization pattern.  Having seen the end of the synchronization
    pattern the read logic could confidently interpret the bits in the
    sector.
    
    I'm not sure that this area is the one called the "sector gap", but I
    suspect it is.
    
    The Amiga, with 256 KB of memory and no wish to read data written by
    previous computers, rejects all of this ancient history and just reads
    and writes complete tracks.  Because it always reads and writes
    complete tracks it doesn't need a synchronization patters between
    sectors---it just reads a complete revolution and then unscrambles
    the data into sectors after it arrives in the track buffer.  I'm not
    sure if the writing process waits for the "index mark" and then writes
    a track, or just starts writing at wherever the disk is when the 
    the driver fills its buffer.
    
    By using this simpler system the Amiga can pack more data to a track---
    omitting the sector gaps increases the size of a floppy from 720K to
    something like 880K.  When accessing lots of sequential data this
    simpler system also improves performance, since only a single read
    or write disposes of a whole track.
    
    I suspect the Synchro operates at a lower level than the data bits.
    Probably it just takes raw analog signal from the source drive and
    feeds it to the destination drive.  If the drives are turning at
    close to the same rate, and if they hit the index mark together,
    the result should be disks which are identical.  Think of it as
    using two analog tape recorders to copy a digital audio tape: as
    long as the analog devices have enough bandwidth you can make a
    faithful record of the data, flaws and all.  Take this through too
    many generations, though, and the signal will degrade enough that
    the data won't be readable.  This may be the problem that you are
    seeing.  Normal copying interprets the raw signal as data bits,
    and when writing the copy those bits are converted to voltages
    again, in effect regenerating the signal.  The Synchro may not
    do any regeneration.
        John Sauter
4372.9BAGELS::BRANNONDave BrannonFri Dec 21 1990 14:1013
    
    I suspect they went with the read/write tracks scheme when they realized 
    that with the blitter, they didn't need to add a floppy controller
    chip to the design - just do it all in software.  Given that most file
    reading should hit sequential sectors, reading a track at a time makes
    sense.  Great theory.
    
    Then toss on AmigaDOS with .info files scattered all over the disk. 
    That makes you read whole tracks all over the disk just to ready those
    tiny files.  The amazing thing is how fast it was even when it had
    to do all that.
    
    Dave
4372.10Sectors - no sectors?FILTON::FENTON_RPotassium Ethoxide Rules C2H5OOKWed Jan 02 1991 06:0718
    Hhmmm... very interesting, as the little German guy on Rowan & Martin
    used to say. I think you're saying that, although the Amiga reads &
    writes only whole tracks at a time, there are actually sectors there,
    which are decoded once in memory? One wonders what the need is for
    sectors at all then...
    
    The literature with X-Copy reckons that there are 11 sectors per track,
    and says that there ARE synch characters (the number #4489 rings a
    bell). Is there something I'm still not grasping?
    
    If there's actually a little rotating magnet on each 3� inch floppy, do
    I run the risk of demagnetising it when I bulk-erase floppies (by
    leaving them on top of the Amiga's PSU)? It doesn't SEEM to. On my old
    Amstrad CPC6128, the 3" floppies had a little window in the disk
    casing, with a hole punched in the floppy, for this type of synch.
    
    -Rog
     
4372.11MQOFS::LEDOUXReserved for Future UseWed Jan 02 1991 11:5010
>    If there's actually a little rotating magnet on each 3� inch floppy, do
>    I run the risk of demagnetising it when I bulk-erase floppies (by
>    leaving them on top of the Amiga's PSU)? It doesn't SEEM to. 
    
    The little magnet is on the spindle of the DRIVE not on the diskette.     
    That is a SONY drive, other manufacturers may use other mean to
    clock the Index? 
    
    Vince.
    
4372.12WJG::GUINEAUWed Jan 02 1991 13:0010
    
>    The little magnet is on the spindle of the DRIVE not on the diskette.     
>    That is a SONY drive, other manufacturers may use other mean to
>    clock the Index? 
>    
>    Vince.

The spindle magnet is used in conjunction with a hall effect sensor for
index (and probably plays a part in speed regulation)

4372.13Books on disks etc.FILTON::FENTON_RStop Kidding YourselfMon Jan 07 1991 04:375
    Does anyone know of a definitive source of knowledge on how disks are
    formatted/written/read etc? I'd like to learn.
    
    -Rog
    
4372.14Sync 101FROCKY::BALZERChristian Balzer DTN:785-1029Fri Jan 11 1991 08:3133
Re: .10
                           -< Sectors - no sectors? >-

>    Hhmmm... very interesting, as the little German guy on Rowan & Martin
>    used to say. I think you're saying that, although the Amiga reads &
>    writes only whole tracks at a time, there are actually sectors there,
>    which are decoded once in memory? One wonders what the need is for
>    sectors at all then...
First of, only the trackdisk.device does read/write whole tracks. This should 
make clear, why sectors as a concept of blocking data on most other storage
devices is still needed. And using OFS, there's still a checksumming on
sector basis, so you don't necessarily loose the whole track (this reduces
the amount of useable data per sector to 488 bytes, but you knew that, 
didn't ya?).
    
>    The literature with X-Copy reckons that there are 11 sectors per track,
>    and says that there ARE synch characters (the number #4489 rings a
>    bell). Is there something I'm still not grasping?
Yes Virginia, there's a whole slew of synch characters, but they don't seperate
the sectors, they mark the beginning/end of the track. 
So you have a bunch of syncs, then the data (11 sectors worth), then again the
same bunch of syncs.
    
>    If there's actually a little rotating magnet on each 3� inch floppy, do
>    I run the risk of demagnetising it when I bulk-erase floppies (by
>    leaving them on top of the Amiga's PSU)? It doesn't SEEM to. On my old
>    Amstrad CPC6128, the 3" floppies had a little window in the disk
>    casing, with a hole punched in the floppy, for this type of synch.
        
As mentioned before, the syncing is done by the drive w/o the floppy, unlike
the 5.25" drives.

<CB>
4372.15df1: motor speedFILTON::FENTON_RStop Kidding YourselfTue Jan 15 1991 04:5521
    To further my education, I opened up my df1: last night. I see a little
    flywheel with, as you say, a magnet on its perimeter - and apparently a
    little sensor which the magnet flies past.
    
    I ran a speed check utility on both my drives (one of the few things on
    the X-Copy menu that WORKS), and found significant differences between
    both drives - presumably this is why copies often fail. You know what
    I'm going to ask now don't you... is there a mechanism for fine-tuning
    the motor speed?
    
    I'm not sure how (or if) the motor's speed is controlled - is it
    servoed from the litle hall-effect device, or simply a pot somewhere
    adjusting the DC voltage, or what? Any ideas? My df1: is a TEAC
    FD-235F.
    
    As always, all advice gratefully received.
    
    -Rog
    
    Who's Virginia???
    
4372.16Just a plain ole pot...FROCKY::BALZERChristian Balzer DTN:785-1029Wed Jan 16 1991 04:3721
    
>    I'm not sure how (or if) the motor's speed is controlled - is it
>    servoed from the litle hall-effect device, or simply a pot somewhere
>    adjusting the DC voltage, or what? Any ideas? My df1: is a TEAC
>    FD-235F.

Usually there's no feed-back mechanism that controls the drive speed, just a
pot. The synching is done to sync data with a position on the floppy not to 
control the speed. However there's usually more than one pot per drive (one 
for speed, one for adjusting some write currents or whatnot). So you better 
mark the original position of the pots before experimenting with them...
    
>    Who's Virginia???
I don't have the faintest idea, that's just one of those american terms I tend
to pick up once in while. Maybe on of our US friend can elaborate on that 
topic.

Cheers,

<CB>
4372.17Yes, Virginia...GOBAMA::WILSONTLLead Trumpet (Read that...LEED!)Wed Jan 16 1991 10:125
    For those who came in late, a young girl once (1930s-1940s) wrote a
    letter to a New York newpaper asking them, "Is there really a Santa
    Claus?"  The editor published the letter and answered it in an article
    beginning with a line now famous, "Yes, Virginia, there is a Santa
    Claus!"
4372.18Disk Drive BookFILTON::FENTON_RStop Kidding YourselfMon Jan 21 1991 06:176
    Oh well - I just bought "Amiga Disk Drives Inside & Out" (ABACUS) - I
    think it'll contain all the requisite information. The trouble now will
    be understanding it.
    
    -Rog