[Vm-dev] Probably pointless endianness question re: Float changes circa 4.6

tim Rowledge tim at rowledge.org
Mon Jul 6 17:22:15 UTC 2020


Looks like you've got past the question, but I was going to point out that 

a) I don't recall any of the various conversion at load things we've ever done taking a noticeable time; and remember I usually have the slowest machines

b) endianness of bitmaps may become an issue (again) if we try some of the possible graphics improvement ideas. For my original RISC OS port I actually did convert all bitmaps to little endian and the BitBlt and all the Form related code.

> On 2020-07-05, at 10:54 PM, Tim Johnson <digit at sonic.net> wrote:
> 
> Hi Dave,
> 
> On Jul 5, 2020, at 5:48 PM, David T. Lewis wrote:
> 
>> To add some detail:
>> 
>> - In a 6504 image, Floats are stored in big-endian format (as Eliot explains above) regardless of
>> the endianness of the current platform
>> 
>> - In a 6505 image, Floats are stored in the native platform word ordering for the current platform
>> 
>> - When a 6505 image is loaded into a classic interpreter VM the floats are converted big-endian
>> format in ContextInterpreter>>normalizeFloatOrderingInImage which effectively turns it back
>> into a 6504 image
> 
> Thank you.  This helps me know where to possibly dig into the conversion process.
> 
> Also, I wanted to try this.  So I just did:
> 
> 1) I loaded Squeak4.6-13700 (one of the alpha releases) into the 4.10.2-2614 VM on my Raspberry Pi, and then saved it out.
> 
> 2) `ckformat` verifies that the original image was is a 6505 format, and the image I saved out is a 6504 format.
> 
> 3) Transferred it over to my G4, and it very much runs!  This particular VM was built with VMMaker 4.4.12.
> 
> Amazing!  What an effective solution :)   Stepping stone-by-stone into the future...
> 
> 
>> - When as 6505 image that was saved from a little-endian machine is loaded into an oscog (Cog/Spur)
>> VM running on a big-endian platform, it is loaded in the saved format (presumeably little endian)
>> 
>> So ... I am only guessing, but AFAIK we have never tried loading a 6505 image that was saved
>> on a little-endian machine into a Cog/Spur VM running on a big-endian platform. Quite possibly
>> in needs a word-reversal operation in that case.
> 
> Very interesting.
> 
> Are there any Cog/Spur VMs for big-endian platforms?
> 
> Thanks a lot,
> Tim
> 
> 


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: SSAN: Stop, and See if Anyone Notices




More information about the Vm-dev mailing list