bitguru blog

a guru of bits, or just a bit player?

Archive for January, 2008

Mazda5 HRE hybrid hydrogen/gas/electric minivan

Posted by bitguru on January 21, 2008

Mazda5 HRE

The only hybrid minivan currently in production is the Toyata Estima Hybrid (Japan only). Well, Winding Road magazine reports that the Mazda5 HRE should be added to the list.

The Mazda5 is a small minivan with 2/2/2 seating. The conventional model is available in the U.S. but it seems the hybrid HRE will be for Japan only.

The HRE’s rotary combustion engine can run on gasoline or hydrogen, but there is no hydrogen fuel cell. The electric half of the hybrid drive train seems to be fairly standard.

  • HRE (or Hybrid RE) stands for hybrid rotary engine.
  • In Japan the Mazda5 model is called the Premacy.

Advertisements

Posted in Hybrid | 2 Comments »

Apple’s MacBook Air intoduces Micro-DVI

Posted by bitguru on January 15, 2008

microDVI.jpgApple introduced a new thin notebook today. They call it the MacBook Air. They had to do some interesting things to make it so thin. It lacks an optical drive, but that’s no big deal in the subnotebook segment. A slightly bigger deal is the new Remote Disc software utility that allows a MacBook Air (or any Mac?) to borrow an optical drive from a willing Mac or PC donor.

An ethernet port would have been too large to fit, so it lacks one of those also. Apple figures most will use 802.11 wireless networking, but for the rest they sell a $29 USB-to-ethernet adapter. (The adapter’s system requirements suggest it works only with the MacBook Air. Do you suppose that’s actually true?)

Most surprising to me is that Apple plutoed the mini-DVI connector in favor of micro-DVI. Even the mini-DVI connector must have been too big for the MacBook Air.

I searched the web for information on micro-DVI but didn’t find much. Apple sells micro-DVI to DVI, micro-DVI to VGA, and micro-DVI to Video adapters. (The first two of those are included in the box with the MacBook Air.)

Mini-DVI was pretty much an Apple-only connector. Perhaps micro-DVI will gain wider industry support.

Posted in Hardware | 5 Comments »

mini-DVI to DVI adapters and analog signals

Posted by bitguru on January 15, 2008

Mini-DVI is an Apple-specific port they use on products (such as their 12″ and 13″ laptops) where a full-size DVI port would take up too much space. [update: The 13″ MacBook Air, announced today, would seem to use micro-DVI, not mini-DVI.]

It seems obvious that it would be possible to build a mini-DVI to DVI-I adapter that carries both digital and analog signals. After all, Apple sells adapters that convert from mini-DVI to both DVI and VGA, so both analog and digital signals must be available in the mini-DVI port.

Apple says of mini-DVI, “The computer detects which adapter is present by reading its EDID (Extended Display Identification Data) via DDC. The EDID for video is in the adapter; the EDID for VGA and DVI are in the display.” But I think we can presume (can we?) that for both DVI and VGA that the DDC/EDID conversation between the mini-DVI port and the monitor is passed straight through the adapter unadulterated. It’s only the adapter providing S-video and composite video ports that plays DDC/EDID tricks.

So the only reason for a miniDVI-to-DVI adapter not to pass through the analog signals is to save a few conductors in the cable. Yet it seems both games in town have in fact done this.

It’s obvious Apple does it, since the female DVI connector on their adapter lacks sockets for the analog pins. [See this image to confirm that it has a DVI-D socket connector that won’t physically accept the analog pins (above and below the blade pin) of common DVI-to-VGA cables such as this one.]

The only other manufacturer of mini-DVI to DVI adapters I can find is Dynex. Dynex’s mini-DVI to DVI cable has a female DVI-I connector, so analog cables will physically fit, but this thread confirms that the analog signals aren’t passed. The DDC/EDID data gets through, but either there aren’t conductors for the analog signals or possibly the RAMDAC that would be generating the analog signals is somehow getting shut down.

[edit: I found another adapter at Monoprice but it also has a DVI-D connector. Monoprice also sells a mini-DVI to HMDI adapter.]

It would be nice to be able to carry around a single mini-DVI adapter that could provide both digital and analog signals. Comments?

Posted in Hardware | 5 Comments »

LazyViewport

Posted by bitguru on January 7, 2008

disclaimer: This entry isn’t intended for a general audience. If you’re not a Swing programmer, you’ll probably want to skip it.

When the user flits about in a JScrollPane, the viewport’s view repeatedly repaints to maintain the illusion that the view component is sliding. This is usually a good thing, but sometimes the view is complicated and takes a long time to paint. This can freeze the GUI or chew up too many cycles.

In those situations one might prefer a ‘lazy’ scroll pane that doesn’t repaint the view while the user is dragging the thumb of the scroll bar, but does a single repaint when the user releases the thumb. Here’s an implementation:

import javax.swing.JViewport;
import javax.swing.JScrollPane;
import java.awt.Component;
import java.awt.Point;

/**
 * a subclass of JViewport that overrides a method in order not
 * to repaint its component many times during a vertical drag
 *
 * @author Brian Cole
 */
public class LazyViewport extends JViewport {

    /**
     * equivalent to <b>new JScrollPane(view)</b> except uses a LazyViewport
     */
    public static JScrollPane createLazyScrollPaneFor(Component view) {
        LazyViewport vp = new LazyViewport();
        vp.setView(view);
        JScrollPane scrollpane = new JScrollPane();
        scrollpane.setViewport(vp);
        return scrollpane;
    }

    /**
     * overridden to not repaint during during a vertical drag
     */
    public void setViewPosition(Point p) {
        Component parent = getParent();
        if ( parent instanceof JScrollPane &&
             ((JScrollPane)parent).getVerticalScrollBar().getValueIsAdjusting() ) {
            // value is adjusting, skip repaint
            return;
        }
        super.setViewPosition(p);
    }

    private static final long serialVersionUID = 2006L;
}

This has been implentated to be lazy only when scrolling up and down, which is usually what I want. It would be simple to extend it to make horizontal scrolling lazy also.

 

Posted in Java, Swing | Leave a Comment »

Eee PC

Posted by bitguru on January 4, 2008

I guess this is old news, but just today I discovered the ASUS Eee PC. The image shows one on top of a 13″ MacBook. A tiny PC isn’t all that remarkable these days, but one with a tiny price is. Supposedly it is or was possible to pick up one of these for US$250, which is low enough to be tempting. (Best Buy seems to be selling them for US$400, which is less so.)

That buys you a 2-pound machine with a 7″ 800×480 screen, a 900MHz Celeron processor underclocked at 630Mhz, 3 hours of battery life, 0.5 GB RAM, 4 GB solid-state hard drive, and 802.11b/g running Xandros Linux.

In most of the pictures I’ve seen it’s hard to get a good sense of how small this thing is, so I’ve tracked down a few.

There are rumors of an impending Apple subnotebook due in two weeks or so. I didn’t think I was interested, but if it’s close to the Eee PC in size and price (unlikely) I’ll have to reconsider.

[update: The new MacBook Air is very thin but is otherwise the same size as the regular MacBook. It also costs US$1800.]

Posted in Hardware | Leave a Comment »