I downloaded the Mac OS X (PPC) screen saver from the Folding@home and installed it on my Intel MacBook... it didn't work and I had a hard time uninstalling it...
I will try the Intel SMP version for OS X later but I really wanted the screensaver...
Wednesday, 25 July 2007
Tuesday, 24 July 2007
Compiling C on Mac OS X
The preprocessor defines for the Apple Mac plaform can be found here: http://predef.sourceforge.net/preos.html#sec17
Use it like this:
#ifdef __APPLE__ & __MACH__
#define lseek64 lseek
#define open64 open
#endif
Use it like this:
#ifdef __APPLE__ & __MACH__
#define lseek64 lseek
#define open64 open
#endif
Monday, 23 July 2007
Accessing USB drive
I'm going to start some C coding that involves accessing raw USB HDDs.
I've connected a USB drive and fired up Terminal and issued the dd and od commands:
MacBook:~ Son_t$ dd if=/dev/disk1 bs=1 skip=0 count=1024 |od -t x4
0000000 00000000 00000000 00000000 00000000
*
0000660 00000000 00000000 00000000 000000af
0000700 000008a8 f8a00000 00000000 001000af
0000720 00000008 00000000 000008a8 f8b000af
0000740 000000a0 00000000 000008b0 f8b00000
0000760 00000000 00000000 00000000 000055aa
0001000 00000000 00000000 00000000 00000000
*
1024+0 records in
1024+0 records out
1024 bytes transferred in 0.010797 secs (94841 bytes/sec)
0002000
MacBook:~ Son_t$
So far so good! :)
I've connected a USB drive and fired up Terminal and issued the dd and od commands:
MacBook:~ Son_t$ dd if=/dev/disk1 bs=1 skip=0 count=1024 |od -t x4
0000000 00000000 00000000 00000000 00000000
*
0000660 00000000 00000000 00000000 000000af
0000700 000008a8 f8a00000 00000000 001000af
0000720 00000008 00000000 000008a8 f8b000af
0000740 000000a0 00000000 000008b0 f8b00000
0000760 00000000 00000000 00000000 000055aa
0001000 00000000 00000000 00000000 00000000
*
1024+0 records in
1024+0 records out
1024 bytes transferred in 0.010797 secs (94841 bytes/sec)
0002000
MacBook:~ Son_t$
So far so good! :)
Monday, 2 July 2007
Zterm & serial terminal
I downloaded and installed ZTerm - a free-ish serial terminal program to use with my Prolific USB-to-serial cable. ZTerm can be downloaded here and Prolific USB-to-serial cable drivers can be downloaded here.
I also found this document on using the Mac's own Terminal application to connect to a serial device whiich works quite well. My device (once above drivers installed) turns up as '/dev/tty.usbserial'. I connect using:
screen /dev/tty.usbserial 9600
I work with Sun Microsystems servers and #. breaks to the ALOM, except I have a UK MacBook which has the £ above the 3 but am alt-3 gives me what I want!
I also found this document on using the Mac's own Terminal application to connect to a serial device whiich works quite well. My device (once above drivers installed) turns up as '/dev/tty.usbserial'. I connect using:
screen /dev/tty.usbserial 9600
I work with Sun Microsystems servers and #. breaks to the ALOM, except I have a UK MacBook which has the £ above the 3 but am alt-3 gives me what I want!
Subscribe to:
Posts (Atom)