Thursday, December 11, 2008

Archos V2 Jukebox Recorder input current measurement

I was just investigating the "external voltage" measurement on my Archos V2 Jukebox Recorder. I already knew it was actually current, and I was wondering if it is could be displayed at the charging screen. When charging via the charger input, it is an accurate measure of input current; just divide by 10 and you have the current in amps. When charging via USB, it still measures current, but the scale factor is different, with 7 V equalling 0.5 A.

Wednesday, December 10, 2008

Weird backlight control on the Archos V2/FM Jukebox Recorder

When turning off, the backlight on my Archos V2 Jukebox recorder sometimes turns off and sometimes brightens and then fades out. I investigated this a bit today. The backlight is controlled by the square wave output of the STMicroelectronics M41ST84W real time clock. Rockbox configures it for 32kHz and then enables and disables it as needed. Apparently disabling it means high impedance mode (high-z/3-state) instead of off. What happens to the backlight depends on the last state of the square wave output. If it was off, it stays off. If it was on, it stays on and slowly fades as the charge leaks away. This is brighter at first because it is steady on, not flashing at 32kHz as usual.

Setting the frequency bits to 0000 does the same thing, and changing them doesn't reset the counter. The only software workaround would be to shut off the backlight at the right moment, and it may be possible to wait for the right moment based on the 10ths of a second value, then decrease the frequency and shut off the square wave. If the place from which the charge slowly leaks away is accessible outside the chip (eg. if the output drives a external MOSFET), it would be possible to add a resistor. However, I'm not sure this is worth doing.

Edited on December 13th:
I found a simple workaround and submitted a patch. Apparently, the square wave output is controlled by its own counter which is independent of the clock, and the counter is reset when the output is disabled. So, the solution is to disable the square wave to reset the counter, re-enable it so the backlight is off, and then finally disable it so the backlight stays off. Setting the frequency to 1Hz before the re-enabling ensures the backlight won't turn on before the final disabling.

Sunday, December 07, 2008

Video iPod won't charge via USB, won't turn off from Rockbox

I've decided to document this problem because I've seen it several times on the Rockbox Forums.

This applies to Video iPods (5th or 5.5 generation). The symptoms are constant detection of USB power, inability to charge via USB, and inability to turn off from Rockbox.

