Monday, March 14, 2011

AmBX + Windows 7 x64 SP1, endless crashing applications

Here we go again with these atrocious AmbX drivers.

I just installed SP1 and was greeted by a ton of 'XXXX has stopped working' popups after finishing the update and rebooting. These crashes are reminiscent of issues I had before with AmbX, since the way that it works is hooking itself into DirectX system calls. Some of the popups for apps that had failed (crashed) after SP1 were:
Service Pack Review (spreview.exe)
Nvidia Control Panel (nvcplui.exe)
Catalyst Control Panel (MOM.exe) (yes I have both kinds of cards)
Windows Media Something (wmpnscfg.exe)

After closing all those boxes, I tried to run windows update to see if it completed, that crashed..
Windows Update (wuapp.exe)
And Performance Monitor to take a look at the running apps, that crashed..
Performance Monitor (perfmon.exe)
Also RunDLL32.exe crashed.

Anyways, to confirm my suspicions, I taskkilled the amBX Event Manager.exe and amBXFxGen.exe and everything works fine again. None of those apps will run while the ambx FX gen directX hook is running, they will all crash.

I went to the ambx forums and found some people with the same issue now:

Here is an update:

This is a guess, but when Microsoft releases updates for certain components of Windows, the C:\Program Files\amBX\Gaming FXGen\x64\LoadLibInterceptor.dll (which is bootstrapped into each app on launch) corrupts the memory of the application inadvertently, causing it to crash. It expects certain structures in memory to exist, so it can hook itself in to non-ambx enabled apps, but if the system has been updated the memory locations change and the hook ends up making everything go tits up. It's a common issue when dealing with memory hooking, the hook is targeted for a single version of the target binary. (say dx9_something.dll) Any updates to that binary cause the hook to fail.

Friday, February 18, 2011

Pigeon's Electric Nest: Amblone RGB lighting system.

Pigeon's Electric Nest: Amblone RGB lighting system.: "This is my first official project. Its based on Bart van der Drift's project on I have modified his arduino code for it to fit..."

Wednesday, February 16, 2011

Silicon Republic: Arduino Based PC Ambient Lighting

Silicon Republic: Arduino Based PC Ambient Lighting: "I really like the concept of ambient lighting systems which synchronize with entertainment to create a great immersive experience. And since..."

Tuesday, November 30, 2010

AmbX, moving to open hardware and software..

Things are coming together now..
We have an opensource replacement for the now apparently-now-unsupported (as predicted) commercial ambilight hardware/software.

And a robust and open hardware platform, here's one example out of many.

Some of you who own Philips Ambilight systems like myself may have experienced 'led death' in the main washer.. this results in flashing/flickering, whole color going out, etc. My solution was to unplug all three defective LED arrays, they really aren't worth fixing. Then I insulated the pcb to prevent shorts, and it only serves as a controller for the side lights. The ambx system was an really an entry level product that may have been a bit before it's time. It suffered in sales due to lack of market, extremely poor quality components, overcomplicated PCB design, driver issues, unnecessary tacked on gimmicks (fans + rumble), lack of support, and lack of developer interest among other things.

But RGB lighting is now here to stay, that's for sure. Hopefully Philips will try again, or another manufacturer will set a higher standard. Until then, a handful of hardware hackers, students and coders will continue making their own systems and taking innovative lighting in a new direction.

See Also: (note, sign out of google to download design docs) and

Now [royboy] has done a full implementation with Wiring/Processing on an arduino platform.

Now I wish my DealExtreme order with the RGB strips would finally ship.. it's only been a month!

