?

Log in

No account? Create an account
'Twas brillig, and the slithy toves did gyre and gimble in the wabe [entries|archive|friends|userinfo]
Thomas

[ website | Beware the Jabberwock... ]
[ deviantArt | the-boggyb ]
[ FanFiction | Torkell ]
[ Tumblr | torkellr ]

Links
[Random links| BBC news | Vulture Central | Slashdot | Dangerous Prototypes | LWN | Raspberry Pi]
[Fellow blogs| a Half Empty Glass | the Broken Cube | The Music Jungle | Please remove your feet | A letter from home]
[Other haunts| Un4seen Developments | Jazz 2 Online | EmuTalk.net | Feng's shui]

[Saturday 25th March 2006 at 2:40 am]
Thomas

boggyb
[Tags|]
[Feeling |tiredtired]

VB is not designed for bit mangling. It goes to great lengths to make such things hard to do (no unsigned variables larger than a byte, and no bit shifts).

That's not stopping me attempting to decompress S3TC with it, or convert between big and little endian, or generally do horrible bit manipulation. All hail user-defined types, and the mighty LSet operator!
Link | Previous Entry | Share | Next Entry[ 3 pennies | Penny for your thoughts? ]

Comments:
[User Picture]From: katayamma
Saturday 25th March 2006 at 2:58 am (UTC)
Learn assembly and then just create a fuction to do what you want. =^_^=

BTW: For a bit-shift, simply multiply/divide by 2. If you want to shift right and look for the roll off, then do a mod(var,2) and that'll return a 1/0.

That's old school basic, btw. VERY old school... Circa 1970s.
(Reply) (Thread)
[User Picture]From: pteppic
Saturday 25th March 2006 at 11:37 am (UTC)
Yes - WHY VB, for the love of God?
(Reply) (Thread)
[User Picture]From: boggyb
Saturday 25th March 2006 at 12:44 pm (UTC)
Because I started writing a file extractor thing in VB, and then decided to add on the texture viewing/decompression. Which mostly works, after the fixing of lots of stupid mistakes (e.g. actually remembering to scale r5 to r8, transposing red and blue, forgetting that Intels like to store their words backwards (which is all the more fun as Gamecubes store *their* words forwards, and I was correcting for that in places)).

I should probably rewrite it in something more sane, like Java or C. But it's now at the point where I'm being stubborn and I will *make* it work. Plus, it's a good learning experience.
(Reply) (Parent) (Thread)