Omnimaga

Calculator Community => TI Calculators => General Calculator Help => Topic started by: Raylin on June 29, 2010, 08:31:25 am

Title: Little endian in Axe?
Post by: Raylin on June 29, 2010, 08:31:25 am
When you are trying to display a sprite that is bigger than 8x8 and you are reading two bytes at a time, does that mean that the data needs to be reversed or something?
Title: Re: Little endian in Axe?
Post by: nemo on June 29, 2010, 10:46:58 am
what exactly are you trying to do? why are you reading two bytes at a time? i think it's generally done with 4 8x8 sprites conjoined to make 16x16 (or whatever size measure yours is). i'm not sure how you would draw a sprite by reading two bytes at a time. you would need to use modulus and division by a number (16?) to get each byte separated. i'm not completely sure though. i'll play around with this.
Title: Re: Little endian in Axe?
Post by: DJ Omnimaga on June 29, 2010, 11:28:15 am
(Btw sorry if this is off-topic, but Nemo, thank you a lot in your post for at least making it clear you are curious what he wants to do. In the past on other calc forums, especially MaxCoderz, when someone asked a question where he is doing something new or close, he often got told "Why do you want to do that?" as sole response, as if he was not allowed to do anything unconventional. Way to allow the community to innovate. At least you did not do that and I appreciate it and gave you +1 for this post. Other people elsewhere should follow example.)
Title: Re: Little endian in Axe?
Post by: Raylin on June 29, 2010, 03:29:53 pm
Basically, if you were to display a sprite on the screen...
Gah. I can't say it without repeating myself.
Quigibo?
Title: Re: Little endian in Axe?
Post by: Quigibo on June 29, 2010, 03:30:49 pm
Little endian is only for reading and writing 2 bytes at a time.  Almost every sprite drawing routine I've ever seen reads 1 byte at a time so you will never have this problem.  In the rare cases where a routine reads 2 bytes at a time like for instance drawing an aligned 16x16 sprite super quickly, sometimes the programmer will compensate the reversing effect for you.  If they don't they would surely mention that the bytes should be reversed.