[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DSK to NIB Instruction
- Subject: Re: DSK to NIB Instruction
- From: pausch@saaf.se (Paul Schlyter)
- Date: Fri, 14 Oct 2005 20:45:23 GMT
- Newsgroups: comp.sys.apple2
- Organization: Unknown
- References: <eKW1f.1556$B14.1455@newssvr11.news.prodigy.com> <5NmdnXI18fFPC9PeRVnzvA@telenor.com> <Ddz3f.2305$Aw.41344@typhoon.sonic.net> <434f8fd9$0$24165$9b4e6d93@newsread4.arcor-online.net>
- Xref: g2news1.google.com comp.sys.apple2:6138
In article <434f8fd9$0$24165$9b4e6d93@newsread4.arcor-online.net>,
Linards Ticmanis <ticmanis@gmx.de> wrote:
> Andy McFadden wrote:
>
>> Reconstructing a physical floppy from a NIB image requires reinventing the
>> sync bytes (somewhere between easy and impossible, depending on the disk)
>
> How do the emulators do it when using .nib images? Given the fact that
> there are a lot of .nib images out there that actually do work on an
> emulator, it seems the emulators somehow are able to deal with the sync
> issue?
The sync issue doesn't matter here since one already knows that the bytes
in a NIB file are synced.
It's different on a physical disk: when you start reading it could be
anywhere in the bit stream. It's just one chance in 8 that you
happen to start reading at the start of a disk byte (= "nibble"), and
it's 7 chances of 8 that you happen to start somwhere inside a disk
byte.
When you start reading a NIB file, it'll be at the start of the file
and you know you are in sync (unless you start doing weird things
like reading partial bytes). And if you start in sync, and read one
byte of 8 bits at a time, you'll remain in sync all through the file.
Doing so is easy since you read the file one or several bytes at a
time. Reading partial bytes is harder, but possible of course.
Therefore, sync bytes are not needed on NIB files as long as you use
them in emulators. Sync bytes need to be recreated only if you
want to recreate a physical disk from the NIB file.
>> and figuring out the actual track length (easy to moderately difficult,
>> depending on how the track falls).
>
> Is there more to it than checking overlap bytes?
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/