David,

I ran the sample you gave but did not crash. Perhaps you could clarify:

* What version of Poser you're using
* What platform you're running on (Windows, Mac, Unix)
* What ROM(s) you're using
* What you mean by "bus error" (does your application crash, or does Poser
crash)?
* What Development system and SDK you're using

-- Keith Rollin
-- Palm OS Emulator engineer





David Haupert <[EMAIL PROTECTED]> on 02/04/2000 10:47:18 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  David Haupert <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:    (Keith Rollin/HQ/3Com)
Subject:  Bug in Color Debug Emulator?




Hi,
   I have been trying to come up with a way for supporting screen
reading/writing in both pre-3.5 and 3.5+.  I now have some code that I
believe should work, and does indeed work fine as long as I switch the
screen to black and white mode using WinScreenMode.  That being said I
think I found some code that will cause a bus error in the emulator,
though it should be fine.  Witness:

unsigned long   requiredDepth = 1; // need to set to black and white
so bitmap image format matches that of old units.
unsigned long romVersion;
unsigned long currentdepth = 1;
unsigned long width = 160, height = 160;
Boolean colorsupported;

   // See if we have at least the minimum required version of the ROM
or later.
   FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion);
   if (romVersion >= 0x03000000) {
      if (romVersion >= 0x03500000) {
         WinScreenMode(winScreenModeGetSupportsColor, NULL, NULL,
&currentdepth, &colorsupported);
      } else {
         colorsupported = false;
      }
      WinScreenMode(winScreenModeGet, NULL, NULL, &currentdepth,
NULL);
      if (currentdepth != 1) {

// Here's where it will cause a crash.
         WinScreenMode(winScreenModeSet, &width, &height,
&requiredDepth, &colorsupported);

Note that it seems that the colorsupported must be set to true to
actually successfully set the color device to run in black and white.
The 'winScreenModeGetSupportsColor' returns a true in the debug rom,
however, when I try to actually go and set the black and white depth
with colorsupported = true, I get the bus error.  If I set
colorsupported = false, it does not yield an error, but the mode
doesn't truly switch and my bitmaps appear to be in some different
format.  This all works fine (naturally), in the release rom.

Please let me know if you find anything to the contrary of this.  I
have to release a new version of software, and would like to know that
the color support is there, so that whenever these color devices come
out, I won't need to have yet another update.

Thanks in advance!
Thanks,
Dave Haupert
DDH Software, Inc
[EMAIL PROTECTED]    http://www.ddhsoftware.com

--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palm.com/devzone/mailinglists.html






-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to