I wrote "3 bpp" without thinking :-)
Please change that mentally to any other suitable combination of depths of
the source and target window (except the same depth).
-Prashant

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Prashant
Verma
Sent: Tuesday, August 29, 2000 2:47 PM
To: Palm Developer Forum
Subject: RE: Misaligned BitBlt?


X-MimeOLE: Produced By Microsoft MimeOLE V5.50.3825.400
Importance: Normal

Regarding the blit bug (as desribed near the end of this email), is it safe
to assume the following:
i)Palm OS 3.1 has a bug, which makes it impossible to copy a rectangle from
a 1bpp depth window to a 2bpp depth window.
ii)This bug does not exist for any other combination of depths..ie if I were
to copy from a 1 bpp window to a 3 bpp window, it would work well.
iii)Both the statements i and ii are wrong, and there's something wrong with
my code so I should look at it again. (quite a possibility, given a couple
of such incidents recently :-)   ..)

Thanks for your help, IA
-Prashant

-----Original Message-----
From: [EMAIL PROTECTED]

PrvMisAlignedForwardInnerBitBlt is a particularly tricky function (along
with
PrvMisAlignedBackwardInnerBitBlt). It has this habit of walking off the end
or
beginning of an allocated buffer while copying pixels from one place to
another.
As it turns out, it does so in a fairly safe fashion, and so Poser's
heuristics
for determining naughty behaviour report an error when there really is none.

Poser *does* check for characteristic memory accesses from those two
functions
and inhibits error messages when it looks like they're OK. However, Poser's
check is very narrow; it allows only for 16-byte reads (see line 1033 or so
of
Poser's MetaMemory.cpp source file). It's possible that you've found a
similar
case involving 8-bit reads. Looking at the Palm OS 3.1 source code, I can
see
that this might be the case.

If you want, you can rebuild Poser to allow for this possibility. Find the
lines
in MetaMemory.cpp:

          if (Patches::HasBlitBugs () &&
               info.result == Errors::kMemMgrAccess &&
               info.forRead &&
               info.size == sizeof (UInt16) &&
               (::InPrvCompressedInnerBitBlt () ||
                ::InPrvMisAlignedForwardInnerBitBlt () ||
                ::InPrvMisAlignedBackwardInnerBitBlt ()))
          {
               goto HideBug;
          }

And do something appropriate with that "info.size == sizeof (UInt16)" part,
like
 getting rid of it.

-- Keith Rollin
-- Palm OS Emulator engineer






"Prashant Verma" <[EMAIL PROTECTED]> on 08/08/2000 01:28:48 PM

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

Sent by:  "Prashant Verma" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:    (Keith Rollin/US/PALM)
Subject:  Misaligned BitBlt?



Repost:The original was 18 hrs back and still hasn't shown up on the forum
:-(
"PrvMisalignedForwardInnerBitBlt"
----------------------------------
Hi,
I'm trying to WinCopyRectangle() from my offscreen window (1 BPP) to the
display window (2 BPP). This works erratically on my Palm V (OS 3.1) device
(ie it sometimes works) and when it doesn't work, it just shows a blank
screen (probably meaning it could not copy the Rect).

When I run the same program on the emulator with a Palm V ROM, I get a
dialog box saying "...Program has just read directly from memory manager
data structures."

When I hit the debug button in this dialog, CWR6 shows the stack window with
the current location set to "PrvMisalignedForwardInnerBitBlt". The functions
higher up in the stack are ScrCopyRectangle() and WinCopyRectangle().

What could be the reason for this, and why does this still work
occasionally? Suggestions are greatly welcome :-)
-Prashant



--
For information on using the Palm Developer Forums, or to unsubscribe,
please
see http://www.palmos.com/dev/tech/support/forums/





--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to