========================================================================
Release Notes for the Palm OS Emulator
Copyright 1998-1999 Palm Computing, Inc. - A 3Com Company

Please send bug reports, comments, suggestions, etc. to devsupp@palm.com
========================================================================

Welcome to the Palm OS Emulator, v2.1!

These are the release notes for the Palm OS Emulator (formerly known as
Copilot).

We have much planned for the Palm OS Emulator.  For descriptions of some
of the changes to appear in future releases, see the ERS (Engineering
Resource Specification -- or something like that) at:

	<http://www.palm.com/devzone/pose/seed.html>

See also a couple of Emulator-related articles that appeared in the
May/June 1998 issue of the Handheld Systems Journal (www.cdpubs.com --
also included with the Palm OS Emulator in PDF form).

If you want to build the Palm OS Emulator, you will need Visual C++ 5.0
on Windows, and CodeWarrior Pro 4 on the Mac.

Please send comments, suggestions, and bug reports to devsupp@palm.com.


Notes on the version number:
----------------------------
Palm Computing uses the following numbering scheme for versioning its
products.  The version number has the following format:

<major>.<minor>.<bug fix>[dab]<prerelease>

The "dab" appearing after the bug fix revision indicates the pre-release
stage of the product.  The "d" means that it is currently under
development.  Once all features have been added and it has undergone
enough testing to ensure that it is not DOA, its pre-release stage is
advanced to "alpha", and the version number is suffixed with "a". Once
all known critical bugs (crashers or bugs that prevent meaningful work)
are fixed, the pre-release stage is advanced to "beta", and the version
number is suffixed with a "b". Finally, after all designated bugs have
been fixed, the product is released, and the version number no longer
includes a pre-release designation.

This version of the Palm OS Emulator is 2.1d28.  This means that the
product is missing some features, and there may be some pretty
embarrassing bugs in it.  Even so, during its development stage, the
Palm OS Emulator has been in constant use by the Palm OS engineering
team in the development of future versions of the Palm OS.  Thus, it
should be pretty stable for use by 3rd party developers.


Notes on the Debug version:
---------------------------
Some Palm OS Emulator releases include a Debug version (indicated by its
having "Debug" appended to its name).  This version of the Emulator is
not really meant to be used during your day-to-day work.  Instead, it is
possible that it could be used to track down bugs in the Emulator
itself.  If, while using the Release (normal) version of the Emulator,
you encounter some abnormal behavior that looks like an Emulator problem
and not one with your Palm OS application, then you can try performing
the same steps with the Debug version.  It is possible that the Debug
version (which is built with a lot of internal checking and calls to
assert()) will report some information useful when reporting the problem
back to Palm Computing.

Because of all the additional checking, etc., that the Debug version
adds, it runs very slowly.  For this reason, you will probably want to
always run the Release version.


Notes on the Profile version:
-----------------------------
Some Palm OS Emulator releases include a profiling version (indicated by
its having "Profile" appended to its name).  This version of the
emulator allows users to turn profiling on and off, and to save the
results to disk in a format compatible with the CodeWarrior Profile
application, or in a tab-delimited text file suitable for spreadsheets.

Because the extra code involved with profiling an application slows down
all program execution (even when profiling isn't currently being used),
profiling support is provided only in this special version.  If you
don't intend to profile your application, you should use the normal
version of the emulator.


Missing Features:
-----------------
The following is a list of features that we expect to have implemented
by final, but currently aren't implemented.  Please don't submit bugs
about their lack, even if they are documented in the ERS.

*	IR support.

*	All disabled items in Debug Options except uninitialized memory
	checking.


Known Bugs
----------
*	Neil needs to receive cmdInitDatabase when his app is installed.

*	You can't reliably change the time with the Preferences App.  The
	time is generally synched with the host PC time.

*	It's not a good idea to load applications while the Launcher (the
	"Applications" application) is running.  If the program you're
	loading doesn't already exist, it won't show up in the list of
	installed application until you quit and restart Launcher.  If the
	application you're loading _does_ already exist, the Launcher won't
	refresh it's list, and will end up with a stale reference to the
	version you'd just replaced, leading to a Launcher crash.

*	We've seen one case where MacEmulator will draw the LCD area with a
	white background in single-scale mode instead of green.  The cause
	of this problem appears to be with an out-of-date driver for a video
	acceleration board.  Unless this is an issue for you, we probably
	won't try to figure out a workaround.

*	When working with an external debugger, make sure the ROM is awake
	(and not sleeping with a blank screen).  Otherwise, communication
	between the two applications will not occur.


========================================================================
	REVISION HISTORY

	Starting in 2.1d25 (and backdated to 2.1d24) I'm giving credit
	to the person or people responsible for convincing me to fix a
	bug or add a feature, in some cases even providing the source code
	for the bug or feature.  These people's names appear in []'s.

	See the file Credits.html for a list of people who have submitted
	actual changes to the project.
========================================================================


Changes for 2.1d29 (5/21/99)
----------------------------
*	Interim internal release dates:
		2.1d28.1	-	6/4/99
		2.1d28.2	-	6/4/99
		2.1d28.3	-	6/11/99
		2.1d28.4	-	6/11/99
		2.1d28.5	-	6/11/99
		2.1d28.6	-	6/15/99
		2.1d28.7	-	6/16/99
		2.1d28.8	-	6/23/99
		2.1d28.9	-	6/25/99
		2.1d28.10	-	6/30/99

*	For temporary backward compatibility, "bare" file names on the
	command lineare treated as paths to .psf files. [Andreas Linke, Mike
	McCollister]

*	Mac: fixed problem with receiving Error #18 when trying to download
	ROMs from actual devices over the serial port. [Mark Ordal]

*	In debugger/sockets communications, allow for recv() returning
	zero, indicating a closed connection.

*	Fixed multi-threading bugs. [Andrew Ball, Daniel McCarty, Scott
	Johnson, Keith Wolcott, Art Dahm, Mark Lussier, Alex Robinson,
	Patrick Porlan]

*	UNIX: fixed some makefile problems. [many]

*	Mac and Windows: new case graphics.  Note that the edges of the new
	graphics are a little rough; we'll be working on that for the next
	release.  Also, the Mac version doesn't set up a custom palette in
	8-bit mode, yet, so for best results, you might want to put your
	monitor in 16- or 24-bit modes.  Finally, the UNIX version will get
	the new graphics in the next release.

*	Print some logging information using signed instead of unsigned
	value. [Oliver King-Smith]

*	Don't go into infinite recursion when the emulated PC is set to an
	odd memory address. [John W. Marshall]

*	Fixed problem in the "NetLib redirected" version of
	NetLibSocketAccept where the address and address length were not
	returned. [Bill Pitore]

*	Windows: As outlined in the notes for 2.1d28, Poser will look for
	the last-saved .psf file when starting up.  It used to save the
	reference to this file as a full pathname.  Now, if the attempt
	to locate the file with the full pathname fails, Poser will look
	for a .psf file with the same name in the same directory as
	Poser itself.  This approach is similar to the way in which
	Poser looks for .ROM files that are no longer at their last known
	location. [Michael Hado]

*	Worked around VC++ 6.0 bug where tabbed dialogs in applications
	built by it won't show up on systems without IE 4.x installed.
	[Michael S. Davis]

*	UNIX: Fixed a minor bug in skin loading code which causes Emulator
	to crash when it tries to load a skin file from current directory.
	[Vlad]

*	Set the command key bit when Gremlins posts an up or down arrow.


Changes for 2.1d28 (5/21/99)
----------------------------
*	Interim internal release dates:
		2.1d27.1	-	5/17/99

*	Windows: Added command line options:

	-psf <filename>: emulator loads the specified .psf file on startup.

	-rom <filename>: specifies the ROM image file to use.
	-ram <size>: specifies the amount of RAM to emulate (in K).  Valid sizes
			are 128, 256, 512, 1024, 2048, 4096, and 8192.
	-device <type>: specifies the device to emulate.  Valid types are pilot,
			palmpilot, palmiii, palmiiix, palmv, and palmvii.
	-silkscreen <type>: specifies the silkscreen to use.  Valid types are
			english and japanese.

	Case is NOT significant.

	Examples:

		Emulator -psf C:\Data\Session.psf

		Emulator -ROM C:\ROMs\3.0\debug.rom -RAM 1024 -Device PalmIII
			-Silkscreen English

	Startup rules are now as follows:

	1 If the Caps Lock key is toggled in the ON position, always bring
	  up the New/Open/... dialog.
	2 Scan the command line for startup parameters.  If an error occurs
	  trying to scan the command line, the error is reported and the user
	  is presented with the New/Open/... dialog.
	3 Use the .psf file if one is specified.  If an error occurs trying
	  to load the file, the error is reported and the user is presented
	  with the New/Open/... dialog.
	4 If any of -rom, -ram, -device, or -silkscreen are specified, try
	  to start a new session based on those values.  If all are specified,
	  the new session is automatically created.  If any of those four
	  values are missing, the "New Configuration" dialog is displayed.
	  If the user cancels the dialog, or if there is an error creating
	  the new session, any error is reported and the user is presented
	  with the New/Open/... dialog.
	5 If no command line options are specified, try re-opening the last
	  saved .psf file (this step is skipped if the user last created a
	  new session, but did NOT save that session to a file).  If an error
	  occurs trying to load the file, the error is reported and the user
	  is presented with the New/Open/... dialog.
	6 Try creating a new session based on the settings the user last
	  specified when creating a session.  If there is an error creating
	  the new session, the error is reported and the user is presented
	  with the New/Open/... dialog.
	7 Finally, if all else fails, present the user with the New/Open/...
	  dialog.

	Steps 1, 5, 6, and 7 describe the old startup rules.  Steps 2, 3,
	and 4 are new. [Steve Haneman]

