28 Jun 96
From the minute I first saw the Pilot I wanted to try my hand at creating some software for it. Two big problems stood in my way. One was that USRobotics was not yet shipping their SDK to common folk like me. The other greater hurdle was the fact that the SDK runs only on a Macintosh computer and I don't own one. It seemed to me that it might not be too hard to solve both problems by creating my own SDK running on the PC. Since setting out to do this I have achieved some success at making it possible to develop Pilot applications under Windows (see Pilot Hack, Space Invaders, Graffiti Help) so I thought I'd share what I've learned and see if anyone is interested in helping to take the project further.
I started by imagining what a state of the art Windows SDK for Pilot would look like. I visualized a fully integrated environment consisting of:
And I wanted all this as cheaply as possible, maybe even free! Sounds great, right? Think of all the cool apps you could create with this tool set... NOW WAKE UP! This is a fantasy! Doesn't exist!
Today's state-of-the-art GUI development environments are very sophisticated, extremely complex, and dauntingly large. Creating a high-quality development environment with all the features I'd like to have would take far too many people far too long to be practical. The alternatives are a) put up with something less, or b) leverage an existing GUI development environment. I decided to see if I could make an existing GUI IDE do the job.
But which IDE? There are a number available but my favorite is Microsoft's Visual C++ 4. This system has served me quite well for developing Windows applications and has support for Macintosh cross-development which, as you'll see, could be very helpful in cross-developing for the Pilot. Let's see how it compares against the dream and what gaps need to be filled to make it work:
Microsoft's Visual C++ 4.0 Cross-Development Edition for Macintosh
So, starting from VC++ Mac, what we have is a nice GUI IDE, editor, C/C++ compiler, project management and build system. Several components are sort of half-way there including the resource tools, linker, debugger, and a template app creation Wizard. We're completely lacking an assembler, emulator, support tools, USRobotics headers and samples, and online help. And, as long as we're dependent on the Macintosh cross-development edition for the C/C++ compiler it's not going to be cheap for most developers.
Filling In The Gaps
What to do about the incomplete and missing pieces of the dream? Complete them! Well, get started anyway. I've been working to fill in the gaps for a few weeks now and here's where I stand as of 28 Jun 96:
Done. I have a process for creating a new project and setting all the right project settings so C/C++ files build and produce linkable objects. As an aside, judging from the code I've seen to date (PRC files released from USRobotics and others) Visual C++'s compiler produces faster, smaller code than MetroWerk's. This is in spite of some inefficiencies VC++ introduces because it treats 'int' quantities as 32-bit.
Hit-and-miss. To my knowledge, USRobotics has not released any information outlining the format of each resource type. With this information one could write a converter to translate resources from the Windows format to Pilot format. Without it Visual C++'s resource editor is still a handy way to organize binary resources you create by hand and has a built-in hex/ASCII editor that is very useful for hacking existing resources. Beyond this, one converter has been written to convert monchrome (1 bpp) Windows .BMPs into Pilot 'tBMP's and application icons ('tAIB'). I'd love to hear from volunteers interested in creating converters for additional resource types.
Done. The VC++ linker produces a Win32 PE that incorporates the C/C++ objects and resources mentioned above. I've written a program (exe2prc) that converts this PE into a Pilot PRC, ready to download to the Pilot.
None. This will take a lot of serious hacking unless both Microsoft and USRobotics publish their debugger protocols.
I have a project underway to create this, both to work within the GUI IDE and standalone. Stay tuned.
I started a project to create this but it needs a ton of work. What I have so far is a working 68000 emulator (derived from a public domain Amiga emulator) running under Windows with a simple command-line monitor and disassembler. It already has its uses (e.g., loading existing PRC files and disassembling them) but creating a full-fledged emulator without the support of USRobotics (hey, maybe they'd provide it?) is quite a challenge. I do have a few ideas if anyone is interested in pursuing this further.
None. I haven't built any other support tools yet.
None. Not hard to do, but not terribly urgent either.
Partial. USRobotics has released the SDK documentation on their FTP site but not their header files or samples. It's in their best interest to make the SDK available as widely as possible to fuel the creation of Pilot applications so perhaps they can be convinced to post their headers and samples. I've created a couple sample applications of my own but they require the PalmOS headers from USRobotics.
None. I'm not planning to take on this project but it would be great to have a set of online API help integrated into the development environment. Any volunteers?
Well, I'm willing to give away everything I've created for free but I don't think Microsoft is going to feel the same way. The big ticket item here is the Macintosh cross-development edition which provides a mega-quant of stuff we don't need (for cross-developing to the Mac) but does include a good 68000 C/C++ compiler which we do need. So where can one find a free replacement for this compiler? How about Gnu CC? Gnu CC is free, can target the 68000, and generates decent code. My knowledge of Gnu CC is limited but if someone could build me a version that runs on Windows 95/NT that generates 68000 code I'd look at integrating it into my SDK.
Update: 22 Sep 96. Since I wrote this back in late June a number of people have joined the cause to create PC-based Pilot development tools. Together we've enjoyed some success and the result has been labeled the Alternative Software Development Kit or ASDK. To find out more about the current state of the ASDK click here.
Pulling It All Together
OK, so let's say you've acquired VC++ for Mac, exe2prc, the PalmOS documentation and headers. Now what? I'd love to say "just write your code, use the resource editor to create your resources, compile/link them together and hotsync the result to your Pilot" but that's the dream, not the harsh reality. The reality is that several workarounds (a.k.a. hacks) are needed to subvert Visual C++'s intended use as a Macintosh development system and use it as a Pilot development system instead.
I'm working on separate article with step-by-step instructions on how to use these tools together but I'll give you an idea of the kinds of problems one must get around:
All of these problems (and more) can be worked around. Some as easily as clicking on the right checkbox in a VC++ options dialog, some with much more hassle. If you're serious about taking this route to creating Pilot apps and have access to Visual C++ for Mac, send me mail and I'll help you out with the details.
It is possible to create Pilot applications without a Macintosh or even USRobotics' SDK (I've done it!). Pilot Hack, Space Invaders, and Graffiti Help were all written this way. Right now the 'alternative' SDK (ASDK?) is incomplete, inconvenient, and expensive for most developers. So much so that for most people buying a Mac and USRobotic's SDK is still the way to go.
But for those pioneers who don't mind a few arrows in their backs I've outlined some of what needs to be done to complete the ASDK, make it more convenient to use, and reduce its cost to a level most developers can afford. If you would like to help take this project further and have skills, experience, and/or ideas to contribute please send me mail (firstname.lastname@example.org ) and I'll try to coordinate the next phase of development.
Back to Pilot Software Development