Fwd: Re: Window code issue

Tim Rowledge rowledge at interval.com
Wed Dec 30 19:44:05 UTC 1998

On Tue 29 Dec, vuletich at ar.ibm.com wrote:

> Anyway, It would be a big improvement to get Squeak write directly to 2).
> In my particular implementation, besides needing Squeak to manage little
> endian display formats, it is necessary to receive an external pointer
> where the display buffer is allocated. (This is necessary to use hardware
> acceleration). This is probably incompatible with the way Squeak manages
> the memory for it's objects.
This is almost exactly the problem I had to solve on the Acorn. Look at the
instvar 'displayBits' in ObjectMemory and its uses - this is the basics of
how to have a Display Bitmap outside of normal  object space. Look also at
the implementation of ioShowDisplay for the Acorn, where there is a way to
do the setup. It sounds like you need much the same stuff.
> Regarding Tim Rowledge's work on little-endian BitBlt, I would only have
> DisplayScreen in little-endian mode. Reversing all the forms in the image
> seems to break the consistency across all platforms.
Only because nobody is willing to do a very small bit of work in th image
code to handle this. Having just the DisplayScreen in opposite-endian seems
to me to be a bit tricky. You need to detect the destination and use a
conversion loop when writing to the Dispaly, and you need to check the
source as well - since you might well be reading the Display. Of course, it
has to work when you are reading and writing the Display in one operation
as well.
> So we would need:
> 1) Little endian BitBlt, only when blitting to DisplayScreen
Simplest to have a fast pixel reversing loop that can be called in addition
to the 'normal' loop, othwise you have to duplicate the entire core loop
nad merg rule functions. Don't forget that you have to _pixel_ reverse, not
byte reverse. Call this in front of the main loop for source == Display and
after the main loop for target  == Display.
> 2) Have DisplayScreen memory outside the object memory
See above and Acorn source files.
> 3) A primitive to automatically select the blitting endianess (Similar to
> the way to handle the directory separator character)
Don't think so. Only matters to the VM. Keep it there.
> 4) Integrate all this stuff in the official Squeak release, to keep
> complete portability.
> 5) Convince Andreas that the Windows version would also benefit from this.
He wasn't convinced by two years of my arguments, so good luck :-)

Useful random insult:- Moves his lips to pretend he's reading.
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>

More information about the Squeak-dev mailing list