*	See that problem where I said that saving a session file could take
	up to 15 seconds or even longer?  And see where I said I didn't know
	why?  Well, it's because I'm an idiot.  Under certain circumstances,
	Poser could get into a state where it would save the same session
	file several times in a row. Normally it would take a 1/2 second to
	save a file.  But if it decided to save the same file 30 times in a
	row, that would take 15 seconds...

*	Fixed some more synchronization problems on SMP machines.

*	Force the Log####.txt files to be stored in the Poser directory
	instead of whatever directory happens to be the current one.


Changes for 2.1d27 (5/7/99)
---------------------------
*	Interim internal release dates:
		2.1d26.1	-	???
		2.1d26.2	-	???
		2.1d26.3	-	???
		2.1d26.4	-	3/25/99
		2.1d26.5	-	4/1/99
		2.1d26.6	-	???
		2.1d26.7	-	???
		2.1d26.8	-	4/27/99
		2.1d26.9	-	4/29/99
		2.1d26.10	-	5/5/99

*	Added special messages for accessing NULL and for trying to access
	the A5 register (in order to access global variables or make inter-
	segment jumps) when A5 is not set up for the application trying to
	use it. [Roger Flores, Ken Krugler]

*	Better tracking of the current application.  Now, if errors occur
	during an "action code" sequence, the application executing is
	reported, not the "main", "real" application that has the stack, A5,
	etc. [Roger Flores]

*	Fixed problem with installed Palm OS files and .psf files not
	getting added to the MRU lists if the list was empty. [Scott
	Johnson]

*	Fixed problem with MRU lists getting too long. [John Kinast]

*	In our SysUIAppSwitch patch, release any leftover command parameter
	blocks (if any). [Catherine White]

*	Fixed problem with the Escape key used to wake up a sleeping device
	also showing up in the event queue. [Daniel McCarty]

*	Added support for Escape, F1-F4, page up/down to Mac version.

*	Added special checks and error messages for SANE Math calling
	sequences. [Steve Lemke]

*	Rolled in Adam's fixes to conditional breakpoints. [Adam Dingle]

*	Fixed problems with NetLibSocketAddr. [Adam Dingle]

*	Converted to VC++ 6.0.

*	Fixed problem with getting names of library routines in the
	profiling system. [Adam Dingle]

*	Made Profile/Initialize implicit. [Adam Dingle]

*	Added explicit parent node information to profiling output text
	file. [Adam Dingle]

*	Fixed problem with recursive routines recursing too deep in the
	profile output functions.

*	The workaround for the old FindSaveFindStr bug didn't always work;
	it would sometimes still let the bug emerge.  Made a small tweak to
	keep it suppressed.

*	Turned off stack overflow checking facility.  It would occasionally
	cause the emulator to walk the dynamic heap when the heap was in an
	inconsistant state, resulting in spurious "...regular checkup..."
	error messages. [The IBM guys: Paul Silagi, Chunk Bazil, Mike Nagy]

*	Added support for the contrast button on Palm Vs.  The button is on
	the right-hand side of the display graphic, opposite from the power
	button.  You can't see it, but clicking on it brings up the contrast
	dialog.  The dialog itself has no visual effect yet. [Ron Flax]

*	Breakpoints are now preserved across reboots. [Steve Lemke]

*	Totally rewrote the way (a) tailpatches and (b) soft breakpoints
	are handled.  Previously, Poser would get control by handling
	special opcodes written into emulated memory: TRAP $D for
	tailpatches and TRAP $0 for soft breakpoints.  However, there were
	problems with this approach.  For one thing, what would happen if we
	needed to write a TRAP $D and TRAP $0 to the same memory location.
	You couldn't do it.  There was no way, for example, to use
	PalmDebugger to set a breakpoint just after a call to a system
	function that Poser tailpatched. Also, Adam Dingle pointed out a
	problem with the actual routines involved: on very rare occasions,
	if an interrupt occured just after one of those TRAP $Ds or TRAP $0s
	were executed, then the next opcode executed would be the one that
	originally resided at that location, an NOT the first opcode in the
	interrupt routine. Anyway, this whole mess has been replaced with a
	new mechanism that doesn't alter the emulated RAM or ROM. [Steve
	Lemke, Adam Dingle and the IBM guys: Paul Silagi, Chunk Bazil, Mike
	Nagy]

*	Sped up performance by 20%.  But since the previous change slowed
	things down by 13%, that's not as great as it first sounds.

*	Poser now ignores soft breakpoints (those installed by
	PalmDebugger) it encounters when it calls into the ROM for it own,
	nefarious, "between the cycles" purposes. [Steve Lemke]

*	Fixed problems trying to re-establish a sockets connection after
	it's been broken when the external debugger quit. [Ron Marianetti]

*	When asked for a ROM, .psf, .prc, etc., file, set the initial
	directory to the last directory used for that file type.

*	Allow multiple .prc file selection in the Open File dialog on
	Windows.

*	ROMs with invalid header checksums now generate a non-fatal warning
	instead of a fatal error. [Paul Dugas]

*	Allow for zero-length objects appearing at the end of .pdb files.
	[Christopher Hunt]

*	Massive spring cleaning of sources.  Now all major sub-systems have
	a consistant interface for creating new sessions, resetting
	sessions, saving sessions, loading sessions, and disposing of
	sessions.  Also, a lot of naming and scoping inconsistancies were
	taken care of. Also, namespaces were forsaken in favor of classes
	with static member functions; the CodeWarrior and VC++ browsers
	didn't handle namespaces too well.

*	In line with the above, .psf files are now compressed, taking as
	little as 15K for one that was normally 1 Meg.  Note: the time it
	takes to compress an image can vary wildly, sometimes being nearly
	instantaneous, and sometimes taking upwards of 15 seconds.  I'm not
	sure why the difference occurs...

*	Also in line with the source code spring cleaning, the entire
	emulator state is now saved to the session files.  When loaded from
	the session files, the entire emulator state is restored. This means
	that you are returned right back to where you were when you created
	the session file; you do not have to go through the process of
	rebooting the "device".

*	Only heed the "Continue Past Warnings" option if a Gremlin is
	actually running. [Scott Johnson]

*	Added support for the "dead battery" pin on Port D on EZ devices.
	This should cut down the number of low-battery warnings on those
	devices. [Jesse Donaldson]

*	Don't insert keyboard or mouse events if stopped in the debugger or
	if the main emulator window is not active.

*	Added support for 4-bit LCD mode on EZ's.  Found and fixed a long-
	standing bug where the emulated copy of the LCD display might not
	get updated if the lcdPageWidth register was updated.

*	If the emulated serial port was open and a reset occured, close the
	host serial port.

*	On the Mac, session files contain references to their associated
	ROM files via aliases.  On Windows, the references are stored as
	full pathnames.  This is old news.  What's new is that if either of
	these mechanisms fails to find the ROM file, Poser now looks first
	in the same directory as the session file for a ROM file with the
	same name, and if that fails looks in Poser's own directory for a
	ROM file with the same name.

*	When reporting a corrupted heap, display also the address of the
	chunk header. [Adam Dingle]

*	Implemented Part I of Gremlin Hordes: You can now periodically have
	the complete emulator state saved while a Gremlin is running. This
	state can be reloaded, and the Gremlin restarted.

	This feature is controlled via a new setting in the New Gremlin
	dialog.  There is now an editable item called Snapshot Frequency.
	The number entered here is the number of events that should occur
	between the time snapshots are taken.  The default value is 10,000
	events.  By setting this value to zero, you turn off the snapshot
	feature.
	
	Snapshots are saved in a single directory in the Poser directory.
	The name of the directory is "GremlinStates_####", where #### is a
	value ensuring the directory name's uniqueness.
	
	Snapshots are saved in this directory with the name Event##########,
	where ########## is the event number at which the snapshot was
	taken.  Snapshots are merely session files, so they can be reloaded
	at any time, just like regular session files.
	
	Since snapshots are taken while a Gremlin is running, the Gremlin is
	automatically turned off when the snapshot is reloaded.  However,
	Poser displays the Gremlin Control window when the snapshot is
	loaded, allowing you to resume the Gremlin if you want. [Roger
	Flores]

