Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: ZippyDee on March 28, 2011, 08:16:02 pm
-
Hi, I'm trying to use the nib{} command in a sprite display routine, and I'm getting some funky looking graphics out of it...but not the ones I want.
Basically, Pic0V and Pic0S each point to a bunch of 4x4 sprites. Naturally, each sprite is 2 bytes, so to use the Pt-on() (etc...) commands I have to convert it to 8x8. Well, for this program I'll always be displaying one sprite from Pic0V and one from Pic0S side by side, so I thought "why not just make a routine to generate an 8x8 sprite that has both 4x4's next to each other (with the rest filled by 0's of course).
So I tried to write that routine, but it's not working...and I realized that I may be using the nib{} command wrong. So I guess my real question is this:
if {L1} = $8F, would nib{L1*2} = 8 or 15? Basically, which half of the byte is read first? The lower half or the upper half?
-
It appears to be 15.
-
If you downgrade to axe .4.8 or lower, it will read the opposite way. Unfortunately, the nibble writing commands will be flipped. This is something I like to continuously complain about as it prevents me from upgrading from .4.8
-
Wait...reading is little-endian but writing is big-endian?
-
For big-endian nibble reading:
Lbl NIB
Return nib{xor 1}
-
Wow...Damn.......So...Simple...
Thank you. You're a genius...
-
Thank you, I was asking the same question. :D
The solution is so simple.