[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CiderPress Bug



Ed Eastman <noone@nowhere.net> wrote:
> I must be missing something.  Why wouldn't CiderPress use the FAT 
> information to copy a file form DOS33 disk to DOS33 disk?  Why should CP 
> care about the length stored inside the file at all?

It's possible to special-case a DOS-to-DOS transfer, and one of these
days I will.  Unfortunately, it means messing with a bunch of different
pieces, and it's likely to break something.  I need to work on some
other things, so I only have time for a 2.1.1 release, not a 2.2.0.

The general copy & paste function needs to be able to handle copying stuff
from an arbitrary source (Binary II, ShrinkIt, ProDOS disk, CP/M, etc.)
to an arbitrary target.  It needs to have *some* value for the length of
the file.  As it turns out, DOS has two: the length of the file in sectors,
and the length embedded inside 'B', 'I', and 'A' files.  (The length of 'T'
files is also somewhat up in the air, but since CiderPress just trims the
extra zero bytes off the last sector, there's no risk of trouble there.)

When the data is copied to the clipboard, the embedded length (and, for
'B', start address) are stripped away.  That way, if I end up pasting files
into a ShrinkIt archive, they look the same whether they came from a DOS
disk or a ProDOS disk.  The length and aux type are sent separately, along
with the other goodies like filename and access permissions.  All data on
the clipboard looks the same, regardless of source.

If I just use the length of the file in sectors, you'll get the whole file,
but the embedded length won't be re-created correctly.  Attempting to
play some games (e.g. the cracked version of Hard Hat Mack) won't work,
because DOS will try to load the entire file into memory.

What needs to happen is the copy & paste functions need to pass along the
"DOS length" for files copied from DOS disks, and set that value when
pasting the files back onto DOS disks.  Because CiderPress is written as
a bunch of relatively generic layers, this is more work than you might
expect, and provides many opportunities for things to break.

I'm adding it to the wish list.

-- 
Send mail to fadden@fadden.com (Andy McFadden) - http://www.fadden.com/
CD-Recordable FAQ - http://www.cdrfaq.org/
CiderPress Apple II archive utility for Windows - http://www.faddensoft.com/
Fight Internet Spam - http://spam.abuse.net/spam/ & http://spamcop.net/