*	Fixed a bug in the Gremlins facility that validates forms and form
	objects before trying to manipulate any of them.  A call to
	FrmGetObjectType would occassionally return garbage, leading the
	rest of the function astray. [Scott Maxwell]

*	Added UNIX release. [Ben Williamson, David Creemer]

*	Fixed serial port not working on EZ devices (a pin moved from port
	F to port D during hardware development, and I missed it). [Florent
	Pillet]

*	Don't validate form objects and their sizes on Palm OS 1.0 devices.
	The built-in applications don't appear to follow the rules. [Andrew
	Ball]

*	Rolled in Adam's conditional breakpoint enhancements. [Adam Dingle]

	"A register reference in a conditional breakpoint expression can
	 use either a direct (i.e. "d5") or indirect (e.g. "12(a6)")
	 addressing mode.  Furthermore, a register expression can be
	 suffixed with either ".b", ".w" or ".l" to indicate that the
	 expression to be compared is either a byte, a word or a long.  An
	 an example, "12(a6).w == 1000" compares the two bytes at memory
	 location (a6 + 12) to the value 1000.  "d4.b == 100" compares the
	 low byte of the d4 register to the value 100.

	"I have found this enhancement to be extremely useful for breaking
	 into the debugger when a local variable (typically referenced off
	 the a6 register in code built by CodeWarrior) has a certain value."

*	Fixed problem with running on dual-processor Windows boxes. [TBD]

*	There is now a "white paper" on Poser usage at the following URL:

		<http://www.palm.com/devzone/docs/pose.htm>


Changes for 2.1d26 (2/26/99)
----------------------------
*	On the Mac, we were saving the device type to the .psf file twice.
	On Windows, we weren't saving the country type at all. [Waddah
	Kudaimi]

*	System call logging now also gets the names of library functions,
	and attempts to make a better stab at "dispatch" system functions
	(where a single dispatch code sub-dispatches to a suite of other
	functions, as with the Floating Point Manager). [Ken Krugler]

*	Sped up debugger communications via sockets by 20x. [Ron Marianetti,
	Mark Corry]

*	Added conditional breakpoints.  This is bolted on for now, but
	should eventually be merged more seamlessly.  It also only appears
	in the Windows version for now, but will be rolled over to the Mac
	in the next release.  Changes provided by Adam Dingle of AvantGo.
	From Adam's release notes:

	New debugging features
	
	I've posted several messages recently to the palm-dev-forum mailing
	list in which I've pointed out several limitations of the debugger
	in CodeWarrior for PalmOS: it doesn't support data breakpoints
	("watchpoints") and its conditional breakpoint implementation is
	very slow.  To work around these limitations, I've added both data
	breakpoints and fast conditional breakpoints to the 2.0b3 emulator.
	
	A data breakpoint allows you to monitor a range of memory addresses
	for writes. When any code tries to write to the addresses you've
	monitored, execution will immediately break into the debugger.  This
	can be extremely useful when you know that a certain data structure
	is being corrupted somewhere in your program, but you don't know
	where it is happening.
	
	To set a data breakpoint in the modified emulator, first launch the
	emulator, then start the debugger in CodeWarrior.  In the emulator,
	choose the "Breakpoints" menu item.  A dialog window will pop up;
	select the "Enabled" check box, then enter a start address and a
	number of bytes to monitor.  The address and number of bytes may be
	either hex ("0x89abc") or decimal ("12345"). As an example, if the
	start address is 0x10000 and the number of bytes is 8, then any
	write to addresses 0x10000 through 0x10007 will break into the
	CodeWarrior debugger.
	
	Conditional breakpoints allow you to break when execution reaches a
	given address, but only when a certain condition is true.
	CodeWarrior for PalmOS supports conditional breakpoints, but its
	implementation is so slow as to be practically useless.  As I
	pointed out in an earlier post to the palm-dev-forum list, in the
	CodeWarrior debugger, each iteration past a conditional breakpoint
	takes about 0.3 second, so you have to wait for an eternity if you
	have to iterate hundreds or thousands of times until the break
	condition is true (as is often the case in debugging).
	
	The modified emulator allows you to set conditional breakpoints with
	virtually zero overhead.  To set conditional breakpoints, first
	launch the emulator, then start the CodeWarrior debugger.  When you
	are stopped in the debugger, choose the "Breakpoints" menu item in
	the emulator.  A dialog window will pop up which will allow you to
	set up to 6 conditional breakpoints.  To set a breakpoint, choose a
	breakpoint slot and press the "Edit" button. A window will pop up
	where you can enter an address and a condition.  The address can be
	either hex ("0x2468ace2") or decimal. Typically, you will determine
	the address where you want to break by selecting the "mixed" view in
	CodeWarrior to see a mix of source and assembly code.  The condition
	you specify must be of the form "<register> <condition> <constant>",
	where

		<register> is one of the 68000 registers D0...D7 or A0...A7
		<condition> is ==, !=, <, >, <=, or >=.  (Important: for now,
			all comparisons are UNSIGNED.  This means that you can't use
			a condition such as "D0 < 0", which will always be false).
		<constant> is a hex or decimal constant

	By choosing the "mixed" view in CodeWarrior, you can see which 68000
	registers represent which local variables in your program, and so
	you can construct an appropriate break condition involving a
	register.

*	Exposed Palm IIIx and Palm V support.

*	Fixed problem with ROM Transfer on EZ devices. [Yoshiyuki Kubo]

*	Relaxed form-object-validation rules to allow for zero-sized
	gadgets and tables. [Roger Flores]

*	Fixed bug in AutoRunAndQuit mechanism where Poser would quit when
	a sub-launched application would quit, not when the application-of-
	interest would quit. [Steve Haneman]

*	NetLibDmReceive should really work this time. [Doug Morrison]


Changes for 2.1d25 (2/16/99)
----------------------------
*	Different method for checking whether or not a library function is
	implemented.  Poser still only checks known (i.e., Palm Computing)
	libraries, but now instead of using a hardcoded table, it takes
	advantage of the fact that the "open library" function appears right
	after the dispatch table. [Tim Wiegman, Adam Hampson]

*	Added WDEF project to Mac Poser project.  Changed the way the
	outline region is calculated (should be more accurate now).

*	Added support for internal faster trap dispatching mechanism.  The
	major effect of this is that Poser can now support non-debug Palm
	VII ROMs again. [Bob Ebert]

*	Added support for Autorun and AutorunAndQuit directories.  These
	directories are like the Autoload directory.  Applications in
	Autorun are loaded, and then one is chosen to be executed (by
	convention chosen to be the last file in the directory).
	Applications in AutorunAndQuit are loaded, and then one is chosen to
	be executed in the same way.  When that application quits, Poser
	quits.  If there are files in both Autorun and AutorunAndQuit, the
	last file in AutorunAndQuit is chosen for execution.  The files in
	those directories can also contain launchable documents such as
	.PQAs. [Steve Haneman]

*	Centered the LCD on the Windows version. [Scott Johnson]

