HxC Floppy Emulator on Nokia N800

25th October 2012

Files

-rwxr-xr-x 1 lex lex 428857 2012-10-25 14:02 hxcfloppyemulator (a dynamically-compiled binary, with debugging symbols)
-rwxr-xr-x 1 lex lex 381360 2012-10-25 14:02 hxcfloppyemulator.stripped
-rw-r--r-- 1 lex lex    395 2012-10-25 15:26 listing.txt (a listing of usr_local.tar.gz, showing that it contains libftdi)
-rw-r--r-- 1 lex lex    301 2012-10-25 15:37 md5sums.txt MD5SUMS for these files
-rw-r--r-- 1 lex lex  62048 2012-10-25 15:23 libftdi (unpacks in / and puts files in /usr/local)

md5sums:
c75a10e9f552b7c37d9934e405f2c051  hxcfloppyemulator
d441458333fb81c4c3fb7db9b3ac4495  hxcfloppyemulator.stripped
d595fb523dfd5e3d931a9f6ce9fb2b5d  listing.txt
f5695d3198e7f3d147ffe172ac78aca0  usr_local.tar.gz

Description

This is a port of the Linux commandline version of the USB HxC Floppy Emulator, to the Nokia N800. I compiled this with the Debian gcc toolchain and used the standard optimisation level '-O3'. I did not use Scratchbox. I perhaps should have done - and may well do - but it's a hassle to set up. Instead, I am using Qole's Debian Chroot ('debchroot') system, as described on the Internet Tablet Talk forum (warning: that thread is very long).

I note that Qole has posted updates since I installed my version, so various steps may differ.

Instructions

In the Debian chroot shell, copy the hxcfloppyemulator binary to a user account (suggestion: /home/user/), su to root and
chmod +s hxcfloppyemulator [disk image]
Replace '[disk image]' with your choice of floppy disk image - e.g. workbench.adf.gz (the emulator can handle gzipped archives) or cpm2.dsk, or any other compatible format (there are many).

The app has to run as root. This makes your tablet vulnerable to any lurking bugs in the application, and may also be a security risk. As they say, 'your mileage may vary', and also 'beware of the dragon', 'do not feed the trolls'.. etc.

The compilation process

I compiled the ancient libftdi included with the floppy emulator source code, compiled libusb (0.1) and then the main emulator. Everything went smoothly, once I'd installed the libraries - don't try compiling it with non-standard library locations, cos' it's absolutely frightful. I didn't want to install any extra gubbins on the almost-full Debian filesystem that I'm using, but in the end I had to admit that this was necessary.

I am supplying the binary in a dynamically-compiled format, with and without debugging symbols. I regret that I cannot supply a statically-compiled version because to save space, I deleted the source code tree - and then having noticed what I'd done, it was too late to undo it. The binary may run in the non-chroot environment, but I have not tested it. My Nokia N800 is running Mistral and the Debian chroot runs Squeeze.

Bugs (many)

(This applies to usage on the Nokia N800/RX-34)

Crashes occasionally occur because of voltage fluctuations on the USB bus. Even with a mains adaptor plugged in, the N800 is not able to supply very much current, and it seems particularly sensitive to noise on the USB. You should probably use USB peripherals with a hub, but the tablet may crash if you plug in a hub that it doesn't 'like', and it will complain that 'USB hub [is] not supported' - but the hub will still work. A similar thing happens with peripherals, so you'll see 'USB device not supported' and 'USB filesystem not available' when plugging in a USB keyboard - but it'll work perfectly. I set it up in this sequence:

  1. Turn off the tablet
  2. Plug in the USB hub (generic 4-port Mercury hub - powered by a 'wall wart' adaptor)
  3. Power-up the tablet
  4. Select CPU 'performance mode' in Advanced Power applet
  5. Select USB 'host mode' in Advanced Power applet (various 'device not supported' messages appear)
  6. Plug in the USB keyboard and ignore any messages.
  7. Plug in the HxC USB Floppy Emulator.
  8. Start the Debian chroot from the Utilities panel, or open a terminal and type 'debbie'.
  9. cd to the dir with the floppy emulator binary
  10. ./hxcfloppyemulator interceptor.adf

When a crash occurs, the Debian chroot filesystem is left 'dirty' and it requires e2fsck to fix. e2fsck is not supplied with the Debian chroot package, but you just need to do 'apt-get e2fsprogs' to install it. It is possible that Qole added e2fsck later (unknown).

I also found a bug in the Internet Tablet OS: the tablet crashes after Wi-Fi is enabled for a long period - perhaps more than an hour. When this happened, the Debian chroot was not active.

My USB host cable has a Mini-B plug on the tablet side, and a Standard-A socket on the other (see Universal_Serial_Bus).

Another issue: when used with a USB hub, the Amiga 500's floppy light is lit, dimly, all the time. This doesn't seem to affect loading of disks. Sometimes, the USB subsystem stops working.

Occasionally, the wireless networking will go down, although the applet will show it as still connected.

I did say 'your mileage will vary', hmm?


Return to the projects area
Back to the index page