Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

1    Introducing Palm OS Cobalt Simulator

Palm OS® Cobalt Simulator Guide

Palm OS Cobalt Version 6.1

This chapter provides conceptual information that will help you learn about Palm OS® Cobalt Simulator.

This chapter contains the following sections:

What Is Palm OS Cobalt Simulator? ^TOP^

Palm OS Cobalt Simulator is Palm OS recompiled for a desktop machine processor. Palm OS Cobalt Simulator combines all of the Palm OS Cobalt architecture components into a single execution environment.

  • Palm OS applications
  • Palm Application Compatibility Environment (PACE)
  • Palm OS system code
  • Device driver set implementation

Figure 1.1  Palm OS Cobalt Simulator components

Palm OS Applications ^TOP^

Palm OS Cobalt Simulator includes all of the built-in Palm OS applications, such as Address Book, Date Book, Memo Pad, and To Do List. The built-in Palm OS applications are included in the Simulator ROM file.

You can add other Palm OS applications to a Simulator session as well. For more information, see "Installing Applications."

Palm OS System Code ^TOP^

Palm OS Cobalt Simulator includes all of the Palm OS Cobalt system code, compiled to run on Windows.

Palm OS Runtime Services

Palm OS Cobalt Simulator implements the Palm OS Cobalt runtime services by using desktop system library files (DLLs). These DLLs are located in the Palm OS Cobalt Simulator directory, and are loaded when the code that they contain needs to be executed.

Communication Stacks

Palm OS Cobalt Simulator uses the communication stacks for Sockets API and Telephony API components. Palm OS Cobalt Simulator can optionally redirect Socket API calls to the host machine TCP/IP stack.

Palm Application Compatibility Environment ^TOP^

When you use Simulator to test your existing 68K application, the application is run in the Palm Application Compatibility Environment (PACE). PACE provides a 68K application environment that is equivalent to Palm OS 4.1.

PACE handles the data translation required for a 68K application to run on Palm OS Cobalt. For example, 68K applications read and write data in big-endian mode, but Palm OS Cobalt views data in little-endian mode. When a 68K application calls a Palm OS function, PACE handles the translation of the parameters, objects, and structure layouts so that existing applications do not have to be updated to handle the change of endianness. PACE creates "shadow structures" for the 68K application's data that allow the 68K application to run under Palm OS Cobalt.

Device Driver Set ^TOP^

The device driver set is responsible for insulating Palm OS from the underlying system and hardware. By running Palm OS on top of the device driver set for the desktop machine, Palm OS Cobalt Simulator recreates the Palm OS program execution environment in the desktop machine.

Applications that run in this environment see the same functionality provided by the Palm OS managers, libraries, and applications as on a Palm Powered handheld.

Because Palm OS Cobalt Simulator runs on a desktop machine, it can be integrated with the desktop tools for Palm OS development. This integration allows full source level debugging of the code that is targeted for Palm Powered devices.

How Does Palm OS Cobalt Simulator Compare to Palm Simulator for Macintosh? ^TOP^

Palm OS Cobalt Simulator has significant advantages over the Macintosh simulator in use with Palm OS 4:

  • All of the applications and shared libraries that can be loaded onto a handheld can be loaded in Palm OS Cobalt Simulator at the same time. This allows analyzing the interactions between the applications, shared libraries, and Palm OS with a much better accuracy than before.
  • Palm OS Cobalt Simulator supports multi-threading.
  • Palm OS Cobalt Simulator runs the same Palm OS code that runs on a Palm Powered handheld. The only difference between Palm OS running on a handheld and Palm OS Cobalt Simulator is the driver set.
  • The Macintosh simulator required that components be statically linked together. Because Palm OS Cobalt Simulator does not have this requirement, the simulation reproduces accurately the Palm OS runtime architecture on top of the desktop machine system.

Prerequisites ^TOP^

Palm OS Cobalt Simulator runs on Windows 2000 and Windows XP.

Palm OS Cobalt Simulator is flexible enough to be used with most C/C++ development chains, with or without an associated integrated development environment (IDEs such as Palm OS Developer Suite, CodeWarrior, and Visual C++).

Security ^TOP^

Palm OS Cobalt Simulator should not be viewed as a secure execution environment because it is intended as a development platform. When you are debugging applications, you need extensive access to the state of the application as it is running in Palm OS.

Palm OS Cobalt Simulator supports debugging of 68K applications using a TCP/IP connection, usually on port 2000. Simulator opens this port when starting and when accepting connections from debugger applications, like Palm OS Debugger or CodeWarrior for Palm OS. If you block access to these ports, you will not be able to debug with these programs. You may want to configure your firewall to only allow connections from the local machine to limit any security risks.

  • Use a firewall if the machine is connected to the internet.
  • Don't run untrusted applications within Palm OS Cobalt Simulator.