*	Better logging facilities.  Here's what we've got so far:

	- Error Messages: undefined and unimplemented.

	- Warning Messages: If a dialog comes up that can be dismissed by
		clicking on the Continue button, this option causes the message
		to be logged. - Misc Gremlin Info: undefined.

	- Assembly Opcodes: unimplemented.  Will eventually log assembly-
		level trace information (registers, PC, opcodes, etc.)

	- Posted events: events entered into the system by calls to
		EvtAddEventToQueue, EvtAddUniqueEventToQueue,
		EvtEnqueuePenPoint, and EvtEnqueueKey.

	- Received events: events returned by EvtGetEvent, EvtGetPen, and
		EvtGetSysEvent,

	- System calls: calls to Palm OS functions.

	- Application calls: unimplemented.  Calls to functions in your own
		application. In order for this to work, the name of the function
		needs to be stored in memory following the function itself.
		CodeWarrior supports this convention, gcc currently does not.

	- Serial Activity: serial port being opened and closed, changes in
		serial port settings.

	- Serial Data: data being transmitted and sent.

	- NetLib Activity: calls to NetLib functions, parameter values and
		return values.

	- NetLib Data: data being transmitted and sent.

	- ExgMgr Activity: unimplemented. You get the idea...

	- ExgMgr Data: You get the idea...

	- High-level Debugger Activity:	messages received from an
		external debugger and the replies sent back.

	- High-level Debugger data: details of the messages sent back and
		forth. Not all packets currently display all their data when
		this mode is turned on.

	- Low-Level Debugger Activity: trace of the low-level mechanisms
		that receive raw data from external debuggers and the raw data
		being sent back.

	- Low-Level Debugger Data: dumps of the raw data being sent back and
		forth.

	These options are presented in a dialog box with two tabs: Normal
	and Gremlins.  The first tab contains options which are active
	during normal emulator use.  The second tab contains options which
	are active when using Gremlins.

	Along with this new dialog, the Debug Options and New Gremlins
	dialogs have also been changed.  The logging checkboxes have been
	removed from Debug Options (along with some currently unused
	checkboxes).  The logging checkboxes in the New Gremlins dialog have
	been replaced with a "Logging Options..." button that brings up the
	Logging Options dialog.  A new checkbox ("Continue Past Warnings")
	has been added to the New Gremlins dialog that controls what happens
	when a non-fatal error dialog is displayed; if possible, these error
	dialogs will automatically be dismissed if this option is checked.

	For performance reasons, all logged information is stored in an
	internal memory buffer.  Additionally, only the most recent
	information is kept.  After a certain threshhold, old information is
	discarded.  The amount of information kept is initially 1Meg, but
	that can be changed by calling HostSetLogFileSize.

	The in-memory buffer is flushed on the following occassions:

		- The application quits.
		- An error is displayed.
		- A new Gremlin is started.
		- An exception occurs.

	Logged data is written to a file named "Log####.txt", where #### is
	a number ensuring the file name's uniqueness.

	Contents of the log file are of the form:

		<Time>	<Gremlin Event>		<Text>

	<Time> is the zero-based time in seconds, where the base is the time
	of the first event logged.

	<Gremlin Event> is the event sequence number if Gremlins is running.
	This field is omitted if Gremlins is not running.

	<Text> is the log text.  Output is generally one line long, with the
	major exception being hex dump information.

*	Allow more concurrent tailpatches.  Previously, there was a fixed
	number of traps that could be tailpatched at once.  Exceeding this
	limit would cause Poser to abort().

*	Allow one particular SecurityLib function to access low-memory.
	[Gavin Peacock]

*	Implemented HostSetLogFileSize.  Increased default log size from
	128K to 1Meg. [Dan Rowley]

*	Support netSocketOptSockNonBlocking in NetLib redirection.  Also
	support the UDP calls (NetLib[Send|Receive](PB) with non-NULL
	address specifications).  With these changes, Windows users can now
	Network HotSync. [Tilo Christ]

	Here's now (this is for Palm III):

	- Get the Network HotSync files from:

		<http://www.palm.com/custsupp/downloads/netsync.html>

	- Run "nhssetup.exe" to extract "setupex.exe".

	- Run "setupex.exe" to install Network HotSync.

	- Fire up Poser.

	- Install "netsync.prc".  There will be one in your ...\Palm
		Desktop\ <UserName>\Install\ directory or your ...\Palm
		Desktop\add-on\ directory.

	- Go to the HotSync application.

	- Select the "LANSync Prefs..." menu item.

	- Select the "LANSync" option.  Click on "OK".

	- Select the "Primary PC Setup..." menu item.

	- Enter your Primay PC's IP address.  You can get this from the
		HotSync Manager (click on the HotSync icon in the TaskBar,
		select the "Setup..." menu item, click on the "Network" tab, and
		click on the "TCP/IP Settings..." button).  Click on "OK".

	- Click on the "Select Service" button under the "Modem Sync" icon.

	- Create a new service or modify an existing one.  Either way, the
		result should be a service with the phone number set to "00".
		Exit that screen.

	- Click on the "Modem Sync" icon and sync as usual.

*	Additional note on NetLib redirection on the Mac: currently, support
	is implemented with the help of the GUSI library.  This library is
	built on top of MacTCP, which doesn't support the settting or
	getting of socket options.  Any call to NetLibSocketOptionGet or Set
	will result in an error on the Mac.  Eventually, emulation will be
	performed with direct Open Transport calls, and this limitation will
	go away.

	In the meantime, this limitation affects the ability to Network
	HotSync from Poser runningon the Mac to HotSync running on a PC.

*	Fixed a long-standing 2.1dx bug where the screen would not always
	reflect the state of the LCD buffer.  One way this could happen is
	if the screen were modified in a strictly high-memory to low-memory
	order (as happens when a document is scrolled down).

*	Fixed byteswapping problem on Windows in the addresses returned by
	NetLibGetHostByName. [Pedro Alves]

*	The text file dumped by the profiler always used to be named
	"Profile Results.txt" and would be written to the current default
	directory.  Now the file name is based on the file name used for the
	binary output and is stored in the same directory as it.  This is
	mostly useful if the output file name is specified by
	HostProfileDump ().  [Steve Haneman]

*	While running Gremlins, validate the sizes of various form objects.
	[Chris Antos] The rules are:

	*	frmBitmapObj, frmLineObj, frmFrameObj, frmRectangleObj,
		frmLabelObj, frmTitleObj, frmPopupObj: Don't care. We don't
		touch them or look at them.
	*	frmControlObj: if the style is popupTriggerCtl, allow a
		zero-width object.
	*	frmListObj: if the number of items is zero, allow a zero-height
		object.
	*	In all other cases, disallow zero-height or zero-width objects,
		as well as objects completely offscreen.

*	Windows: Added mnemonic keys to the menus and dialogs. [Scott
	Johnson]

*	Adjusted the internal rectangle indicating the bounds of the hard
	buttons on the case graphics, now that the case graphics have
	changed. [Horace Ho]

*	Enable storage heap write access in our NetLib-redirected version
	of NetLibDmReceive. [Neil Rhodes]

*	Turned back on the checks to see if someone accesses the area from
	0x00018000 to 0x00020000. [Adam Dingle]

*	Added Japanese color silkscreens (no B&W yet).


Changes for 2.1d24 (1/25/99)
----------------------------
*	Yow...time to start updating those copyright statements...

*	Fixed performance problems with logging (this really affected
	Gremlins performance). [Andrew Ball]

*	Made small change to heap tracking routines; this change really
	speeds up overall performance.  A lot of performance tuning still
	needs to be done here. [Scott Johnson]

*	NetLib redirection.  [Phil Shoemaker, Ron Marianetti]

	Here's the current list of what doesn't yet work:

		Raw sockets (not on the Mac at all, works on Windows only if
			your version of WinSock supports it).

		PalmOS-specified options:
			netSocketOptSockNonBlocking
			netSocketOptSockRequireErrClear
			netSocketOptSockMultiPktAddr

		BSD sockets options that are not supported by "NetLib redirection"
		because the underlying WinSock library doesn't support them:
			netSocketOptTCPMaxSeg
			netSocketOptIPOptions
			netSocketOptSockSndLowWater
			netSocketOptSockRcvLowWater
			netSocketOptSockSndTimeout
			netSocketOptSockRcvTimeout

		Timeouts

		NetLibGetMailExchangeByName

		UDP stuff

		Turning NetLib redirection on and off on the fly.  It might be
		safer to change the setting, then quit and restart Poser (or at
		least reset the ROM).

		MacTCP doesn't appear to timeout if it can't make a connection
		to a socket on a remote machine that isn't listening on that
		socket.  There may be other cases where MacTCP doesn't timeout
		or return some other error.  In those cases, the PalmOS application
		will hang.  You should be able to press Cmd-. to get out of those
		situations, causing the patched NetLib to return a user-cancelled
		error number.

	Comments on how NetLib redirection works:  Poser has the ability
	to intercept process execution at the points where an OS function
	is called and where the OS function returns.  Poser can then
	execute additional code at these points, and can even skip
	calling the ROM version at all if it wants.  That's what happens
	with NetLib redirection.  The following calls are intercepted
	and replaced with versions that make the corresponding host-
	specific Ethernet calls:

		NetLibClose						NetLibConnectionRefresh
		NetLibDmReceive					NetLibFinishCloseWait
		NetLibGetHostByAddr				NetLibGetHostByName
		NetLibGetMailExchangeByName		NetLibGetServByName
		NetLibHandlePowerOff			NetLibOpen
		NetLibOpenConfig				NetLibOpenCount
		NetLibOpenIfCloseWait			NetLibReceive
		NetLibReceivePB					NetLibSelect
		NetLibSend						NetLibSendPB
		NetLibSleep						NetLibSocketAccept
		NetLibSocketAddr				NetLibSocketBind
		NetLibSocketClose				NetLibSocketConnect
		NetLibSocketListen				NetLibSocketOpen
		NetLibSocketOptionGet			NetLibSocketOptionSet
		NetLibSocketShutdown			NetLibWake

	Because NetLibOpen (and its cousins) is entirely patched out, the
	Palm OS version of NetLib never actually gets opened.  This means
	that the remaining, unpatched NetLib calls are made in the context
	of a closed NetLib.  I don't know if this differenc will affect
	anyone, but it might be good for you to know.

	Comments on Palm VII supprt:  Palm VII files are not yet externally
	available.  But Poser is preparing for that day, so when they *are*
	available:

		Download the prerelease Palm VII rom and the required Debug
		wireless panel which will configure the emulated OS so that
		it knows you're not on a wireless device.

		To configure: open the ROM with the Palm OS Emulator, wait
		until it has completed the boot process, and install the debug
		wireless panel by dragging the prc onto the running emulator
		window.  Now open the Prefs application and go to the "Wireless"
		panel.  You'll see a box there entitled "wireline ip".  Tap on
		it, clear the existing selection, and enter "207.240.80.136".
		Finally, open the preferences for the Palm OS Emulator itself
		(right-mouse click under Windows), and turn on the "Redirect
		Netlib calls to host TCP/IP" option.

		Now when you use a PQA, it will connect to the web site with
		your PC's internet connectivity instead of a wireless radio.
		(Warning: it is much faster that way!  Pages will load much
		more slowly when transmitted over the air.)  Also, there may
		be warnings where the Emulator notices possible bugs in the ROM.
		Usually these are benign (but indicate the prerelease status of
		the ROM) - pressing "continue" will usually get you by them.

		You can install PQAs by dragging them onto the Emulator window,
		or using the Emulator's menu commands.  Just make sure you're
		neither in the Launcher when installing an application, nor
		running the app you're upgrading.  (Installing software while
		the device is booting is also a bad idea.)  The Calculator is
		a convenient, safe app to be in when installing software.

		Note that if your PC is behind a firewall, you might not be able
		to connect to our proxy server. Ask your system administrator to
		enable port 5002 for you.

		If you get an error message along the lines of "no interfaces
		found: net - 12", that's an indication that you didn't select
		"Redirect NetLib" in the preferences panel.  Getting the error
		message "wrong socket type" is an indication that you didn't
		install the DgbWirelessPnl application.


