forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What the funk!? PSP 16 bit storage method - please help!!!!!

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jubber



Joined: 19 Jan 2006
Posts: 6

PostPosted: Sun Jan 22, 2006 5:08 am    Post subject: What the funk!? PSP 16 bit storage method - please help!!!!! Reply with quote

After a lot of swearing and cursing I've noticed that 16bit pixels are stored on the psp in lo-byte hi-byte order - this is for real? Really annoyed the skd blit sample does not mention this. Have I made a mistake somewhere or does the following genuinely happen? - Write
0xFACE to a short in memory and it will store it as 0xCEFA?

Some help - any help - with the 16 bit format on the psp would really be appeciated. Tried asking this question on a number of threads, but apparently nobody around to respond.
Back to top
View user's profile Send private message Send e-mail
bulb



Joined: 19 Jan 2006
Posts: 50

PostPosted: Sun Jan 22, 2006 5:26 am    Post subject: Reply with quote

jubber,

PSP is little-endian system, the same as Intel systems. This is opposite to the network or Unix big-endian system.

Look at Wiki or Webopedia for more info about endianess.

Best regards,
Bulb
Back to top
View user's profile Send private message
jubber



Joined: 19 Jan 2006
Posts: 6

PostPosted: Sun Jan 22, 2006 5:56 am    Post subject: Thanks Reply with quote

Oh monkey pants - so it stores bytes big endian (msb is on the left) but bytes within shorts or ints little-endian. Thanks for the tip - I suppose one plus side is targas are already in the right format for memory.

Cheers,

jubber

God I hate little endians. With their tomahawks and their facepaint. Little bastards.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group