Re: NTLK Compact Flash Memory PCMCIA Adaptors

From: Paul Guyot (pguyot@pnm-consulting.com)
Date: Thu Mar 02 2000 - 08:23:49 EST


>"Michael J. Hussmann" wrote:
>
>> Laurent Daudelin (laurent_daudelin@fanniemae.com) wrote:
>>
>> > I'm wondering if an ATA driver could be made to work. Anybody knows
>>for sure?
>>
>> I don't know either, but there's also the question what to expect from an
>> ATA driver. Should it support the standard file system of these cards,
>> and if yes, how is the Newton expected to deal with files -- say,
>> pictures from a digital camera? After all, there is no such thing as a
>> file in the Newton OS. Or should ATA cards be used as a cheaper
>> replacement for linear flash cards, i.e. to store soups on?
>
>I don't know specifically, but I think it would be less a problem to
>"format" the
>card for use by the Newton, using the standard soup structure. If that's not
>possible, or undesirable, then maybe each file could be mapped to a soup?

Technically, I think this is feasible, although they won't behave like
linear cards exactly. At least on MP1xx, the cards are mapped directly to
memory (contrary to what I wrote in the FAQ).

However, doing this will require:
(a) to know the lowest level system functions to access the card as a store
(including recognizing it when it is entered)
(b) to implement this (a system patch may be needed, although it is not sure)

I suggest that if we interface with another file system, to have both soups
as we know them, mapped to a file each (or a directory each, depending on
what is easier) and to have all other files mapped to a single soup, a file
per entry, so that we could write I/O functions to access them.

I once thought about playing with stores, and I discovered that most of the
time, access functions are called thru NS (i.e. the functions are called
with NSCallGlobalFunction and NSSend native functions).

>So the real question is who has the docs needed for this? i.e. docs on
>how to write a Newton driver.

Please note however, that this could require to have a lot of information
concerning the ATA cards. I got some from the web a few time ago, but I am
not sure it is sufficient. This means (I think) registering to a special
corporative group, probably including industrial-size fees.

The easiest thing and doable thing now is a driver that gets a sector from
the ATA card. Then having it a Newton Store is the fun part of it.

Lantern DDK, as Laurent suggested, is not, AFAIK, the only way to talk to
the driver. And anyway, it is by no means to make a store driver, but a
communication driver. Addresses to talk to the PCMCIA slot is defined in
the PCMCIA DDK. (however, some headers I have been looking for for eons are
needed to compile it as it is distributed by Apple: MemoryLanes.h and
Storage.h)

>Or should ATA cards be used as a cheaper
>replacement for linear flash cards, i.e. to store soups on?

And besides, ATA cards would be slower for sure.

But, one could read somewhere in the PCMCIA DDK:
#define kPagedStoreCard 'pgts'
        // ATA card

And there is already in the ROM the following classes' methods defined:

class TATAPartitionInfo {
Clear(); // vector at 01802510
TATAPartitionInfo(); // vector at 01802514
~TATAPartitionInfo(); // vector at 01802518
};

class TATABootParamBlock {
TATABootParamBlock(); // 0180251c
~TATABootParamBlock(); // 01802520
};

class TATA {
ATASpecific(unsigned long, void *, unsigned long);
                                // 01802a60
CheckPowerMode(unsigned char *, unsigned char);
                                // 01802a68
Delete(); // 01802a70
DoATALBACommand(TATALBACommandBlock *);
                                // 01802a74
DoATARegCommand(TATARegCommandBlock *);
                                // 01802a78
Format(unsigned char *, unsigned long, unsigned long, unsigned long,
unsigned char); // 01802a7c
GetAttributes(); // 01802a80
IdentifyDrive(TATADriveInfo *, unsigned char);
                                // 01802a8c
InitDriveParam(unsigned char, unsigned char, unsigned char);
                                // 01802a90
Initialize(TCardSocket *, TCardPCMCIA *, unsigned long);
                                // 01802a94
static New(char *); // 01802aac
Read(unsigned char *, unsigned long, unsigned long, unsigned char, unsigned
char); // 01802ab0
Reset(unsigned char); // 01802ac0
SetAttributes(unsigned long); // 01802ad0
SetDeviceControlReg(unsigned char);
                                // 01802ad4
SetFeatures(unsigned char, unsigned char, unsigned char);
                                // 01802ad8
SetMultipleMode(unsigned char, unsigned char);
                                // 01802adc
SetPowerMode(unsigned char, unsigned char, unsigned char);
                                // 01802ae0
SuspendService(); // 01802ae4
Write(unsigned char *, unsigned long, unsigned long, unsigned char,
unsigned char); // 01802b00
};

class TCardATALoader {
TCardATALoader(); // 01802b04
~TCardATALoader(); // 01802b0c
ChecksumOf(unsigned char *, unsigned long);
                                // 01802a6c
GetCardType(TCardPCMCIA *); // 01802a84
LoadDriverPackage(TATA *, TCardSocket *, unsigned long, unsigned long,
unsigned char **, unsigned long *); // 01802aa4
RemoveATAPackages(TATABootParamBlock *, void *, unsigned long);
                                // 01802ab8
ResumeService(TCardSocket *, TCardPCMCIA *, unsigned long);
                                // 01802ac4
SameStrings(char *, char *, unsigned long);
                                // 01802ac8
LoadATAPackages(TCardSocket *, TCardPCMCIA *, TATABootParamBlock *, void *,
unsigned long); // 01802d94
}

Regards,

Paul

----
P&M Consulting Newton Program
http://www.pnm-consulting.com/newton/

****************************************** This month's NewtonTalk brought to you by:

EVOTE.COM, the ultimate Political Junkie site on the 'Net.

The Clinton Administration, the George Bush 2000 Campaign, and almost every other major U.S. politician has said something nasty about us at some time. Find out why at: http://www.evote.com

******************************************

Need Subscribe/Unsubscribe info? Visit http://www.planetnewton.com



This archive was generated by hypermail 2b29 : Wed May 03 2000 - 09:41:05 EDT