*	More fixing of semaphore warnings: duh, changing the text of the
	warning message doesn't change the test itself! [many...]

*	Made .prc/.pdb file loading more robust: the contents are now
	validated before accessing them.  This helps against problems
	like 0x0A's turning into 0x0D's because of network downloading.

*	Windows: Fixed byteswapping problem that would occur when gdb
	tried to set a breakpoint [Ben Thomas].

*	Mac: Fixed problem with getting 'Could not save the file ""
	because the file wasn't found' when trying to save a session.
	[???]

*	Palm OS 1.0 support: Gremlins and pen events weren't being
	inserted into the system because EvtGetSysEvent blocked on
	SysSemaphoreWait instead of SysEvGroupWait in that version
	of the OS (we were only patching the later to detect when
	to insert events into the system).  Now I patch both functions.
	[Andrew Ball, Ken Hancock]

*	Set HotSync user name at boot-up.  Name specified in preferences.
	[Richard Ziegelmaier, et al]

*	Check for and report for out-of-range access to library functions.

*	The workaround for SysAppExit in d22 was hiding the workaround for
	FindSaveFindStr from d20.  Adjusted the tests so that one no
	longer hides the other. [Matt Disher]

*	Exposed Palm VII and Web Clipping support in external release.

*	Fixed a problem in the Windows mechanism for exchanging debugger
	information with the Metrowerks debugger.  This problem could
	potentially cause debugger packets to be ignored.  However, there's
	no evidence that this is the cause of the "Failed to connect to
	remote" problem that some people are still reporting with R5.
	[Ben Sessoms]

*	When handling SysPktRtnNameCmdType packets, force the given address
	to be even.  Otherwise, we'll generate an internal error as we try
	to walk the function starting at an odd address. [Ben Sessoms]

*	Fixed long-standing bug that would crash the New Gremlin dialog if
	the last item in the list had a ROM-based version and a RAM-based
	version.

*	Sort the items in the New Gremlin dialog case-insensitively.

*	Added support for launching applications with documents. [Gavin
	Peacock]

*	Updated bitmaps. [Ken Krugler, Stephen Best]

*	Fixed problem with getting a "yadda accessed memory manager data
	structure" while dumping the results of profiling. [Adam Dingle]

*	Removed most (hopefully all) influences of Poser's memory
	accessing and ROM function calling from the profiling output.

*	Fixed the profiler to handle TRAP $F / <dispatch number> sequences
	where <dispatch number> is not in the range 0xA000-0xAFFF (some
	development systems leave off the leading "A"). [Adam Dingle]

*	Bumped the default number of profiled functions from 20000 to 48K.
	[Steve Haneman]


Changes for 2.1d23 (12/16/98)
-----------------------------
*	Windows: fixed some byteswapping problems with debugger packets.
	(Actually, put *back* some bugs that I fixed...)

*	Re-organized sources.

*	Added ability to patch libraries.  Started patching out NetLib.
	Note that there is no actual NetLib redirection in this release.

*	Fixed some serial port emulation problems: mirrored	UART settings
	into the host serial port just after the port has been opened, not
	after the first call to SerSetSettings (there may *not* be a call
	to SerSetSettings!).

*	Generating a profiling report now also produces a text file for
	use on platforms that can't read the Metrowerks Profile tool
	file format.

*	Added profiling configuration for Windows.


Changes for 2.1d22 (12/7/98)
----------------------------
*	Only warn about MemSemaphore usage on ROMs that themselves hold the
	memory semaphore correctly.  This time for sure!  Also only warn
	when the semaphore has been held for 1 minute (previously, the
	timeout was 10 milliseconds).

*	Completely overhauled serial port emulation.  More of the UART is
	emulated more faithfully.

*	If no serial port is selected for emulation pass through and we're
	not in loopback mode, drop transmitted bytes on the floor.

*	If IrDA is using the serial port, drop transmitted bytes on the
	floor (for now).

*	Re: SysAppExit accessing a deleted stack: SysTaskDelete and a whole
	host of other functions also access the deleted stack until the
	kernel has a chance to switch to another stack.  Much gnashing of
	teeth was performed until an appropriate alternate heuristic could
	be found.

*	Let PrvCompressedInnerBitBlt access bits outside the allocated
	buffer.

*	Windows: Fixed problems with Cancelling a ROM download.

*	Another attempt at fixing -192 errors at startup.

*	Mac: Fixed problem with opening two windows when starting a session
	by double-clicking on a ROM file.

*	Goosed debugger messaging on the Mac.  Previously, an asynchronous
	callback function would get called when Poser received a packet from
	the debugger.  The callback function would set a boolean and then
	call a Toolbox function to wake up the application.  The next time
	the application's main-event-loop was entered, the packet would be
	handled.  However, the overhead of waking up the app and waiting for
	the main-event-loop to be entered was way too high.  I now handle
	the debugger packet immediately in the asynchronous callback
	function.  This means that the debugger packet is handled in the
	context of the calling application (the external debugger).  If
	Poser were to crash at this point, it would crash the debugger, not
	Poser.  Additionally, we have to be very careful not to allocate any
	memory from within the callback, as such memory would be allocated
	from the debugger's heap, not Poser's.

*	Changed some of the rules for interacting with an external
	debugger.

	In order for an external debugger (PalmDebugger, MWDebug, or gdb) to
	talk with a hardware device, the hardware device has to be
	listening. There are two things a debugger can talk to: the Debugger
	socket and the Console socket.  These two sockets correspond to the
	two windows in the PalmDebugger.

	To get the ROM to listen on the Console socket, the developer has to
	execute shortcut-.2.  To get the ROM to listen on the Debugger
	socket, the device has to cause an exception somehow.  Doing
	something wrong (e.g., access invalid memory, divide by zero, etc.)
	does this. Executing a DbgBreak also does this, which is what
	happens when the user executes shortcut-.1.  After the exception
	occurs, the ROM goes into a loop where it listens for and responds
	to debugger commands.

	Because external debuggers talk directly with Poser and not the ROM
	when debugging with Poser, there's no need to execute shortcuts or
	cause exceptions in order to start debugging.  Poser is perfectly
	capable of handling debugger requests, letting the emulated process
	continue on its merry way.

	However, when dealing with commands sent to the debugger socket,
	it's very important that the state of the emulated CPU not change.
	Often several commands are issued, ultimately ending with some
	command that restarts the emulated CPU.  During these exchanges, the
	debuggers assume that the state of the CPU has not changed since
	"debug mode" was entered.  For this reason, when commands are sent
	to the Debugger socket:

		- Poser needs to be in "debug mode".  That means that it has
		  halted any emulation and is just idling.  If commands for
		  the Debugger socket come in and Poser is not in debug mode,
		  the commands are ignored.
		- The exception to this rule is the "get state" Debugger
		  command.  This command is issued when the user types "att"
		  in the Debug window.  It indicates that the user wants to
		  enter debug mode for the purpose of setting breakpoints,
		  examine memory, etc.  As a courtesey, Poser will enter
		  debug mode when it sees this command.

