Archive for the ‘hacks’ Category

Quake1 demo recorded on the Wii

Tuesday, August 19th, 2008

I wastedspent today’s evening playing around with Quake1 which I installed on my brother’s Wii through the Homebrew channel. One cool thing that I managed to get working relatively painlessly was demo recording.

Since there is no keyboard support in Quake1 yet, I had to add the following bind to the /id1/config.cfg file on the SD card using a desktop computer:

bind "UPARROW" "disconnect; skill 3; record wii; map e1m1"

This allowed me to simply press the up arrow button on the Wii remote and Quake1 would start recording a demo of me playing the first level of the first episode on Nightmare difficulty.

So far, I haven’t been able to play the game as quickly and as precisely as I can on a computer with a mouse. Not that I’m a great Quake player to begin with. However, I still had a lot of fun, especially after I started using the Wii Zapper. It gave me a nice sensation of holding boom stick, but didn’t improve my aim.

Here is the actual demo bzip2 archive for those who really want to watch me get owned by zombies from another dimension for a few minutes. This demo should be playable with most Quake1 engines and original (full version or demo) game data from ID. I personally used Darkplaces:


.
These screenshots sort-of show that I’m shooting at stuff which is not directly under my cross-hair because of the way Wii remote look works. In the actual Wii Quake, the gun model also moves around the screen.

Lexmark E250DN IPP Printing in CUPS

Sunday, June 22nd, 2008

I just finished setting up my newly purchased monochrome duplex network printer - Lexmark E250DN. It took me a while to figure out how to configure CUPS on my GNU/Linux/Fedora machines to communicate with this printer. The problem was that I just didn’t know what URI to use for the printer. Unsurprisingly, the PDF and HTML documents that came with the printer didn’t mention such information. After all, why would Windows users need to know that if they can simply run the printer-specific utility to configure everything for them? Sheesh… Anyways. The CUPS manual was actually quite useful in listing common printer URIs. It turned out that the Lexmark URI lpd://printer-address/ps and a Generic PostScript driver worked quite well. In fact, the “/ps” part seems to be irrelevant, so simply lpd://printer.lan worked for me. However, the CUPS manual also suggested avoiding the LPD protocol if the printer supported other protocols. Using nmap I confirmed that my printer has at least something running on the IPP port (631):

$ nmap printer.lan

Starting Nmap 4.53 ( http://insecure.org ) at 2008-06-22 20:39 EDT
Interesting ports on printer.lan (10.1.1.7):
Not shown: 1705 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
79/tcp    open  finger
80/tcp    open  http
515/tcp   open  printer
631/tcp   open  ipp
5001/tcp  open  commplex-link
8000/tcp  open  http-alt
9100/tcp  open  jetdirect
10000/tcp open  snet-sensor-mgmt

Nmap done: 1 IP address (1 host up) scanned in 0.396 seconds

After a bit of trial and error, I discovered that simply using the http://printer.lan:631 or ipp://printer.lan URI and a Generic PostScript driver worked without problems with E250DN.

Apart from these initial pains I am quite happy to be able to print double-sided black-and-white documents from all of my home computers.

Side Note:

During the investigation process, I noticed that Fedora’s system-config-printer utility prints the following information to the terminal when I tell it the IPP printer hostname:

...
printer.lan: /usr/lib/cups/backend/snmp "${HOST}" 2>/dev/null
printer.lan: hp-makeuri -c "${HOST}" 2> /dev/null
No ID match for device ipp://printer.lan:
<manufacturer>Lexmark</manufacturer>
  <model>E250dn 6216N4G LE.PM.P121 -- Part Number -</model>
  <description>Lexmark E250dn 6216N4G LE.PM.P121 -- Part Number -</description>
  <commandset></commandset>
Using textonly.ppd
...

I wonder how I could get that XML-ish output myself. It doesn’t seem to come from hp-makeuri.