Edit II
Yet another (I'm not complaining, quite the opposite!):
Christian Pigeon's system, based on Amblone.

Friday, March 26, 2010

Timelapse Laptop Repair

Had coffee spilled on it, needed new power button because of wild resistance values causing the laptop to turn itself on. Made a little timelapse video out of it.

Time Lapse Laptop Repair from electrosthetics on Vimeo.

Friday, November 13, 2009

Arduino Universal Remote - Code Followup

Original Post
Here is the service, source code and installer included: download
Edit: This was updated 1/22/10, fixes: config file was not being read properly, added shortcuts to configuration folder and start/stop commands for service. Remember to read the readme and put your audio device guid's in the config if you want the audio output polling feature to work.

A windows power management event triggers a byte to be sent to the microcontroller, which then sends out an IR code. Optionally, the default sound device is polled via DirectX and any changes detected cause an IR code to be sent to change the input on the amp.

Here is the code for the microcontroller, it simply gets a byte from the serial port and decides what to do based on its value. It sends back a linefeed as an ack. The button is just a simple on/off, totally optional.

* electrosthetics IRremotePowerSave: power saving project - microcontroller side
* info :
* IRremote lib Copyright 2009 Ken Shirriff


IRsend irsend;
int on = 0;
int BUTTON_PIN = 12;
int STATUS_PIN = 13;
int inByte = 0;

void setup()

void loop() {
if (Serial.available() > 0) {

// get incoming byte:
inByte =;
switch (inByte) {
case 0x01:
irsend.sendNEC(0x817E817E, 32); // send on
on = true;
case 0x02:
irsend.sendNEC(0x817E01FE, 32); // send off
on = false;
case 0x10:
irsend.sendNEC(0xA15E1EE1, 32); // send MultiChan
case 0x11:
irsend.sendNEC(0xA15E7C83, 32); // send DVD
digitalWrite(STATUS_PIN, HIGH);
digitalWrite(STATUS_PIN, LOW);

} else {
if (digitalRead(BUTTON_PIN)) {
if (on) {
irsend.sendNEC(0x817E01FE, 32); // send off
on = false;
} else {
irsend.sendNEC(0x817E817E, 32); // send on
on = true;
digitalWrite(STATUS_PIN, HIGH);
digitalWrite(STATUS_PIN, LOW);

Friday, November 6, 2009

An Arduino universal remote and more

Edit: Code here

So I have a large 7.1 surround system hooked to my computer for games and watching movies (when the 720p projector is on). This is a large external receiver, a Yamaha RXV663. It uses enough current to keep it warm even if sound isn't coming out of it. Thing is, I have been putting my computer to sleep for a few years now, but I always forget to turn the receiver off. Being lazy/forgetful like that, I ordered an extra boarduino a while ago to solve the problem. Now I'm finally putting it to use.

I scavenged a couple parts.. the 3 pin IR receiver from an old Audigy LiveDrive (those 5 1/4 drive bay things with jacks and such.. never used the crappy remote anyways) and an old IR remote which I broke in half and soldered a header on to. The IR led's seem to draw a lot of current so I put a 1000uf cap on the power rails. (they are pulsed via switching transistor)

The real workhorse here is this guys IR library:

Arc Language Blog: An Arduino universal remote: record and playback IR signals

I only had to modify an include file to make the existing NEC remote routine interpret and send Yamaha codes. I'm not sure if I did it all right, but it wasn't really important to me as long as it could send the codes I needed.
I only had to modify these values:
// pulse parameters in usec
#define NEC_HDR_MARK 8900
#define NEC_HDR_SPACE 4600
#define NEC_BIT_MARK 600
#define NEC_ONE_SPACE 600
#define NEC_ZERO_SPACE 1700
#define NEC_RPT_SPACE 2250

and simply send the code like this:
irsend.sendNEC(0x817E01FE, 32); // send turn off
irsend.sendNEC(0x817E817E, 32); // send turn on

You can see that those codes match these from the LIRC site, minus whatever prefix 817E is (could be a part of the header?) Anyways, it works great.

Now I'm off to write the other part of it, a C# app that will detect a PowerModeChanged event (documented here) and send an OFF pulse when the machine is entering standby, ON when it is waking up. I want it to leave it alone when the computer is rebooting so it doesn't needlessly cycle the relays in the amp.. it will send some info over the arduino's serial port via USB. (I thought I could get away with using DTR or something, and no app on the computer but no dice. Alternatively I could use something like the power LED on the case to signal the arduino, but I didn't want to mess with small gauge wires sticking out and getting cut on things) So I'm pretty committed to an always running c# app that will keep the arduino informed of the computers status.

With this system I can also send the other codes that have been documented on the LIRC site too, an example usage:
When I watch movies with the projector, I switch the input on the amp to be a coaxial SPDIF input and set windows to use the digital out, so that I get unmolested bitaccurate audio from whatever I'm watching.
However when I'm playing a game, I need to use the analog 7.1 sound card outputs and the multichan input on the amp.

With this power management monitoring app, maybe it could get the current default audio device and switch the amp input based on that.. all automatic! Next it will be dispensing beer into my mouth while watching movies.

Kudos to Ken for his arduino IR library!

Code for this is in the followup post here. It works great!

I am going to buy one of those tiny miniusb arduino's for this, and put it in a little box with a jack for an IR blaster.

Here is a bad picture of the prototype