*	Install a 'pose' feature so that applications can tell if they are
	running under Poser or not.

*	Install a 'gdbS' feature when connected via a socket to an external
	debugger.  The existance of this feature causes programs written
	with prc tools to enter the debugger when they are launched.

*	Removed a minimum version check that was preventing us from using
	sockets on Windows '95.


Changes for 2.1d21 (11/12/98)
-----------------------------
*	Allow for NULL access bug in FldDelete.

*	Allow for launching of Emulator by double clicking on .psf or .rom
	files in Windows.

*	Added back a whole slew of strings accidentally deleted in d20.


Changes for 2.1d20 (11/10/98)
-----------------------------
*	Support full debugger protocol for latest PalmDebugger (with
	integrated Poser support).

*	Fixed button mapping problems with EZ hardware.

*	Added Greg's Ymodem code for downloading ROMs.  This includes his
	fix for high-baud rate downloads.

*	Support for higher baud rates.

*	Re-establish serial port after Preferences/Properties dialog.

*	Allow for access to deleted stack in SysAppExit.

*	Allow for bug in NetPrvTaskMain that accesses low-memory.

*	Allow for bug in NetPrvSettingSet that reads from a random memory
	location.

*	Tighten up on some inappropriate memory checks (only let some
	functions get away with murder in older ROMs).

