PC Cards


What is the format for kCISMagicTuple (0xA0)? Is kCISTupleVersion2 (0x40) used for anything beyond information or is it required as well?


Here's the definition of the Magic specific tuple.

The Magic number and version should be set from the constants found below.

For a pager card the card type should be kTypeIOCard.

The clusterOffset should be the offset from the start of common memory space of the start of the metacluster. That should be the start of the RAM card image plus the offset found within the RAM card image's Magic Cap tuple.

The unique ID needs to be just that. Currently, there's no way to ensure uniqueness, but for now just use the unique ID found in the RAM card file's Magic Cap tuple.

The modification date and time and the crc should be set to zero.

kCISTupleVersion2 is present only for the edification of other systems. Too bad no other system pays any attention to it.

The QuadChar('w','x','y','z') macro is equivelent to 'wxyz'.

typedef struct MagicCapTuple {
   ulong	magicNumber;
   ulong	version;
   ulong	cardType;
   ulong	clusterOffset;
   ulong	uniqueID;
   ulong 	modificationDate;
   ulong 	modificationTime;
   ulong	crc;
} MagicCapTuple;

#define kMagicCapTupleVersion     0x00010001
#define kMagicCapTupleMagicNumber QuadChar('G','M','M','C')

#define kTypeNoCardInSlot         QuadChar('N','U','L','L')
#define kTypeForeignRAMCard       QuadChar('F','O','R','N')
#define kTypeDamagedRAMCard       QuadChar('D','A','M','G')
#define kTypeUnformattedRAMCard   QuadChar('B','L','N','K')
#define kTypeExtendedRAMCard      QuadChar('X','R','A','M')
#define kTypeFormattedRAMCard     QuadChar('R','A','M','C')
#define kTypeROMCard              QuadChar('J','R','O','M')
#define kTypeROMWithStorage       QuadChar('R','O','M','+')
#define kTypeSelfHostedFlashCard  QuadChar('F','S','R','V')
#define kTypeFlashCard            QuadChar('F','L','S','H')
#define kTypeIOCard               QuadChar('I','O','C','D')


Whenever I download a package to my communicator using Telebug, the name of the PC card gets changed to "Untitled". How do I change the card's name?


ObjectMaker does not provide a way to name a card; it is hard-coded to name the PC card "Untitled".

As a work around, you can do this:


Can standard type II PCMCIA cards be used in a Magic Cap communicator, or are custom PC cards required?


There are two ways to support PC cards on Magic Cap communicators. The first method requires a custom "Magic Cap saavy" PC card. Part of the PC card looks like a RAM or ROM card to Magic Cap, and this area would contain a Magic Cap package that knows how to interact with the rest of the PC card. This solution is entirely self contained, and allows a PC card to bootstrap itself. The disadvantage of this method is that the cards are non-standard.

However, you can also have the package separate from the PC card. The package would install a CardServer subclass into iCardServers. When a PC card is inserted, Magic Cap calls CanHandleCard() on each CardServer subclass in this list. If your subclass determines that it can talk with the inserted PC card, you return an instance of your CardServer subclass. Magic Cap will then make all CardServer calls on this instance. This solution is good because you can use off the shelf PC cards with Magic Cap communicators. The disadvantage to this method is that the user must manually install a Magic Cap package on their communicator before they can use the PC card.