Porting to Intel III

The XCode debugger (and gdb) will confuse you with word & long values. For example, I have an IP address & port stored as the bytes 00 50 c0 a8 0 64 (that’s 192.168.0.100:80). Displaying memory in the debugger will show it as a8c05000 00006400 if you use the default word size of 4. Setting the word size to 1 will show the proper values.

Porting to Intel II

Never assume Macs are big-endian. I found code which uses #ifdef __MAC__ to decide whether byte order swapping is required – that’s just plain wrong.

Porting to Intel

An IP address is not a long int – it’s 4 bytes. Doing something like this is bad:

sprintf(buf,”%ld.%ld.%ld.%ld”, (ip>>24) & 255, (ip>>16) & 255, (ip>> 8 ) & 255, ip & 255);

Knoppix on Mac X86



Knoppix on Mac X86

Originally uploaded by mike3k.

As an experiment I tried to boot a Linux live CD on my Intel transition kit Mac. It works! I had to use the frame buffer mode to get X11 working & it won’t recognize the built-in Ethernet, but this isn’t the latest version of Knoppix.

Guess what just arrived



IMG_2467.JPG

Originally uploaded by mike3k.

I have more pictures here.

After trying my software on it, the first thing I did was boot a Knoppix live CD. It booted, but x11 wouldn’t work unless I used the framebuffer mode for laptops. It also didn’t recognize the built-in ethernet. I’m not using the latest version of Knoppix, however.

Comment spam

I’ve been seeing a lot more comment spam than usual the last few days. Somehow they manage to post it even when I require logging in to post comments. I just added yet another anti-spam plugin, so I’ll see how that works. I’ve also been blocking every IP address any spam comes from and adding more words to the blacklist, but that probably won’t help because all of the spams are unique. I’m really getting pretty disgusted here.