*	Removed check for bug in PrvGetBatteryPercent (it's been fixed).

*	Changed formatting of time displayed in Gremlins window.  Was in
	seconds, now in hh:mm:ss.

*	Revoked Memory Manager privileges for MemCmp, MemMove, and MemSet;
	they no longer have free run of RAM like other MemMgr functions.

*	Allow for bug in FindSaveFindStr which reads off the end of the
	handle passed to it.

*	Similar comments for FntDefineFont.  When copying the contents of
	an old, smaller buffer into a new, larger buffer, it copies the
	size of the new buffer, causing MemMove to walk off the end of the
	old buffer.

*	Let ScrInit access unallocate memory for when it copies the splash
	screen from its temporary location to the real LCD buffer.

*	Re-enabled code that reports a bug in BackspaceChar, but only for
	newer ROMs.

*	Internal change: Better encapsulation of what Palm OS bugs are
	fixed in what version.

*	Only warn about MemSemaphore usage on ROMs that themselves hold
	the memory semaphore correctly.


Changes for 2.1d19 (10/30/98)
-----------------------------
*	Windows: fixed problem with trying to auto-reload the previously
	used .psf file on startup.

*	Windows: allow the user to click on the close box of the Startup
	dialog (the one saying New/Open/Download/Exit).

*	Fixed two problems with heap management on 2.0 ROMs.  First, I was
	failing to recognize the fact that zero in the size field of a heap
	header means that the heap is 64K bytes long.  Second, I was
	attempting to access *all* fields of the terminating sentry chunk.
	This chunk only has a size field; attempts to access subsequent
	fields may fail if the sentry is at the end of RAM.


Changes for 2.1d18 (10/29/98)
-----------------------------
*	Disabled Profiling menu items and Transfer ROM menu item until
	the functionality behind those items can be implemented.

*	Added "Dragonball EZ" menu item to device list.

*	Windows: fixed problem with stale reference to the LCD window after
	its been closed.

*	Fixed problem in MC68EZ328Bank::GetLCDDepth where it would return 4
	for grayscale mode instead of 2.

*	Mac only: fixed problem getting -192 error on startup with a fresh
	set of preferences.


Changes for 2.1d17 (10/28/98)
-----------------------------
*	Fixed bug in Gremlins when logging information; an internal counter
	would wrap to be negative after a large number of events have been
	posted.

*	Re-laid out Debug Options dialog and hooked up the checkboxes.
	Disabled the ones that aren't supported yet.

*	Windows only: Fixed another "Unhandled exception caught in main"
	bug: this one would occur when the Poser would try to open a .psf
	file that no longer existed (the previous cause of this bug occured
	when Poser would try loading a .rom file that no longer existed).

*	Windows only: remove old registry entries when found.

*	When an error occurs accessing a file, consistantly set the
	%filename parameter for error messages.

*	Added "Log error messages" checkbox to New Gremlin dialog.

*	Save Gremlins settings to preferences.

*	Fixed bug in meta-memory tracking stuff that would trash the
	emulator's heap if it was emulating a device with 256K of RAM
	or less.

*	Clear the serial FIFO queues on reset.  Fixes a problem with their
	overflowing and serial port emulation is not turned on (that is,
	"None" is selected in the Preferences/Properties dialog).

*	Fixed problems with trying to use "&string_object[0]" on empty
	strings.  Apparently, there is not necessarily any memory
	allocated for empty string objects, so attempting to take the
	address of the string fails.


Changes for 2.1d16 (10/22/98)
-----------------------------
*	Allow the opening of locked .rom, .psf, .prc, .pdb, and .pqa files.

*	Updated TextMgr calls to reflect new (long) parameters.

*	Added Autoload facility.

*	Fixed problem with trying to wakeup the device (by calling
	EvtWakeup) when the interrupt level mask was too high.

	(Backed this modification out temporarily.  Seems that the ROM can
	 spend a large percentage of its time at this interrupt level if
	 it's not doing anything else useful, preventing the user from
	 clicking on the LCD screen.)

*	Conditionalized the code so that Palm VII, Palm V, and Palm IIIx
	could be included or excluded separately.

*	Conditionalized *this* file so that secret stuff can be stripped for
	external releases.

*	Fixed the "Save Screen" functions (I'd commented them out while
	adding support for lcdPageWidth and lcdPanningOffset registers and
	forgot to go back and clean up).


Changes for 2.1d15 (10/15/98)
----------------------------
*	Bug fix: my wrapper function for TxtGetCharBounds was accidentally
	calling TxtGetNextChar (copy & paste error).

*	Bug fix: the routine that maps a range of "host" memory into
	"emulated" memory would round the base address down to the nearest
	multiple of four, but the routine that would reverse the process
	didn't do the same rounding.  This meant that the routine that
	unmapped would be unable to find the address recorded by the routine
	that did the mapping, and entries would never get unmapped.

*	Bug fix: if Poser reads in a preference setting for a Japanese
	silkscreen and that version of Poser doesn't support Japanese
	silkscreens, change the setting.  Otherwise we'd get a -192
	(resource not found) error.

*	Relaxed MemSemaphoreReserve/Release testing.  Now only track time
	when "write" parameter is true.

*	Bug fix: allow debuggers access to reserved parts of Dragonball
	memory.

*	Mac only: show errors in a movable modal dialog, allowing the user
	to switch to the Finder, possibly for the purpose of launching a
	debugger.

*	Allow selection of multiple items in New Gremlins dialog.  These
	items are also reselected when the dialog is re-opened.

*	Added HostGremlinNumber, HostGremlinCounter, HostGremlinLimit.

	"The reason I'm asking is that I'd like to log info to figure out
	 what's going wrong with a specific gremlin test case, but since
	 it's pretty far along (e.g. 100000 steps) I only want to start
	 logging when I'm getting close to where I think the problem will
	 occur. The problem occurs after a different number of steps
	 depending on the gremlin seed value, thus I'd like to set my
	 'start recording' value based on which gremlin is running."

*	Added HostLogFile.  This function returns a special HostFILE* that
	can be used by Palm OS applications that want to write to the same
	file that any Poser facility is writing to.  This HostFILE* is
	special in that it is only open when Poser wants it to be, and is
	write-only; any HostFxxx functions that attempt to read from
	HostFILE's will fail when fed this HostFILE*.

	Output occurs only when Poser has turned on logging.  If the
	Palm OS application calls something like HostFPrintF(hostLogFile,
	"...", ...) and logging is not turned on, the output is discarded.

*	Added HostSetLogFileSize.  This function sets the maximum amount of
	text written to the file created by Poser's logging facilities.

*	If Gremlins is running and a message needs to be displayed that can
	be handled by clicking on a Continue button, write that message to
	a log file instead and implicitly click on the Continue button.

*	If Gremlins is running, turn off the facility that causes the user
	to be warned only once of certain kinds of errors (that is, the
	error will be logged to the file every time).

*	In the logging output file, add a comment that only the last xxxK
	of information is recorded.


Changes for 2.1d14 (10/1/98)
----------------------------
*	Added Japanese silkscreens, and support for selecting them.

*	Mac: added "None" menu item to serial port menu.

*	Added support for lcdPageWidth and lcdPanningOffset registers.

*	Fixed bug with power-off (I wasn't allowing HwrSleep to change some
	low-memory vectors, resulting in a warning dialog).

*	Check for and report heap corruptions.  Poser walks the heap
	regularly, usually to sync up its notion of where things are with
	the Palm OS Memory Manager's.  These walks used to be vulnerable to
	corrupted heaps.  Now they should be more robust.

*	Updated the Mac version to CodeWarrior Pro 4.

*	Instead of patching ErrDisplayFileLineMsg and showing its text in
	our own dialog, let the ROM version execute.  It will eventually
	call SysFatalAlert, which we patch for the same reason (to show the
	text in our own dialog with our own buttons).

*	Added stack overflow checking.  On all opcodes changing the stack
	pointer (PEA, MOVE, MOVEM, JSR, and any opcode operating on a
	register with pre-decrement mode), I check the stack pointer to see
	if it's (a) close to the end of the stack or (b) past the end of the
	stack. The former gets a warning, the latter gets an error.

*	Initialize new RAM to 0xFF (make it look like new flash RAM).

*	Fixed "Unhandled exception caught in main()" error message that
	would show up when launching the Windows version.  This would show
	up when the previously-used ROM file could not be found.  Now, the
	(slightly) less enigmatic message "Could not start a new session
	because the file could not be found" is displayed.  More
	importantly, Poser no longer quits after displaying the message.

*	Added check for how long the Memory Manager semaphore was held.
	Show a warning if held for more than 10 milliseconds.

*	Fixed problem with multiple Gremlin Control windows appearing in
	the windows version.  Doh!

*	Made the "Release" target an "External Release" target, and added
	an "Internal Release" target.

*	Added support for loading clippings.

*	Made a change that should take care of accesses to invalid memory
	from an external debugger.


Changes for 2.1d13 (9/15/98)
---------------------------
*	Fixed bug in heap validation functions; when I extract the *signed*
	hOffset value, I have to sign extend it from 24-bits to 32-bits.

*	Mark more parts of memory as memory manager data structures.

*	Support hardware sub-ID for EZ devices.

*	Support HwrIdentifyFeatures for 68328 devices.

*	Enable flash for Palm V and Palm IIIx.

*	Fixed long-standing Gremlins bug that would cause event pushing to
	stop after a while (the Gremlin mechanism would enqueue and event
	and then wait for it to be handled; however, in some cases, the
	event would fail to be enqueued, and the Gremlin mechanism would
	wait forever for that event to be handled).

*	Allow for a bug in SysBinarySearch in pre-3.0 systems that would
	cause it to pass an invalid pointer to the search callback.

*	Added Gremlins Control window (displays gremlin number, current
	event number, and elapsed time; also contains Stop, Resume, and Step
	buttons).

*	Tweaked Gremlins engine so that doing a Step doesn't reset the
	"until" value.

*	Performance enhancements:

	- Changing some functions to return "int" instead of "bool"
	  resulted in better code generation, leading to a 7% performance
	  boost in my canonical Gremlins test (Gremlin #0, 10000 events
	  on the Memo Pad).  (Actually, this was only a win in VC++;
	  CodeWarrior worked better with "bool".  Therefore, all of the
	  sources were changed to use "Bool", which is typedeffed to
	  "bool" or "int" depending on the compiler being used.)

	- Putting back an enhancement from Craig's Mac Copilot lead to a
	  27% performance boost.  The idea is to update only the scanlines
	  that are changed since the last screen refresh.  Craig did it by
	  carefully comparing the current LCD buffer with a saved version
	  of it.  I now do it instead by noting when the LCD buffer is
	  being written to (this is done fairly efficiently via the
	  MetaMemory tracking routines) and remembering the first and last
	  bytes in the LCD buffer that were written to.

*	Fixed trap number used in HostControl.h.

*	Updated to latest CharEncodingType values from TextMgr.h.


Changes for 2.1d12 (9/2/98)
---------------------------
*	EmuTraps -> HostControl.

*	Let PrvFindMemoryLeaks walk the heap.

*	Added HostGetEnv.


Changes for 2.1d11 (8/31/98)
----------------------------
*	Added support for AMD flash RAM.

*	Windows only: fixed support for external debugging.

*	Windows only: display dialog if an exception is caught in WinMain.

*	Windows only: fixed the way the Dragonball(EZ) registers were
	initialized.  After things got going, the registers were OK, but the
	initial values on little-endian machines was completely bogus.

*	Mac only: updated creator resource text.

*	Totally revamped the way memory access checking is performed.  In
	addition to detecting access to low-memory, system globals, the
	screen buffer and Dragonball(EZ) registers, I validate access to the
	dynamic heap.  Now, only the Memory Manager can fiddle with chunk
	headers and trailers, free chunks, and unlocked chunks. For the time
	being, low-stack access is no longer detected, though this feature
	will return.  Eventually, we should also be able to detect access to
	uninitialized memory.

*	Updated to latest sysFtrNumXXX values.

*	Fixed test for Intl Mgr in gremlins.

*	Test for NULL in stub Intl Mgr functions.

*	I now calibrate the pen before running a gremlin.  This is
	necessary for consistant results between different runs across
	boots.

*	Fixed error reporting problem where previous messages reported in
	dialogs would inhibit other messages from appearing (that is, the
	attempt to display a second message would end up showing the first
	error message again).

*	Handle errant accesses to Dragonball space past the end of the last
	defined register.

*	Check for and report unimplemented traps.  This check detects
	attempts to call functions that are off the end of the trap table as
	well as calls to SysUnimplemented.

*	Internal change: consolidated more error handling in the Errors
	class.  Cleaned up the Errors interface a little bit.

*	Added temp hack to let PrvGetBatteryPercent read off the end of an
	allocated chunk of memory.


Changes for 2.1d10 (8/18/98)
----------------------------
*	Display correct error message if a low-stack access is performed (I
	was previously re-using the "screen buffer access" message).

*	Low-memory access by the ROM was previously allowed up until
	UIInitialize was called.  That's been changed to TimInit.

*	Consolidated some "device" menu items in the New Session dialog,
	and added a new device.

*	Per Steve and Roger, changed some function names in EmuTraps.h.

*	Added Control Panels to the list of applications in the New Gremlin
	dialog box.

*	Added support for DbgMessage.

*	Internal change: Roger Flores Memorial Constant Eradication.  Got
	rid of a lot of constants in EmuTraps.cpp and TrapPatches.cpp. These
	constants were used to fetch parameters from the emulated stack
	pushed on there by emulated code.  I now define structs that
	describe the stack contents and use those (with the offsetof macro)
	to get the values.  In addition to the obvious one, another
	advantage is that the macros can now determine the _size_ of the
	parameters and call get_long, get_word, or get_byte accordingly.

*	Rolled in more IK/Gremlin changes for Ken.

*	Double-clicking on an app in the New Gremlin dialog will implicitly
	click on the OK button.

*	Mac: Support Cmd-D in the "Save this file?" dialog (you guys owe
	me!)

*	Mapped some internal error numbers to error strings.

*	Re-establish the interrupt state of any pressed buttons after a
	reset.  This allows you to press the Power key and Cmd/Ctrl-R,
	resulting in a Hard Reset.

*	Asking for the 'irda' ROM token will now always fail (at least,
	until we can get some IrDA support implemented).  NOTE: the ROM
	calls HwrGetROMToken directly, which means that it will not see the
	effect of this patch.

*	Internal change: Platform::DisposeMemory now takes a reference to a
	pointer so that it can set that pointer to NULL.

*	Use Platform::AllocateMemory and Platform::DisposeMemory in the
	profiling code, so that it can use temp memory on the Mac.

*	EmuProfileDump now uses the name passed in to it.  If NULL is
	passed in, a default name ("Profile Results") is used.

*	Started on checking memory accesses to the dynamic heap that are
	outside of allocated memory chunks.  Not activated yet because (a)
	it's too slow and (b) the hueristics aren't quite right.

*	Windows only: Fixed bug with not reporting errors that occurred
	while initializing the emulator.  Now you're notified if the serial
	port you've specified in the Properties dialog is busy.

*	Windows only: Made the example in the previous bullet a warning,
	not a fatal error.


Changes for 2.1d9 (8/4/98)
--------------------------
*	Mac: fixed problem where the emulator would attempt to save the RAM
	file with no name if "Save Always" were selected, the user chose
	Quit from the File menu, and the RAM file was new (i.e., had never
	been saved before).

*	Prevent the system from _reading_ low-memory if it's (a) not
	sleeping or dozing, (b) fully booted, and (c) not handling an
	interrupt.

*	Hooked up "Fill New Blocks" and "Fill Disposed Blocks".

*	Minor optimizations to DRAM_Bank accessors.

*	Rolled in Ron's changes for finding a function's name.

*	Detect and report accesses to the space below the stack pointer and
	above the low-end of the stack.  Note that there is no checkbox in
	"Debug Options" for this, but performance timing shows that there is
	very low overhead for this check (less than .1%).

	IMPLEMENTATION NOTE: detecting accesses to the unused parts of the
	stack obviously entail knowing where the stack is.  This information
	is gleaned from the SysAppInfoType block when the application is
	launched. However, there's no really good way to hook into the
	launch process. There are advantages and disadvantages to every
	approach, but the one used here is to hook into SysAppStartup and
	SysAppExit.  This works for applications that use the standard
	runtime startup code, but applications are not guaranteed to use
	that standard code.  Hopefully, the percentage of such applications
	is low.

	Additionally, SysAppStartup and SysAppExit are called under
	circumstances other than starting up the application.  For instance,
	they are called when action codes are sent to each application.  To
	differentiate the two, we ignore all calls to SysAppStartup that
	don't contain sysAppLaunchCmdNormalLaunch in the cmd field of the
	SysAppInfoType block.

*	Hooked up "Clean Stack" check box.  This option was originally
	defined to overwrite the parts of the stack that were freed up by an
	UNLK or RTS opcode in an attempt to detect accesses to those ranges
	of memory. Since that's now handled by the previous "*", "Clean
	Stack" now means that we initialize the part of the stack reserved
	by LINK opcodes, thus initializing local variables to well-defined
	bad values.

*	Fixed bug that occured when setting a breakpoint on an opcode just
	after a call to a system function that was tailpatched by the
	emulator.


Changes for 2.1d8 (7/29/98)
---------------------------
*	EmuGrmIsRunning (and SysGremlins) FINALLY returns a correct value
	instead of just returning "true" all the time.

*	Implemented EmuDmLoadFile and EmuDmSaveFile.

*	EmuDmSaveFile now takes a card number as the second parameter.

*	Added parameter checking to all EmuXXX functions.  Functions that
	return EmuErrs will return emuErrInvalidParameter.  StdIO functions
	return error values according to the ANSI/ISO standard, and will set
	errno to emuErrInvalidParameter (note that functions that alter the
	return values of ferror and/or feof will NOT affect those value,
	which is DIFFERENT from the standard).

*	Fixed bug when setting the current time on startup.  This bug would
	cause a crash on new Palm V ROMs.

*	Fixed bug with new Palm V ROMs when they tried to identify how much
	memory was on the "device".

*	Windows: Fixed problem where clicking OK in the Properties dialog
	would crash the emulator under Windows 95 (and could possibly crash
	Windows 95, too!).

*	Mac: Fixed problem where the serial port name would get lost,
	prohibiting the emulator from being able to open the serial port.


Changes for 2.1d7 (7/27/98)
---------------------------
*	Mac: Don't feed the ROM mouse/pen events if we've turned off
	emulator execution at idle time.  This prevents problems if a dialog
	comes up while tracking the mouse/pen.

*	Fixed long-standing bug from Mac Copilot 1.3 days.  The functions
	GetRegisters and SetRegisters can be used to save and restore the
	CPU registers.  The emulator used those functions for just that
	purpose when it would call ROM functions as subroutines.  However,
	the status register was not faithfully saved, which meant that it
	was not always put back the way it was found.  Since status bits
	would then occassionally change spontaneously out from under the
	emulated process, things would occassionally go "haywire" (that's a
	technical term).

*	Value returned by EmuHostGetVersion is now based on the
	application's version resource instead of being hard-coded.

*	Mac: Save window position.

*	Implemented EmuHostIsSelectorImplemented.

*	Holding down the Ctrl key while booting/resetting will stop the ROM
	at the start of the Big ROM by using a temporary breakpoint.


Changes for 2.1d6 (7/23/98)
---------------------------
*	Changed way emulated apps called host functions. Those functions
	used to be called by invoking TRAP $E. Now we latch onto the
	SysGremlins trap number.

*	Extended set of host functions.

*	Zap some card header fields to say that we don't emulate flash RAM.

*	Fixed problem with profiling.

*	Mac: Fixed an execution path where an untyped ROM file wasn't
	getting its type set.

*	Fixed problem with stopping on A-Trap breaks.


Changes for 2.1d5 (7/21/98)
---------------------------
*	Mac: added version that does profiling.

*	Fixed loading of "whole" ROMs (those with Big ROMs and Small ROMs).

*	Fixed loading of .pdb files that have an AppInfo block but no
	records.


Changes for 2.1d4 (7/20/98)
---------------------------
*	Mac: turned Open and Install menu items into hierarchical menus.

*	Fixed bugs with saving and loading session files.

*	Mac: turned Appearance Manager classes back on when running on a
	sufficient machine (I'd accidentally left the application using the
	GA classes even when AM was available).

*	Mac: create the Debug Options window invisibly; reduces flickering
	when opened.

*	Converted over to using the cross-platform classes FileReference
	(reference to and unopened file) and FileHandle (reference to an
	opened file).  These classes allow more platform-independent code
	(such as the preferences code, which used to deal with Aliases on
	the Mac and file paths on Windows).

*	Overhauled error/exception handling/reporting.  I now use a
	consistant approach to detecting, handling, and reporting errors.

*	Rewrote the ROM image loading function.  ROM images consist of two
	parts: a Big ROM and a Small ROM.  The ROM image file always
	contains a Big ROM part, but not always a Small ROM part.  However,
	the Small ROM part is optional and can be dummied up if necessary.
	The original version of the ROM image loader needed to load in the
	ROM image file once, determine if the Small ROM was included, and
	start over if it wasn't.  The new ROM image loader is smarter,
	reading in just the parts it needs to determine if the Small ROM is
	there or not.  Only after that does read in the full ROM file.

*	Put more strings in resources.  Most, but not all, are now done.

*	Added StdIO wrappers (see EmuTraps.h).


Changes for 2.1d3 (7/7/98)
--------------------------
*	Added progress bars when loading .prc and .pdb files.

*	Added support for drag and drop.

*	Now close previous session before opening the next.

*	Mac: Added StandardGetFile file filter to allow files that start
	with "rom." or end with ".rom" or " rom", but that don't have the
	right file type.

*	Updated to latest EZ ROM header files (as of 7/6/98).

*	Update the low-memory checksum if low-memory is altered by an
	external debugger.

*	Fixed long-standing bug that would corrupt ROMs when switching from
	one to another.  Since you couldn't do this on Windows in 2.0, you'd
	only see it in the Mac 2.0 version.

*	When creating the preferences for the first time, set the amount of
	RAM displayed in the New Configuration dialog to 1Meg.

*	Mac: Allocate large chunks of memory from temp mem.


Changes for 2.1d2 (7/2/98)
--------------------------
*	Revamped startup sequence. From the ERS:

	If the application is started by double-clicking on its icon, it
	will attempt to perform some appropriate startup action.

	* If the user had saved a session document the previous time the
	  emulator had been run, the emulator will attempt to reload that
	  document.

	* If the user created a new session document during the previous
	  session but didn't save that document, the emulator will create
	  a document with the same settings.

	* If either of those attempts fails (for instance, the previously
	  used session document or ROM file cannot be found), or this is the
	  first time the user has used the emulator, or the user holds down
	  the Caps Lock key while starting the emulator, the user is
	  presented with a "New Configuration" dialog box. The user uses
	  this dialog box to specify a new hardware/RAM/ROM configuration
	  from which a new document is created.

	If the user double-clicks on an emulator document icon, the emulator
	attempts to restore the session recorded in that file. This attempt
	may fail if the ROM image for the session can no longer be found. In
	that case, the session document can no longer be used; session
	documents can only be used in conjunction with the exact same ROM
	image that created them.

	If the user double-clicks on a ROM image icon, the emulator
	presents the user with the "New Configuration" dialog box with the
	selected ROM file entered into the ROM File text slot.

*	Brought Mac and Windows versions in sync with each other.

*	IMPORTANT NOTE: "RAM" files created by previous versions of the
	emulator are no longer supported.  There are two reasons for this.
	First, they didn't contain enough information that today's session
	files need (such as the associated ROM file name, or the device type
	to emulate).  Second, ".ram" is the extension for Real Audio Media
	files. Therefore, the emulator now reads and writes ".psf" (Palm
	Session File) files.

*	Added Registry information so that Emulator files have the right
	description next to their names.


Changes for 2.1d1 (6/22/98)
---------------------------
*	Updated to latest UAE.

*	Updated to CodeWarrior Pro 3 on the Mac.  (Requires "MW C/C++ PPC"
	from May 19th or later.)

*	Removed 68K and FAT versions.

*	New menu organization.

*	More emphasis on documents, rather than ROM image files.

*	Lots of internal changes:

	- RAM_ROM broken out into many smaller files.

	- Lots of small performance tweaks.

	- More strings moved to resources.

	- Names of system functions are fetched directly from the ROM
	  instead of being hardcoded in StringData.cpp.

*	Added DragonballEZ support.

*	Added white screen to the Mac.

*	New Preferences/Properties... and Debug Options... dialogs.

*	New startup dialog for Windows (for when it needs help starting
	up).

*	Fixed the bug where you couldn't enter typed characters if there
	wasn't a blinking insertion point.