USB power management and battery charging is done via an LTC4066 IC. The USB power part of the IC may fail so that USB power cannot be used and power is output via the IN pin (#9, 3rd from the left on the bottom). This causes the USB power input to stay at a few volts when nothing is connected, which makes other circuitry detect that USB power is present. This voltage can even be measured from the end of a USB iPod cable. This is an easy and non-invasive check which could be done first.

The iPod cannot stay off because false detection of USB power turns it on. The original firmware's "off" is actually sleep, so that still works. When Rockbox tries to turn off the iPod, it restarts.

There are several things which can be done about this:
  • Use the original firmware. Its off is sleep, and sleep is still possible.
  • Cut the trace leading to the IN pin of the LTC4066. This is what I did. The power output from the IN pin doesn't get to the USB power detection circuitry, so it's possible to turn off from Rockbox.
  • For power while connected via USB, use a USB+FireWire cable and a FireWire charger on the FireWire end. (For example, here are some cables at Amazon.)
Other possible solutions I've thought of are:
  • Replace the LTC4066. I thought this was too hard because there is a large solder tab under the chip for heat sinking and there are very tiny parts very close to the chip.
  • Cut the trace and connect a diode from the USB +5V input to OUT of the LTC4066 to restore USB charging ability. I wanted to do this but there wasn't enough space for the diode. I also had some concerns about voltage drop and the diode's heat dissipation.
  • Short the USB +5V input to ground when not using USB, eg. via a modified dock connector. It should be easy, but would waste power. I didn't try this.
  • Replace the motherboard.
  • A purely software workaround which allows Rockbox to shut down the iPod. In firmware/drivers/pcf50605.c, pcf50605_standby_mode() sets conditions which turn on the iPod. Removing the condition relating to USB charging, probably CHGWAK, would allow the iPod to stay off, though FireWire charging might not turn it on either. But be careful, because according to the comment, it is possible to turn off the iPod in a way that requires disconnecting the battery or waiting for it to discharge (a month or more I guess).
Here is a photo of the front an iPod motherboard with a blue circle around the LTC4066 and a red line showing which trace needs to be cut and suggesting a location for the cut. (Click on it to see the full-resolution version.) Note that the wheel has been swung away and that the wheel's ribbon cable passes right below the LTC4066.

Here is a closeup of the LTC4066 area. Remember that this is a small part of the iPod, and what you see here is actually very tiny.
(Both images are from another iPod which doesn't have this problem, which is okay because the LTC4066 doesn't have to look any different when it fails.)

What is this 6502-based device?

While I was a student at the University of Waterloo I used to go to the surplus sales. This is one of the more unusual things I picked up. It used to belong to the psychology department, and it still has stickers from psychology experiments. I suppose it was used to collect data in experiments.

It is from Observational Systems Inc. in Seattle, WA. Inside are several circuit boards. Here is the main board, with the 6502 processor, EPROM, RAM and I/O.

Here is the board with the keypad and LCD. Along the top are a lot of LCD driver ICs.

Finally, here is the rest of the device, with the backplane and a small daughterboard for the CPU board which contains some analog electronics.

The device seems to require 5V power. It does turn on, but it doesn't seem to function consistently so I think it is probably broken. Occasionally I'm tempted to take it apart and build a new 6502 based system from it. The CPU was used in many 8-bit home computers, including the Apple I, Apple II, Commodore PET and more, so there is plenty of information available on it.

Friday, December 05, 2008

Stripped down RomBox build of Rockbox for the Archos V2 Jukebox Recorder

Earlier I posted about how Rockbox increased in size and greatly reduced available buffer space on targets with 2 megs of memory. Well, here's my solution for the V2 Recorder. It's an older version, from November 2007, because that gives me more buffer space. To get more buffer space I've also removed language and codepage changing, the voice interface and radio support. The database has been removed to allow for RomBox. The build also has a fix for charging screen related bugs. I get 1.750 MB of buffer.

Once in a while, I make attempts to strip out more, with the eventual goal of having RomBox and the database. I'm not very devoted to this pursuit however, because I don't really need the database.

As for that older post, I sometimes think I should delete it. I really like Rockbox and I also don't want to upset others who like it, but I also don't feel like censoring myself.

WARNING: This build disables low battery shutdown. If the device is left on but not playing, it may be possible to overdischarge the battery. According to various sources, overdischarge damages lithium-ion batteries. Also, recovery from that state may require charging the battery externally or jump-starting the device. Under normal use, the device will shut down when the hard drive is used before the battery is overdischarged, and if not playing, idle shutoff will shut it down.

SDL AcidWarp for Windows and SDL full screen mode issues

AcidWarp is an eye-candy program by Noah Spurrier. It draws patterns based on mathematical functions and then animates them via colour cycling. It originally ran in MS-DOS, and used the VGA 320x200 256 colour mode. In 2000 I was developing a library to emulate palletized 256 colour mode in the X Window System, and I modified the Linux SVGALib port of AcidWarp to use that library. Now I just had to modify it again to use SDL instead.

I was partly right about it being trivial. Using SDL for display was trivial. Adding keyboard input was very easy. However, full screen mode was a problem. Much to my surprise, SDL defaults to the windib driver, not directx (windx5). This means it uses the obsolete WinG interface to draw images instead of (the DirectDraw component of an older version of) DirectX. Windows doesn't normally allow programs to alter the whole palette, and SDL uses SetSystemPaletteUse to try to get access to the whole palette. Windows 2000 and XP can allow access to the whole palette (if the uUsage parameter is set to SYSPAL_NOSTATIC256) but other versions of Windows at least retain two entries for black and white (if uUsage is set to SYSPAL_NOSTATIC, which I think is an inappropriate name). This leads to some colours being remapped at the upper end of the palette, with multiple colours mapping to single colours. When this happens, part of the AcidWarp display is degraded, and with some patterns it's very obvious. It's easy to get around this by setting SDL_VIDEODRIVER to directx, but then Windows Vista turns off Aero when the program goes fullscreen, and Aero stays off until the program exits. The way around this problem is to totally shut down SDL with SDL_Quit and reinitialize it when switching from full screen to windowed mode. Aero is still shut down when in full screen mode, but that is not a problem. Initially I used the windib driver for full screen mode and directx for windowed mode. Soon I realized I probably only had to do the shutdown when leaving windowed mode and I could always use the directx driver, but when I made these changes I found that full screen mode sometimes becomes extremely slow (about 1 FPS animation) with high CPU usage. It seems like the version which switched between windib and directx didn't have this problem, but I'm not certain.

If you're not using Windows, you can ignore all that and try to compile the code for your operating system. The Makefile may need tweaking, but the code should be portable. All of the Windows-specific hack described above is conditional on WIN32 being defined.

Finally, here's a link to a zip file with the source and binaries. Take note of this notice which appears on Noah's page on AcidWarp: I do not accept responsibility for damage to persons or property that comes from the use or installation of this software. Use this software at your own risk. This software is free. Also, note that what I'm offering here is a new port which hasn't been tested extensively. I also think that the colour cycling patterns displayed by AcidWarp may cause seizures in individuals who are vulnerable to that sort of thing, especially if the animation is sped up, so please be careful.

[ Edit: Updated to latest version with some fixes in the Vista full screen workaround and a .reg file which should finally allow 256 colour full screen mode in Windows 7. ]

Wednesday, December 03, 2008

Bolt, RealD and circular polarization

Yesterday I watched Bolt in RealD 3D. I wasn't really expecting much from Bolt and I mainly went because I wanted to try out 3D. Many years ago I watched IMAX 3D at the Pacific Science Center in Seattle and I was quite impressed. It was exciting to see 3D technology available in ordinary cinemas. Bolt exceeded my expectations, and 3D failed to live up to them, but neither were a disappointment.

The trailers for Bolt made me imagine a movie that's amusing but shallow. I expected a storyline without much detail, and stereotypically cartoonish fun. I found a storyline with enough depth and detail so that it didn't seem at all hollow. There was certainly some stereotypically cartoonish fun, but there was far more to the movie, and it certainly seemed unique and creative.

The 3D effect was subtle but definite. With IMAX 3D, I remember things seeming to pop out far in front of the screen. With Bolt, I mostly just felt some subtle added depth information. It might have made the movie more engaging, and it might have even subconsciously made me feel better about it, but it generally wasn't amazing. On a few occasions when the 3D effect seemed underwhelming I removed the glasses to see distance between the two images, and it was surprisingly small. Some scenes were more impressive and a few felt intense. However, the intense feeling wasn't entirely pleasant, and on two such occasions I heard someone sitting nearby say it might make them sick. So, based on that, maybe high intensity needs to be avoided.

The glasses appeared new and they came sealed in their own plastic bag. I decided to keep them as a souvenir and for experimentation unless some notice told me I must return them. There was a message at the beginning to please return them for recycling, and there was a cardboard recycling bin for glasses at the exit, but nothing said that they were on loan and had to be returned. Therefore I decided to keep them.

(It's weird to say that's for recycling for environmental reasons. The environmentally sensible thing would probably be to reuse the glasses by inspecting, cleaning and disinfecting them. If they said they wanted the glasses back for reuse for environmental and/or cost-cutting reasons, I would have left my glasses behind. I wonder if they're using recycling and environmentalism as buzzwords that they expect people to be programmed to respond to.)

After coming home I already found one interesting thing about the glasses: they act differently based on the direction that light is coming from. If light comes from the front (as intended), rotating them changes most LCD screens from a blue tint to a yellow tint and back. If light comes from the back, the glasses behave more like polarized sunglasses, with the screen appearing normal when they are vertical and going almost totally black when they're horizontal, with only the dust on the screen glowing.

This led to me finally understanding circular polarizers. They consist of two components, a linear polarizer which selects for a particular linear polarization, and quarter wave plate which transforms light between linear and circular polarization. With the quarter wave plate before the polarizer, this combination selects for circularly polarized light by transforming it into linearly polarized light and then selecting for a particular linear polarization. This is what the RealD glasses do. The linear polarization of the output is irrelevant because human eyes don't see it any differently because of that. With the quarter wave plate after the polarizer, the combination selects for linearly polarized light and then circularly polarizes it. This is what camera circular polarizers do. To get the effect, one only needs to select for linearly polarized light. However, depending on orientation, linearly polarized output would reflect less from mirrors in the camera and cause problems, so the quarter-wave plate is used to transform it to circular polarization. The most serious problem would be through-the-lens (TTL) metering receiving less light, resulting in overexposed photos. Some cameras like typical non-SLR digital cameras do not have internal mirrors and they can work with linear polarizers (or even polarized sunglasses) without any problems.

The plastic pouch the glasses come in has multilingual and pictorial warnings not to use them as sunglasses. It is explained that they do not block UV light. Actually, wearing them outside would also be pointless because there is very little circular polarization in nature. For the familiar linear polarizing effect, the lenses are both backwards and sideways. So, for now I'm not sure what else I can do with these glasses, and they'll just be a souvenir. If I think of something interesting, I will probably post about it.

Finally, here's my favourite polarized photo, purely here as eye-candy:

Thursday, November 27, 2008

I need a place to host arbitrary files.

There are plenty of places where one can host photos for free. I have an account at Picasa Web Albums which Blogger uses by default. However, what about hosting arbitrary files? I'm aware of sites like RapidShare, but they annoy the downloader with captchas, waits and annoying ads. They seem to mainly be used for piracy (eg. search Google for rapidshare), probably because that's the only use where such a level of annoyance is accepted. I want a place for legal content, so there must be a better alternative. I asked Reddit about this and got a few suggestions.

Warped suggested file dropper. It seemed familiar and I wondered if it was the site which had a promotion a while ago, giving out free premium accounts. I was right, I was able to log in and I was told "Storage: 0Mb / 250Gb Paid Until: Jan 18th, 2038". I was impressed that the site is still up and responsive. However, they also say "The files are kept forever as long as they are being downloaded.", which means that I have no idea how long files would stay up. Other sites at least give some specific number of days since last download.

Picklegnome suggested It's a site I didn't know about. What I see there seems impressive. Drops can be set to remain for up to a year since last view, and the demo video shows an amazing array of features. So I created my drop at There's nothing there now, but I expect to start using it soon, relating to some upcoming posts.

Friday, November 21, 2008

Looking back on how I stopped scrobbling to

Occasionally when listening to music I remember it's not scrobbled to anymore, and for a moment I feel as if that's a bad thing. Then I remember wasn't useful. I also remember how memorable times involving music are memories in my mind, not lists of songs on a web site.

It might be cool if supported journal entries linked to a particular range time and playlist of tracks listened then. I'm not sure if that would be useful because I'm not sure if I could put those experiences into words in an appropriate way, and I'm not sure if they'd be useful later. However, I'd be interested in trying.

Copying Vista firewall rules

The Windows Firewall with Advanced Security in Vista has a way to export a list of rules, but it has no way to import rules. The only import I could see was for policies, and that to a warning that the current policy will be overwritten. So I searched through the registry for a rule name using regedit and I found HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules. All the rules are there, in human readable format.

I exported that to a .reg file. I used find "Dir=Out" to extract the outgoing rules I wanted and then I edited it in a text editor to remove some more rules and the registry file header. (Grep didn't work initially because the file was UTF-16. Find converted it to an 8 bit encoding but that was okay.) After importing the .reg file on another computer, the rules appeared in the console, but they were not in effect, and attempts to disable or enable them caused errors. I thought the firewall hadn't loaded the rules, so I rebooted. Finally everything worked properly.

Friday, November 07, 2008

Olympus C-770 Super Zoom button circuit board replacement

Earlier I posted about how my camera broke and Olympus refused to help me get the part I needed. Fortunately Black's Photo referred me to another local photo store, which referred me to Nortown Photo, who were helpful and willing to order the part and ship it to me.

Here's the new part, VG052500:

Here is the old one, still glued to a metal plate which also supports the big LCD:

Here are the slide switch contacts. The problem is the connection to the left bottom contact, which is cut at the horizontal line caused by wear from switch sliding. Note that the new part came with the whole slide switch already installed on the board.

The old circuit board had to be removed from the metal plate. It came off like tape. The glue held quite well but it wasn't too hard. Most of the glue stayed on the circuit board, but some remained on the metal plate.

The new circuit board did not come with any glue on the back, and the glue remaining on the metal was insufficient and insufficiently sticky. I cleaned the metal plate with isopropyl alcohol and my nails. Then I used some contact cement to glue the new circuit board, making sure it was properly aligned.

Here's the inside of the camera's back with the buttons (separate plastic pieces) in their positions:

Now it was time to attach the metal plate with the button circuit board and large LCD using four flat head screws:

After that, there is a black plastic film which covers the metal part. It was still sufficiently sticky so no additional glue was needed. The rubber backing for the slide switch and copper foil for grounding the top metal plate (backing for top three buttons) were already attached to the plastic. After sticking on the plastic, I attached the top metal plate with two flat screws. Here is the result:

Since it was almost time to attach the back, I took some photos of the camera with the back removed. In the second photo, note the small indentation in the back border of the battery and card compartment. The switch which detects if the compartment is open is there.

Now it was time to connect the three cables. There's the LCD data cable, a two conductor cable which I assume is the LCD backlight, and the button circuit board. The LCD data cable connector has a latch, so I thought it would be easy, but it was the hardest one. Here is the result:

After this I was able to test the camera a bit. Now it was time to figure out what to do with the remaining screws:

The exploded parts diagram was quite helpful and it was all pretty straightforward. I only took photos of the hot shoe because that was tricky to disassemble. There are no screws visible there, but actually the shiny metal is a springy clip which can be pried out to reveal four screws which hold the thick metal hot shoe channel. Below that is one screw which holds the back.

Finally, here is a photo taken using the repaired C-770. At the top you can see the underside of the slide switch and the edges which rub against the circuit board. Below that you can see the old circuit board.

Sunday, November 02, 2008

APC BackUPS ES BE500U-CN pinout

I already found the USB pinout for the RJ45-10 connector on my APC BackUPS ES BE500U-CN UPS, and I constructed a temporary adaptor which works. APC's list of cables implies only USB is supported, but before making the permanent cable, I wanted to see what else is accessible via that connector and maybe find a way to do remote on/off.

Dumb (voltage level) signalling is present. When unplugged, pin 2 goes to just over 12 volts, and applying 12 volts to pin 8 for over a second causes the UPS to shut off with a single short beep one minute later. I didn't test the low battery signal which is supposed to be on pin 3.

Smart (serial communication) signalling doesn't seem to be present. Sending Y at 2400 baud 8,n,1 does not do anything. This agrees with what I've read online about it not working.

I wonder what pins 5 and 6 are for. None of these signalling methods use them and there is no voltage or resistance to ground at them. Maybe they're not used.

My first impression of Vista Media Centre

I normally don't use Windows Media Center in Vista, and I had almost forgotten of its existence. I recently tried it out, both from my computer and via a TV and remote.

At first, whenever I tried to view photos I'd get the spinning circle and have to wait a long time. After trying various things, I found this was due to a turned off network scanner. This problem made no sense; why would Media Center access the scanner when I try to access a folder of photos on my hard drive? After I disabled that imaging device in device manager, the delays were gone.

The next annoying and stupid thing I noticed was file browsing. Videos and photos need to be browsed separately and music must be accessed via a database. What a terrible way to dumb down a computer!

When browsing my photos subdirectory for videos, I found that videos in .MP4 and .MOV containers aren't recognized. Both can play properly in Windows Media Player and .MP4 videos play while browsing photos in Windows Photo Gallery. It's as if they forgot about cameras which record videos in those formats! I was pleasantly surprised by one thing however: .MKV videos played.

Overall the interface was acceptable for selecting and playing supported videos. It certainly wasn't efficient even then however. For example, folders I added were put at the end of the list of folders, and they were added to both photos and videos.

Note that I didn't mention a tuner card. That's because I don't have a supported tuner card. For whatever stupid reason, Media Center has stringent requirements and video in devices supported by Vista aren't automatically supported by Media Center.

I guess Windows Media Centre is okay for occasionally using Vista via a TV. However, I can't imagine dedicating a computer to it.

Monday, October 27, 2008

Neodymium bulbs sacrifice colour rendering index and aren't full-spectrum or like daylight or sunlight

I thought that neodymium glass light bulbs (like GE Reveal or Sylvania Daylight Plus) just tweaked the spectrum a bit. Today I ran across a post which said their spectrum is irregular and they have a pretty low colour rendering index (CRI) of about 70. Since that's just one post on a message board, I did a bit of research. I found the same issue mentioned in other sources such as a PDF on Colour Rendering Index and LEDs and a page talking about the disadvantages of full-spectrum light sources. The latter lists the CRI of a 60W GE Reveal A-lamp as 78. (Note that fluorescents generally have a higher CRI!) Another page claims "Reveal© bulbs produce CRIs in the neighborhood of 92-93" and shows a graph comparing spectra. In the graph you can see the sharp dip in the yellow region. Neigher the spectrum of the neodymium glass bulb or the normal incandescent bulb is at all like sunlight or daylight (for example, there's this graph from an article on light sources). Neither daylight nor sunlight have a sharp dip in yellow, and both have considerably less red than neodymium bulbs.


Yes, 10 conductor RJ45 connectors do exist. They're called RJ45-10. Among other things, they're used to connect monitoring cables to APC uninterruptible power supplies. The same connector is used for simple (dumb) level based signals, serial (smart) communication and USB. According to APC, this particular UPS only supports USB, and they still fail to use a standard USB connector.

So, here's how I made an RJ45-10 from an RJ45-8. The metal for the side connections is from an RJ45 jack. Behind the connector you see a temporary connection to a USB cable.

Saturday, October 25, 2008

DragDropUpload 1.6.8 slows down Firefox extremely on some pages

DragDropUpload is a Firefox extension which allows files to be dragged into form fields instead of using the Browse button. I think that's how file uploads should work; the Browse button is ridiculous.

Version 1.6.8 slows down Firefox to the point of unusability on some sites. Replacing dragdropupload.jar (in the corresponding extension directiory in the profile) with the one from 1.6.7 seems to fix this problem. (Yes, this means 1.6.7 is installed but Firefox thinks 1.6.8 is installed. It's exactly what I want. I don't want to be nagged to upgrade to 1.6.8.)

I set up outbound firewall filters in Vista

A recent Lifehacker article on firewalls inspired me to set up outbound firewalling. By default, the Vista firewall does not block outgoing connections. However, the Vista firewall can handle both incoming and outgoing connections.

It's quite easy to configure. You can find "Windows Firewall with Advanced Security" in "Administrative Tools" in the start menu. (I usually just type a part of the name instead of using folders.) This runs a management console for configuring the firewall.

By default, anything outgoing is permitted unless blocked by a rule, and there are no blocking rules. If you had something you wanted to block you could create an outbound rule, but if you want to control outbound communication, you should probably set up the firewall to block anything which doesn't match a rule. If you select "Windows Firewall with Advanced Security" in the left pane, you will see the current setup. A "Windows Firewall Properties" link allows you to change settings. You should change settings for all three profiles (Domain, Private and Public).

The firewall comes with some outbound rules which permit some communication, but these are definitely not sufficient. For example, even Internet Explorer and Windows Update are blocked. It's easy to create new rules which permit particular programs. If you create a custom rule, you can even define which services running under that program are allowed to communicate. For example, if you create a rule for %SystemRoot%\system32\svchost.exe and specify the "Windows Update" service, that will not permit any other service to communicate.

There is one very obvious thing missing: a dialog which tells you when some program is initiating outbound communication and allows you to permit, block or create a rule for that communication. However, so far this has not been a problem for me. In a few cases it might be tricky to find what program needs to be permitted. For example Spybot Search & Destroy uses SDUpdate.exe for updates and to allow ping and tracert to work you need to permit those things to System. However, finding this wasn't hard for me.

There are plenty of firewall applications for Windows, and several are even free. It's just nice to see that I don't even need a firewall application. I'm impressed with what Microsoft. This is another example of how Vista is better than XP.

Friday, October 24, 2008

The best virus scanner, for free

When I looked at information about virus scanners at sites like AV-Comparatives, I came to the conclusion that Kaspersky Anti-Virus is best. The scanner part (without realtime protection) is available for free at The interface seems to be a Java applet, but the scanning part seems to use a downloaded executable and downloaded Kaspersky extended signatures.

In Firefox 3.0.3 it couldn't detect Java (even though it Java is installed and functional), but it woked fine in Internet Explorer 7.0. That's fine for me because in Vista the browser must be run as Administrator, and I don't want to run the browser I use for web browsing (Firefox) as Administrator. It allows scanning of critical areas, the whole system or particular folders, and it seems reasonably fast.

Signature based detection of malware isn't a perfect solution, but this is the best scanner. I feel it's definitely good enough for occasional checkups. Note that if you have a file which you actually think might be suspicious, you're better off using one of the web sites which scan it using multiple scanners, like VirusTotal or Jotti's malware scan, and even those aren't guaranteed to catch everything.

I'm abandoning my account

When I first read about, I thought it's such a great idea. I enthusiastically joined. I convinced friends to join, and I fixed a Rockbox bug so I could submit tracks from my portable music player.

However, wasn't actually useful to me. I was finding new music from a variety of sources, and wasn't one of them. seemed better regarding social interaction; for example the way journal entries can be connected to music is cool. But for the most part I could have just posted on my blog instead.

Part of the reason why wasn't useful might be that what I played often might not accurately depict what I really like. I'll have to think about this idea some more.

So, I'm going to stop submitting to and I'm going to erase my scrobbled data. I don't feel like deleting my account yet however. That feels too irreversible for now, and I have some journal entries here which aren't duplicated elsewhere.

If I post more about music I listen to, that will be on my blog here.

Tuesday, October 14, 2008

Some wisdom from Douglas Adams

This seems like a good day for some wisdom from Douglas Adams:

"It comes from a very ancient democracy, you see...."
"You mean, it comes from a world of lizards?"
"No," said Ford, who by this time was a little more rational and coherent than he had been, having finally had the coffee forced down him, "nothing so simple. Nothing anything like so straightforward. On its world, the people are people. The leaders are lizards. The people hate the lizards and the lizards rule the people."
"Odd," said Arthur, "I thought you said it was a democracy."
"I did," said Ford. "It is."
"So," said Arthur, hoping he wasn't sounding ridiculously obtuse, "why don't the people get rid of the lizards?"
"It honestly doesn't occur to them," said Ford. "They've got all the vote, so they all pretty much assume that the government they've voted in more or less approximates to the government they want."
"You mean they actually vote for the lizards?"
"Oh yes," said Ford with a shrug, "of course."
"But," said Arthur, going for the big one again, "why?"
"Because if they don't vote for a lizard," said Ford, "the wrong lizard might get in. Got any gin?"

That's from the start of Chapter 36 of So Long, and Thanks for All the Fish. It's a great book. All of The Hitchhiker's Guide to the Galaxy books are great. I highly recommend them and other works by Douglas Adams.

So okay, it's not really that bad and the leaders aren't actually lizards (no matter what David Icke might say). However, it's worth noting that the lizards I know wouldn't object to microscopic patterns of charge, magnetism, dye or texture. They might object to some plants, but they probably wouldn't object that violently. Oh, and they certainly don't have wars.

So, make sure you choose one today so the wrong ones don't get in.

C-770 won't turn off, probably due to switch

My Olympus C-770 camera worked fine today but after downloading the photos I wasn't able to turn it off. Normally it stayed in playback mode, but if I very quickly moved from still image or video camera modes to off, the camera would stay in that mode. After resetting it and taking the battery out and moving the switch around the problem remained.

I decided that it was probably a problem with the switch so I took the back off. This was fairly straightforward. Some screws are behind the battery and cable doors. At the hot shoe, removing one screw releases the springy metal part, revealing four more screws which release the thick metal part, revealing one screw holding the back. There were two ribbon cables and one two wire cable, which were easy to disconnect.

Upon inspection, everything seemed fine around the switch, so I decided to disassemble the switch. This required removing two screws in the vicinity of the switch, bending it back, prying off the grey part one operates, bending four tabs holding the metal body of the switch and removing the black plastic part of the switch. This revealed that the switch was basically a set of four pairs of carbon covered areas on a flexible circuit board. The plastic part which moves has small metal part with two springy leaves which bridge these pairs of carbon covered areas. This sucks. It's ridiculously cheap and it's bound to wear out and fail. Also, I found others who experienced the same problem:

I'm now wondering how to fix this... unswitch. I wonder what sort of repair will last. I guess I'll do some research on the topic tomorrow.

[ Also posted to Olympus-C730-c740-c750 Yahoo Group ]

Update 1: I assumed a pad wore out or was dirty. (I probably shouldn't have assumed that, considering the off position stopped working suddenly and never worked again.) The pad seems fine. It's just not connected to the circuit board connector. I think the break may be at the worn line below the contact pads. (This must be what the moving part of the switch slides on. There is also another somewhat less worn line above the pads.) I guess some conductive glue could fix this, but would it stand the sliding? I've also contacted Olympus asking for a replacement button circuit board.

Update 2: It's now clear what happened. The outer plastic part of the switch (the part you touch) slides on the circuit board on two rather sharp edges (top and bottom). The trace leading to the bottom left pad is the thinnest of all traces going under these edges, and so it was cut. Still no response from Olympus.

Update 3: I got a response from the e-mail I sent to It's a long and useless message about how they recommend that their cameras only be serviced at authorized service centres and how they only sell very few user replaceable parts. I'll try calling them at 1 800 201 7766 next. I guess I'll attempt repairing the break with an automotive rear window defroster repair kit.

Update 4: Calling Olympus was an irritating waste of time. They refuse to sell the part, saying that they want cameras repaired at authorized service centres, or saying that their legal department doesn't let them sell parts for liability reasons.

Friday, October 10, 2008

Extreme closeups using my webcam

Here are some extreme closeups taken using my webcam, an Intel PC Camera Pro. This is closer than it can normally focus; I had opened the case so the lens could be unscrewed further (and farther lens means closer focus). These images were taken quite a while ago. I just ran across them and though I should share the best ones.
Motorola MC68705P3S microcontroller:
A microwaved CD from the perfect angle:
CRT monitor (displaying a Linux icon in Windows):
A shirt:
An chip from an old video card:

Tuesday, October 07, 2008

Why I won't call myself an atheist.

Yesterday, a blog post about two possible definitions of atheism became quite popular on Digg. I didn't like the tone of the post because it seemed to attack agnosticism a bit. However, I was intrigued by the two definitions of atheism:
  1. An atheist believes that God does not exist.
  2. An atheist does not believe that God exists.
I always thought atheism meant the first thing. That seemed to me how people portrayed it. To me the stereotypical atheist view is that science explains everything and so there's no need for religion. I cannot agree with that because science has a big gaping hole in understanding of consciousness. (Yes, some claim to explain it scientifically, but they only gloss over it, at best only hypothesizing about related physical phenomena while claiming they have an answer about consciousness.) That hole in scientific understanding is sufficiently large and of such a nature that it doesn't seem that current science can even approach it and one cannot rule out some sort of religion-like explanation. At the same time, religion often seems ridiculous, so I can't say I believe that either. So, I say I don't know and I call myself agnostic.

I can't say I object very much to applying the second definition to myself. My main objection is that it seems to be biased toward the belief that God doesn't exist while I'm saying I simply don't know. Actually, I'm pretty sure God doesn't exist as portrayed by religions I know about. There, "does not believe" is entirely appropriate. It just does not seem to be appropriate considering the idea of God in general. (Note that my idea of what the possible nature of God might be is quite broad. God might even be something I cannot imagine.)

Then there's the issue of a term having multiple meanings. I wouldn't want to say I am an atheist using meaning two and then have it misinterpreted as meaning one.

EDIT: Oh, and what about religion which doesn't involve God or deities? Neither definition addresses belief in such religions, and such religions do exist. The core of Buddhism doesn't seem to include deities.

Taking religion literally is insane

To demonstrate why I reject religion, I am going to talk about one example: the story of Noah and the Flood.

In that story God floods the Earth and kills all people except Noah and his family. The flood presumably also kills all the land animals except the ones Noah takes in his Ark.

This story is almost celebrated. There are cute pictures of the ark and animals for kids and there are even children's books based on it. It might seem cute until you consider the death and destruction which is conveniently ignored. It's actually like having cute pictures showing how wonderful the Holocaust was.

Supposedly all of the people that got killed were wicked. That's hard to believe. Does it mean even children and newborns were evil? What about the whole killing aspect? Most people seem to be okay with punishing evil, but did they all really deserve the death penalty? Oh, and what about the animals? Drowning animals is cruelty. Why did they deserve it? Surely an omnipotent being can be more selective in its wrath.

Then there's the impossibility of the whole thing. Consider all the species of land animals, the way some only live in remote regions, and the way some require very specific food. Consider how many employees a zoo needs, and many more animals the ark would have. Okay, that could be resolved with divine assistance. A more serious problem is that a global flood would leave some unmistakable traces for geologists and archaeologists. I don't mean what some say are traces, because those couldn't possibly be from such a recent flood and they're not worldwide. The Bible didn't say anything about God hiding the evidence.

After the flood, God said he wouldn't do it again, which may seem nice, except that he's apparently still free to hurt people and end the world in any other way. For an example, read Revelations.

If it seemed like the flood happened, I might conclude that God was messing with people as evolutionary algorithms. However, considering the lack of evidence that it happened there is one very satisfying answer: it's fiction and metaphor.

Free will is paradoxical

Free will seems quite obvious intuitively. However, it also seems impossible.

If the brain is a bunch of matter and energy following the laws of physics, how can there be any free will? People are then just machines, like computers.

There is a simple way out of that: you could claim there's something else (eg. a soul) affecting the brain. However, the same fundamental problem remains regarding whatever is in control. If there are a bunch of deterministic processes involved, it's a machine. If it's not deterministic then it's randomness, not freedom. If something is manipulating the probabilities, then consider the processes involved in that. It's again the same problem.

It doesn't seem like any kind of process science knows about would resolve this. There would have to be some weird intentionality force in control, whose properties I cannot imagine. Now suppose this magic free will force does something. What caused it to do that? Again, the same sort of problem can arise.

Another way to look at it is that free will supposedly cuts the chain of causation. Events are generally consequences of other events, but free will events are supposedly caused by a being with free will and not a part of the overall chain of consequences. That doesn't even seem true; actions by people do seem to be related to causes. Yes, it's possible to stop a cause from leading to action or redirect it, but that's really only due to another cause. Oh, and choosing between causes is also due to causes. Once again there is a risk of infinite regress.

Based on all of this it seems like free will is probably an illusion. I can't say that's certain, but based on science it certainly seems far more probable than that free will exists. Yet from my own point of view, it seems so obvious free will exists, and the idea that it doesn't exist seems unacceptable. A world without free will would be like a movie, either entirely deterministic or with random elements, except that I'm watching the movie as a character in it and I constantly have a delusional perception that there is free will. I hope that's not the way reality is.

The core mystery about this universe

Consciousness is a key part of human life. You're not just a machine consisting of matter following the laws of physics; you also experience things. This gets taken for granted, but it actually seems inexplicable. It seems like the core mystery about this universe. It's the reason I'm not an atheist.

The problem is quite simple. We know there's consciousness because we experience it. Science tells us about the nature of matter, energy and physical laws. We know nothing about the connection between consciousness and physics.

I can think of many unanswered questions about human consciousness. Why does a person have a point of view? How is continuity maintained as atoms and even cells are replaced? Why is consciousness linked to the brain only? Why does consciousness stay linked to one particular brain and body? Why is there only one consciousness linked to one brain and body? How does consciousness arise as a new person is formed? What happens to consciousness when a person dies?

Then there's also the question of what is conscious. I know I am conscious, but I can't even prove that other people are conscious. There seems to be no way to prove or disprove that something is conscious. For example, you cannot prove that a rock isn't conscious. However, if it was conscious, what would it be conscious of? Humans have structures which take input, process information and give outputs. Rocks don't have the same sort of thing. What about a computer? It can certainly have capable structures for input, information processing and output. However, the nature of information processing is typically quite different from humans. For example, one cannot really say a computer sees if it takes information from a webcam and compresses and records video. What about a single cell, what could its consciousness be like?

Then there's the question of how consciousness arises. Is an egg cell conscious? Is a sperm conscious? If they were, how did that arise? They come from a bodies which were aware of one consciousness relating to their brains. What happens when the two merge? How is the result conscious while there aren't even any nerve cells in it? You could also ask the question about physical objects. When a stone is quarried or when a brick is made, how can that get its own consciousness? What about if you break a stone in two? What about when it's put into a building?

The question of what happens when a person dies seems to be the only question that's routinely considered. However, it seems like all the effort put into answering this question just leads to myths and theories, and there are no real answers.

Another issue relating to consciousness is free will. It's often taken for granted, but it's actually quite paradoxical. A human is a bunch of matter and energy. There are various physical laws which explain how matter and energy functions. Where is the free will there? It seems like free will could only exist if something else was influencing this bunch of matter and energy. It wouldn't necessarily have to break the laws of physics; maybe it could just affect probability. So far, it doesn't seem like there's any evidence of something like this happening. (Free will is paradoxical even if it does this, but that's probably outside the scope of this post.)

So, there are a lot of questions about consciousness, and there aren't really any answers. Many people claim to give answers. Some talk about myths, some talk about information processing, some invent new myths, and so on. It doesn't seem like there's any credible and sufficient answer.

I have some ideas about how consciousness might work. The brain might just be a sort of antenna, connecting with something which we cannot see. Alternatively, maybe this reality is made of consciousness and matter is only something secondary, like a fractal decoration. This second theory seems more appealing but I can't say I know enough to conclude that it is true. All I really know is that I don't know and that I currently cannot understand this universe.

Saturday, October 04, 2008

Religulous was fun and worthwhile

Bill Maher's Religulous was a lot of fun. It was a great way to get some enjoyment from the many ridiculous stupidities in religion. Ordinarily, some things about religion seem upsetting, but Bill Maher was great at presenting it as comedy. I laughed more than when watching comedy movies with a fictional plot.

I don't think the movie was very good as a documentary however. It seemed to show some bias regarding particular religions. Bill Maher criticized Catholicism but the two Catholic priests he talked to seemed to be the most reasonable of all the people interviewed. He also seemed to leave Judaism alone for the most part, and he seemed biased against Palestinians and maybe Islam. Oh, and he neglected all the eastern religions, but I hear that was intentional because it would have been too much to fit into one movie.

I'm not sure I learned anything from the movie. However, it was a lot of fun and I think it helped me overcome respect I had for religion. Overcoming respect for religion is important. If you view religion as something better than other insane ramblings, you're still a bit religious.

I strongly recommend the movie to everyone.

Thursday, October 02, 2008

Photosynth seems promising with video

Earlier, Photosynth disappointed me. Today I tried it using video and I'm more happy with the results.

I chose my 8 mm analog video camera (Sony CCD-TR96) as the source because I thought it would offer most suitable candidates. I searched through quite a bit of video, seeking an especially good candidate so I could test this idea without wondering whether a failure was due to the particular scene. I wanted something without nearby people or water, without obstructions and with a fairly straightforward geometry that is nevertheless more than just one panorama. Eventually I decided to try it using video taken at the mountain fortress of Klis in Croatia.

I captured the entire segment at 8 FPS through the video input of my Intel PC Camera Pro webcam using VirtualDub. Then I cut out some parts which I didn't feel were appropriate for Photosynth (scenes of people, low quality zooms of Split, frames with a date overlay and a few other small bits), cropped noisy edges and saved the result as an image sequence.

I ended up with 555 images. I thought about cutting down that number by decimating the frame rate, but it was all only 16.4 MB so I decided not to. Photosynth warned me that there may be problems if I try to synth more than 300 images, but I ignored the warning because of the overall size. Matching took a long time, sometimes using all four cores, but it wasn't too bad. The rest of the process didn't take long.

The result is quite nice and I don't feel like it was a lot of work. In fact it was fun and it was less work than writing this post. I'll probably do more of these.

A cool hypnagogic experience

When I'm ready to fall asleep and I allow myself to fall asleep but there is some stimulus which prevents me from falling asleep I sometimes have interesting hypnagogic experiences. / music seems to work best for this.

Last night I was listening to In Search of a Meaningful Moment by Shulman. I chose that album because I vividly remember listening to it when I was with a friend I had argued with earlier that day, and I was wondering if listening to it would lead to any useful insights regarding the argument. Suddenly I found myself being/creating a physical structure. It was the structure people construct to further their own aims/agendas in social situations. I was experiencing this as a physical structure existing in some other space. Then I heard some talk about shamanism, dreams and boundaries between states. I was amazed by how it seemed relevant to my experience, perhaps describing the nature of my experience, and then I woke up refreshed.

I just searched through a few tracks and found it after 5:00 in A Magnificent Void. Then I searched Google and found that the quote is from the movie Waking Life. How appropriate!

[ copied from my journal ]

Wednesday, October 01, 2008

Canada now has a National Do Not Call List

Canada finally has a way to stop telemarketing calls. You can add your number to the National Do Not Call List. Then, after 31 days, if a telemarketer does call the CRTC may impose a penalty of up to $1,500 per violation for individuals and up to $15,000 per violation for corporations.

Certain organizations such as charities and political parties are exempt from the National Do Not Call List. If you want to stop those calls, there is another service called iOptOut. It's not run by the government but it seems legit.

Monday, September 29, 2008

The Olympics suck!

Before the 2008 Summer Olympics in Beijing I read about various things being done for the sponsors and I was horrified. For example, the athletes couldn't bring their own food and beverages into the Olympic Village. To make things even worse, the sponsors were McDonald's and Coca-Cola, who offer so much unhealthy food and beverages. It all seems so out of touch with ideas that are supposedly associated with the Olympics.

It seems that the 2010 Winter Olympics in Vancouver will be just as bad if not worse. They've already trademarked lines from the Canadian National Anthem and passed a law protecting various phrases which cannot be trademarked, such as 2010 along with winter. Oh, and guess what: Coke and McDonald's are sponsors again.

Ideally this corporate pageant needs to end, and a new organization needs to take over. I'm not counting on it though.

The bloat of Rockbox

I really like Rockbox (an alternative open source firmware for some portable media players). It's usually much better than the original firmware. However, it sure is getting bloated. The recently released version 3.0 only leaves 1.12 MB of buffer* when running in RAM on my Archos V2 Jukebox Recorder. The bloat might not matter on other platforms with more memory (such as the Video iPod, which has 32 or 64 megs) but it has gotten to the point where it might be best to run an old version on platforms with less memory, such as the Archos devices which only come with 2 megs. I'll continue running my old version from November 2007 which I stripped down and put into ROM, resulting in 1.735 MB of buffer.

* The buffer is filled with MP3 data from the hard drive. Then the hard drive is spun down and data in the buffer is played. When little remains in the buffer, the hard drive spins up again to refill the buffer. If less buffer space is available, the hard drive needs to spin up more often to refill the buffer, resulting more power usage and more wear and tear on the hard drive.

Thursday, September 25, 2008

I saw a green flash today!

I was at Pt. Pelee and the sun was setting over Lake Erie. The water was calm nearby, though there were waves further out from a wind from the East. The sun was very red and quite bright. The sky was clear and there were some typical bands of colour parallel to the horizon. I wasn't paying very much attention to the sunset because it wasn't exceptionally nice and the sun was bright.

When only a little bit of the top of the sun was visible, I decided to watch the sun until it disappeared. I was expecting it stay red and just disappear behind the horizon. However, as the remaining visible sun shrank to a point, it became whiter. It also seemed to get brighter, but I'm not certain about this. Then I remembered about green flashes. Right after becoming white, the sun started turning green. It reached a very pure green colour and it seemed quite bright. It gave me chills; I realized "This is it, I'm actually seeing a rare green flash!" After reaching pure green the spot shrank and faded and disappeared. It all happened very quickly, maybe within two seconds. It didn't feel too short though.

I'm so glad I saw that.

Tuesday, September 23, 2008

I tried out Delicious again

Social bookmarking theoretically seems like a good idea. In 2006 I tried out (now called Delicious) and I found it made bookmarking more work and didn't offer any significant benefits. I tried it again today and I came to the same conclusion. The main problem is that tags don't seem to be worthwhile for bookmarks, and the other notable problem is that it's less convenient to use than the Firefox bookmarks functionality.

Monday, September 22, 2008

Pt. Pelee tip photos in chronological order (2003-2008)

Point Pelee is a peninsula extending into Lake Erie. It is the southernmost part of Canada's mainland, just crossing the 42nd parallel. (It is not the southernmost point of Canada however; that is Middle Island, and Pelee Island is also further south than Pt. Pelee.) It is the site of Point Pelee National Park, which features marsh and Carolinian forest habitats and a major migration route.

The tip of Pt. Pelee is an interesting place. The shifting sands and changing weather conditions mean that it's constantly changing. Here are some photos I took there, in chronological order.