Motion Detection May 30, 2006
Posted by a1291762 in : programs , 3commentsI found a cool app called MacSaber. The only problem is that the code it uses to read the motion data is wrong. It’s a closed source app too so I can’t fix it. Oh well, at least it’s a cool demo.
But it got me thinking. There are some SMS-aware apps that don’t support my MacBook Pro and that sucks. Again, these are closed source apps so they’re not likely to be updated any time soon.
I looked around and found Motion. It’s a BSD-licensed app that reads the SMS data. The original version only supports the Powerbook that first shipped with an SMS. I found a couple of forks that (between them) had support for all the various models. I unified these forks into a library that I’ve called UniMotion.
While it’s not there yet, the aim of UniMotiion is to be the primary API that people use to get SMS data. Being LGPL, it lets commercial apps use the code but requires them to dynamically link so that I can upgrade the library later (eg. to support new hardware). I also plan on having the library handle the different ranges and offsets that the different machines have. I’m actually thinking that some machines will be different so a calibration app will let people get everything right for them.
Isaac starts eating again May 25, 2006
Posted by a1291762 in : Uncategorized , add a commentSince having gastro, Isaac hasn’t been eating more than 100ml of formula each feed. This was starting to worry us so Bree took him to the doctor. He started on “anti-refulx” (ie. thickened) formula yesterday and he loves it. He ate 200ml at every feed yesterday and this morning he took 250ml. He’s been more settled between feeds too.
While at the doctor’s, Bree enquired about that new rotor (aka. super-gastro) vaccine. It turns out that while there was a blurb on TV, the vaccine isn’t actually going to arrive in the country for a few months. The doctor hadn’t even been told about it by the immunisation board so we knew as much as he did about it. As soon as it comes in we’ll get it for both Isaac and Emily (yes, it can be used on a child over 2).
SMC Update May 18, 2006
Posted by a1291762 in : Uncategorized , add a commentWhat is an SMC? I don’t know!
The update seems to make the machine more aggressively respond to high temperatures. Using CoreDuoTemp, I am observing the use of lower frequencies to help drop the temperature. The fans also seem to run a bit more, which helps to exhaust heat. However, this only really helps the machine when it’s hot, not idle. The idle temp isn’t any lower than it was before but when I stressed the machine (by building a cross compiler) it didn’t get above 75 degrees and the fans didn’t make nearly as much noise as they used to when I stressed the machine.
On the subject of fan noise, holy crap those things are loud when the go at full tilt. The update makes them run for a few seconds which is how I know. Clearly my machine isn’t hot enough to require that during normal (and even heavy) use. It is kind of comforting to know that the system isn’t working anywhere near it’s maximum though because it means unusual thermal events shouldn’t cause a problem.
Between this update and the thermal grease mod I should end up with a cool machine. Here’s hoping…
Tempted by a MacBook May 17, 2006
Posted by a1291762 in : Uncategorized , add a commentDamn. Less than 3 months old and my machine is effectively obsolete :(
To my eye, there are only 2 things different about the MacBooks. The screen is smaller and the video card is crap. The smaller screen is something I would have been fine with had I not had a chance to use a 15" one. The video card would have meant DOOM3 wouldn’t work but I survived without games for ages already so it’s not a big deal.
Oh yeah, and the MacBook costs a heap less than the MacBook Pro.
I’m not about to downgrade to a MacBook now but if I hadn’t purchased Eve, I think I would have settled for the MacBook. I guess it’s a good thing Apple released the Pro models first :)
Eve doesn't have a dodgy CPU May 16, 2006
Posted by a1291762 in : Uncategorized , add a commentWhile looking at the whine issue, I stumbled across some guy (cryptonome?) in a forum who claimed that Mac OS X wasn’t taking full advantage of the Core Duo, specifically SpeedStep. He was trying to write a kernel module to do better management with an eye on avoiding the whine (by not letting the CPU get to the state at which the whine happens). Here is where the project ended up. I was a bit concerned about the whole “you might have a broken CPU” thing there so I ran the kernel module. It seems that I don’t have a broken CPU (whew). I also found out that the Core Duo clocks down to 1.5Ghz while “idle”. I only tested this while running on battery and “Normal” power savings. I might play around with the energy prefs some more to see if they affect the CPU’s throttling. My CPU temp seemed to go from 60 (idle) to 73 (loaded). I only tried synthetic load which only heats up the CPU (the fans didn’t even come on). Real load will also tax the chipset while games hit the GPU too. I’m not sure if the other chips getting hot will change my CPU temp. Ideally they shouldn’t.
However, it seems that most MacBook Pros have too much thermal grease on the CPU/GPU/chipset making the machine hotter (but keeping the fans off, since it can’t sense the heat). I’ve heard nothing but success by people who have applied their own thermal grease so I’ll probably try this in a few weeks once I’ve got all the required tools, arctic silver and a long afternoon with no disruptions (some guy described it as “easy” but it took him 3 hours). I don’t have any problems using Eve in my lap but that only works if I leave most of the base exposed to air (ie. legs apart). If I get the same kind of temperature range other people are getting that’ll be a 12 degree drop.
I have to wonder if heat is the reason that the GPU is underclocked. Ironically, I seem to remember reading someone saying that their machine ran cooler while their GPU was properly clocked, probably because the heat sensor was actually registering the heat, turning the fan on and taking the heat away. I imagine it’s relatively safe to properly clock the GPU after applying thermal grease properly.
I can’t go above 640×480 in DOOM3 or I get massive lag every time something jumps at me. I wonder if a properly clocked GPU would handle 800×600. After I’ve done the thermal grease mod, I’ll give it a go (though I might have finished the game by then).
If case you’re wondering, I’m totally anal about framerate. Anything less than “smooth” is just not unacceptable to me. I’d rather turn off graphics features than suffer low framerates. This means I get a lower quality experience for the 90% of the game that could handle higher res/features but that’s a price I’m willing to pay. I used to play Quake 3 with the crappy lighting simply because it made the game snappy on the machine I was using. The first time I played DOOM3 it was with low quality and all the features turned off. Even then, it still suffered lag. At least this time I get to see everything. I’ve never had a games rig so high-res gaming isn’t something I’m used to anyway.
Emily Blows Chunks (and other weekend illnesses) May 14, 2006
Posted by a1291762 in : Uncategorized , add a commentEmily picked up a gastro bug from kindy again. It hit Friday night (around 2am). Emily threw up twice. We had been out at a Thai place for my dad’s birthday so the puke contained all sorts of strange things. She managed to kill 2 sets of sheets (for some reason, we have 4), her underlay and both blankets. We ended up using a towel as an underlay and a king size beach towel as a blanket. She also ended up with an old tracksuit that’s a size too small. Needless to say we’re going to get some more spares. We also found out that washing machines aren’t good at removing chunks.
Saturday was fine for Emily because we limited her diet. I think she basically had toast and water all day. However, when Bree suggested that Emily could have a juice for dinner and I gave it to her, neither of us thought that it might be a bad idea. That is until Emily puked again, this time getting the sheets, underlay, blanket and pillow all in one go. She even managed to get the mattress a bit since there was so much fluids.
Today has again been good but again, Emily has been on toast and water. She had a little bit of my noodles at dinner time but it was around an hour before her bed time so I’m hoping any stomach upsets will show up before she’s in bed. That, and I’m hoping she’s almost better. I’m taking the day off work tomorrow to look after her and it would be nice if I could go to work on Tuesday but if she’s not well enough her grandma (Oma) can’t look after her.
I have had a strange virus that is going around. It makes you really tired and (at least for me and my brother) kills your muscles. I woke up on Friday morning and I couldn’t move my neck without causing pain. The muscles on my neck, shoulders and back were all stiff too. I had to take the day off work. I got a massage which gave me movement straight away. The pain eased a bit and faded over the weekend to almost nothing now. It’s still there (especially when I turn my head) but it’s bearable.
Isaac has been a bit strange. He had his 6 month shots on Thursday so that could be part of the cause, as could the runny nose. The doctor (his regular one) said not to worry about the reflux but to take the constipation seriously. Apparently when you start solids, your intestinal tract has to get used to processing them. If you are constipated lots, it can screw up your intestinal tract for life! We’ll have Isaac on medication until he’s regular for a week and then on a reduced dose for a further 6 weeks.
On a related note, it seems that Isaac is almost the same weight that Emily was at 6 months. Of course, this puts him behind her because the average weight for a boy is higher than for a girl but it certainly helps ease the constant worrying we have about his weight. It’s strange that he’s managed to put on so much weight even though he doesn’t eat anywhere near what Emily did. I’m sure the solids are helping because he really seems to be filling out lately.
Update 14 May 2006
Emily puked again tonight. Worse, Isaac did too. Bree heard a strange noise and went to investigate, only to find Isaac choking on his own vomit. Bree couldn’t take Monday off work but she’ll be taking the rest of the week off now. I only hope Emily gets better quickly because one sick kid isn’t too bad but two is just painful.
Hacking my Bank May 10, 2006
Posted by a1291762 in : heritage, programs , 1 comment so farSome time ago, Virgin Money put a crappy on-screen keyboard on their login page. The idea is that you have to click with the mouse and you can’t type with the keyboard. There’s some obfuscation done to try and ensure that malware can’t sniff your password. It’s very user-hostile but I don’t use their online banking much though so it wasn’t a big deal.
However, I recently opened a Heritage account (to escape newly-introduced fees at my old bank). They not only have a keyboard on their login page, it moves! Their solution is extremely user-hostile and downright annoying for me since I’ll be using it frequently. I know enough about this sort of thing to know that they’re just using JS to obfuscate the password. I think it’s time to do something about it.
My first attempt can be found here (Note: It won’t work from there, see below).
This simple hack took me about 30 minutes, mostly because I had no idea what I was using and I had to google extensively for hints about what JS functions to use and how they worked.
There’s a downside though. The AJAX request means that it is not possible to run this from a web server. It works in Safari if I open it as a local page (ie. file:///) though. The problem is the cross-domain scripting security feature. The whole point of this feature is to prevent people from doing exactly what I want to do, dynamically modify someone else’s page. I think that’s a bogus argument because you can use a server side scripting language to do that now. The URL bar will always let you know where you are so there’s no surprises (unless you’re an idiot). Basically, it looks like you can’t use JS to fetch a file from a domain other than the one you’ve loaded. This includes things like finding out the HTML in an IFRAME or FRAMESET. There are various hacks for getting around this but none that work when you don’t control the “other” machine. A simple workaround would be to use PHP instead of AJAX to request the obfuscation tokens. My webhost doesn’t support PHP (it’s a free ISP-supplied account) so I won’t be able to put a working solution based on PHP online (then again, the current solution doesn’t work online either). The machines I use frequently run a web server with PHP support so it’s something I’ll probably do anyway because Safari doesn’t let you click a link to file:/// from a http:// page :(
Update 23 May 2006
Here’s the PHP version. It won’t directly work either because my web host doesn’t support PHP. However, you can copy it somewhere that does support PHP and it’ll work.
Update 2 July 2007
As a result on an interesting phone call the links have been removed.
Relay for Life May 7, 2006
Posted by a1291762 in : Uncategorized , 1 comment so farLast night I did my first relay for life. My family has been doing it for 5 years now but I’ve always been interstate or unavoidably occupied. There was around 30 family members in the team and we had a shift chart to avoid everyone walking all night. Bree and I took the kids and did a lap or two at the start of the walk. We hung around for a while to cheer people on. Emily had an absolute blast running around. she must have covered 3 laps worth of distance going between the family tent and the river (where most of the people and tents were).
I took the kids to my dad’s house (it’s closer than our house) and put them to bed while Bree walked with a school friend. My shift was 4:30am to 5:30am. I hung around for breakfast at 6 before going to my dad’s house and giving the kids breakfast.
Unfortunately, Isaac has been feeling really bad. He’s got himself constipated and even woke up in the middle of the night in pain. We’ve had him on some stuff to help. It’s starting to work. He did a 4cm log this morning (no wonder he was uncomfortable!) but he’s not clear yet. When we took him to the doctor yesterday morning, he suggested banana or apple puree and variety in general. So far we’ve only been giving him rice cereal because he’s not yet six months old.
Eve does Windows May 7, 2006
Posted by a1291762 in : Uncategorized , add a commentIt was a hassle but I finally got Windows running on Eve. I found out that even though Apple tells you otherwise, you can install and run Windows XP SP1 just fine but there are some instabilities (eg. hang on shutdown) and SP2 won’t install (says not enough space, even if there is). I’m guessing it’s something to do with hardware support that’s in SP2 (eg. It could be the Core Duo causing the problems).
There’s instructions around for creating a slipstreamed install CD but it failed to mention 2 things I needed to know:
- You can’t perform a slipstream on an earlier version of Windows.
- You can’t simply run mkisofs to create a Windows CD.
I have an old PC that has Windows 98 on it (to play even older games, Gabriel Knight: Sins of the Father is a Windows 3.1 app) so I couldn’t do the slipstreaming at home (no, I didn’t feel like installing Windows XP on an old machine just to slipstream a CD to run on my MacBook Pro). Luckily I have a PC running Windows XP at work that I could prepare the slipstream on. This leads to the next problem. I don’t have a CD burner on my machine at work so I used mkisofs on my Mac. It took a few coasters (lucky I used a CD-RW) before I found a site mentioning that you need about a hundred switches to actually make a CD like PC burners create.
I also found out that using the 128M of unallocated space between the Mac and Windows partitions isn’t a good idea. I think it’s because using Windows to do partitioning gets the GPT and MBR partition tables out of sync.
I’m using Input Remapper to get most of the keyboard shortcuts back (eg. brightness, volume, forward delete, right click).
I downloaded a no-CD crack for DOOM 3 so that I can play the game without having to transport a bloody CD around with me (like my recent trip to the Gold Coast). I’m sure software piracy hurts publishers but when the publishers take it upon themselves to hurt their customers, that’s just unacceptable. It’s the one thing I’ve been “missing out” on by staying out of PC gaming :(
Make rEFIt and safe sleep play well together May 3, 2006
Posted by a1291762 in : programs , add a commentI like the idea of having a boot manager, hence rEFIt. I also like safe sleep (can you even turn it off?). There’s just one problem: they don’t play well together.
The basic problem is that when you turn the machine on and a safe-sleep state is present, you MUST load it. To do do anything else could invalidate the safe-sleep state. rEFIt cannot currently detect this state so I needed a workaround.
It just so happens that I have a startup item that forces the boot device. It does this so that Mac OS X updates can’t do stupid things like disabling rEFIt. I grabbed a program called SleepWatcher, installed it and got it to set the boot device at sleep and wake time. I then had to disable the braindead running of sleep and wake scripts when the SleepWatcher startup item was started and stopped. I have no idea what the guy who wrote that was thinking but system startup/shutdown time is NOT a suitable time to run scripts setup for sleep/wakeup time!
Anyway, the upshot of all this is that I now have rEFIt except when my machine goes to sleep but doesn’t wake up before the next boot (ie. safe sleep is triggered). If there’s interest, I can add details as to what gets run when or even create a package with all the required files.
Update 5 May 2006
Someone asked so here’s the details…
First of all, Install rEFIt on the EFI partition as described in this post. If you don’t do this, my instructions won’t work without modification.
Get SleepWatcher. Install both SleepWatcher and the StartupItem. SleepWatcher 2.0.3 had a bug in the StartupItem where it would run the wake scripts at startup time and the sleep scripts and shutdown time. This undermines the whole point of sleep/wake scripts though so you’ll have to fix it. Edit /Library/StartupItems/SleepWatcher/SleepWatcher and remove all calls to /etc/rc.sleep and /etc/rc.wake. You still want the sleepwatcher calls to use these files, you just don’t want to run them at startup/shutdown time.
Unless you’re interested in using SleepWatcher for other things, I’d recommend commenting out all the contents of /etc/rc.sleep and /etc/rc.wakeup. You should then add this to /etc/rc.sleep:
# Boot Mac OS X on the next boot (in case safe slep is used)
bless –mount / –setBoot
Add this to /etc/rc.wakeup:
# restore the boot setting
bless –mount /efi –setBoot –file /efi/efi/refit/refit.efi
Originally I tried paying with the –nextboot option but I couldn’t find a way to unset it. This means that the value in /etc/rc.wakeup must select rEFIt. If you haven’t installed rEFIt on the EFI partition, you’ll have to use a different value here.