Archive for August, 2008

My Call of Duty collection

Saturday, August 30th, 2008
cod collection

cod collection

Call of Duty 3 is missing because it was never released for PC platform.

OpenLaserFrag Laser tagging system

Thursday, August 21st, 2008

OpenLaserFrag is a open source project to create an laser tagging system. The project has died and has been restarted two weeks ago. There was an IRC chat about the restart and i joined it out of curiosity.
Even though i’ve said to myself that i will not participate in the project due to time constrictions i have joined the project.

You can find the website here: OpenLaserFrag.org.

A draft of the specifications of our first version can be found here: openlaserfrag-09-draft1

We will keep the first version as simple as possible. I’ve been working on the weapon module lately. The schematics are finished and now i’m working on the firmware.


Binary macro for C

Thursday, August 21st, 2008

Found a usefull macro to use binary numbers in C:

#define B8__(x) ((x & 0x0000000FLU) ?   1 : 0) \
              + ((x & 0x000000F0LU) ?   2 : 0) \
              + ((x & 0x00000F00LU) ?   4 : 0) \
              + ((x & 0x0000F000LU) ?   8 : 0) \
              + ((x & 0x000F0000LU) ?  16 : 0) \
              + ((x & 0x00F00000LU) ?  32 : 0) \
              + ((x & 0x0F000000LU) ?  64 : 0) \
              + ((x & 0xF0000000LU) ? 128 : 0)
 
#define B8(d) ((unsigned char) B8__(HEX__(d)))
 
// use it
B8(10101010)