I've ported Squeak 2.3 to Amiga, more or less
bert at impara.de
Sun Jun 4 18:16:03 UTC 2006
Am 04.06.2006 um 19:36 schrieb tim Rowledge:
> On 4-Jun-06, at 8:53 AM, Tim Johnson wrote:
>> On May 30, 2006, at 5:02 AM, Bert Freudenberg wrote:
>>> Oh I guess every VM hacker has seen this :) You might just copy
>>> the bit depth conversion routines from another VM.
>> Yes. I am working on this. I think the main issue is Squeak's
>> PixMaps / BitMaps being little-endian, and the Amiga being big-
>> endian. I am looking at the UNIX-VM source for tips (I found a
>> function there for 8-bit depth to 8-bit depth blits). What's
>> strange is the Squeak 2.3 VM seems to not use ioHasDisplayDepth(),
>> so if I want to implement 16-bit/32-bit display depths on my Amiga
>> VM I might have to move up to 2.4+...
> Ah, Squeak bitmaps are BIG endian, not little. The first
> implementation was 68k mac based and the PPC. Us little endian guys
> (ARM, x86 etc) had all sorts of fun developing efficient Squeak
> 'Display' to actual glass transfer routines. You would most likely
> benefit most from looking at the Mac code for this stuff. You might
> need to convert the *pixel* format though since not every platform
> is RGB. RISC OS is little-endian BGR for example, some thing that
> took a lot of attention to resolve in the early days of Squeak.
Note, though, that the recent bitblt code can deal with both, little
*and* big endian RGB. While big endian is standard, little endian is
indicated by negative depth values. However, I guess a 2.3 image
might not have the in-image support for negative bit depths, yet, and
also, it might not call the hasDisplayDepth primitive. Implementing
bit shuffling for big endian still is the most compatible way.
- Bert -
More information about the Vm-dev