Wednesday, January 21, 2009
Associating .vbs files with Notepad++ breaks VBScript
I associated .vbs files with Notepad++ 5.1, thinking that will make editing them more convenient and prevent accidentally running some nasty script. Actually, it totally disabled VBScript. When I tried to install a new driver for my network card, I was told "There is no script engine for file extension VBS". Re-registering vbscript.dll and other DLLs didn't help. Running Notepad++ as administrator and removing the file association fixed the problem.
Sunday, January 18, 2009
Apple is evil
It's well known that Apple uses DRM, and DRM is bad. However, many other companies also use DRM, so this doesn't make them seem exceptionally evil. What makes Apple evil is that they go far beyond just trying to protect copyrighted works. What seems worst to me is that they're preventing 3rd party software from putting content on iPods and requiring an authentication chip in iPod docks. They've also added protection to newer iPods which has so far prevented Rockbox and iPodLinux from supporting them. The firmware is encrypted with AES and digitally signed, like on the iPhone. Apple even wants it to be illegal to find a way around that and run your own software on their devices. (Post updated in February because I learnt more terrible things about Apple.)
Wednesday, January 07, 2009
Finding properly ripe peaches
Sometimes, peaches sold at supermarkets seem totally ripe from the outside but are not ripe inside. For example, they may be mostly red outside but green inside. It's possible to check for this by looking into the indentation where the stem is. Unripe peaches tend to have some green there and ripe peaches don't. I suppose some chemical ripening agent (ethylene?) is used to ripen the skin, and that agent doesn't make it deeper into the fruit or into the stem indentation.
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.
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:

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.)
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.)
- 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 closeup of the LTC4066 area. Remember that this is a small part of the iPod, and what you see here is actually very tiny.
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.

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.
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.
Subscribe to:
Posts (Atom)