View Single Post
Old 16 May 2022, 12:54   #398
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by bloodline View Post
No, if you access a Long variable as a Word then you will get the wrong bytes if you are expecting a big endian byte ordering.

This is a problem when accessing the Chipset registers, where programmers were encouraged to write to two 16bit registers with a single 32bit Long write etc, this is why all memory access in the lower 24bit space is byte swapped. The bitplanes are also all big endian so that ordering must be respected.

But my experiment, is to have the 32bit space as little Endian, i.e. no byte swapping for maximum speed… My gamble is that most applications which use the larger amount of fastram would be written in a high level language like C, where accessing parts of variables isn’t generally done using “hacks”…

I’m pretty sure I’m going to have some file related issues with this, but until I actually implement it we don’t really know what the problem are!
I don’t think high level languages will save you here. Unions are not that uncommon in C and allow you to access a variable as two 16 bit values or a single 32 bit value.
alpine9000 is offline  
 
Page generated in 0.04393 seconds with 11 queries