Archive

Archive for the ‘Computers’ Category

I have a VAX

August 22nd, 2010 1 comment

Technically, the post title is a lie. Having such an item would be impractical for me as it would take up too much space in my tiny flatshop (a hybrid flat/workshop type thing), and would cause the disk in my electricity meter to spin so fast that it could be used for sawing wood.

What I really have is a VMS machine, which is running on a simulated VAX 3900, which in turn runs on my puny Ubuntu 10.4 Linux machine (puny as in the hardware spec is pityful).

This is achieved by using something called SIMH, which simulates all manner of old DEC hardware, a copy of the OpenVMS Hobbist Kit, some OpenVMS licenses, and a copy of Paul Wherry’s guide to getting a VAX/VMS system running under SIMH.

To get SIMH working with Ethernet support, libpcap needs to be installed. To build this, flex, bison and m4 need to be installed. So these files need to be downloaded and copied to your linux machine:

Once these are on the linux box, should be installed as per the instructions with the packages in the order: flex, bison, m4, libpcap. With these installed, SIMH can be compiled as in Paul Wherry’s guide.

Instead of placing the files in /usr/local/vax, I placed the files in /usr/local/blinkyvax, and adjusted the paths in the vax.ini file for accordingly. This is because my eventual plan is to have four virtual VAXen running in a cluster named after the four Pacman ghosts – Blinky, Pinky, Inky and Clyde).

Getting hold of the OpenVMS media can be problematic, as the only legitimate way to get them is from Montagar Software for $30. Luckily, i was given the disks by someone who couldn’t getthem to work.

The easiest way to get hold of the Hobbyist Licenses is to go through DECUServe. To do this, telnet to eisner.decuserve.org, and login as REGISTRATION. Once this is done, you’ll be sent your membership number. This can be used, after about a week, on the Licensing page, to get your licenses. You’ll need the “OpenVMS VAX Base” and “OpenVMS Layered Products” licenses.

The SimVAX currently runs fine and can communicate with the other machines on my house network (through libpcap which wangles the ethernet card into promiscuous mode), but it cannot talk to its host machine (the one on which the simulator is actually running).

Sorting this niggle out is the next step, after which I can take another step forward in realising my dream of having my very own VMScluster.

Which sort of begs the question: Why?

Well. VAX/VMS was the second real multi-user operation system I ever got my hands on, and the first one I was actually paid to work with. Sometimes I get a little nostalgic. And then I get carried away.

As for the first multi-user OS I used, PR1MOS: there is an emulator out there, and if it ever becomes Open Source, I’ll be running that on my machine too.

Return of the Ubisurfer

August 8th, 2010 No comments

Back in January I bought a Datawind Ubisurfer,  a small netbook running Linux. You can read my first impressions of it here.

It wasn’t too bad for the price, and I used it a lot at work and whenever I was stuck on a train.

Back in May, I attempted to upgrade the software on it and it went all wrong. The internal GPRS modem refused to be recognised, the MP3 player packed it, and it stopped recognising USB memory sticks.

After a few email exchanges and a bit of confusion (two tech support people with the same name!), I finally got around to sending it back to them at the end of July.

It’s back, and this time it’s WinCE!

Firstly, some hardware specs (again):

  • Display: 7 inch TFT – Wide screen display, 800 x 480 pixels (WVGA)
  • Memory: 128MB Ram; 1GB Flash
  • Networking: Embedded Cellular Modem,Wireless LAN WiFi IEEE 802.11 b/g, 10BaseT Ethernet Interface
  • Control: Touch Mouse Pad – Dual Button,  Standard 80 Key Keyboard
  • Battery & Power: Lithium Polymer (Approximate Working Time: 3 hours), or External DC Adapter
  • Size/Weight: 222 x 165 x 29.5 m, 700 grams
  • Ports: Push-Push SD card socket, USB Port, Earphone & Ethernet jacks.

As for software, the thing is now running Windows Embedded CE 6.0 Core, which means that it goes from Off to Usable in about 7 seconds.

Softmaker Office 2008 comes pre-installed, which includes the usual suspects of a spreadsheet, wordprocessor, presentation maker and Outlook-a-like mail client.

Browsing is done with either the UbiSurfer browser, which works through the embedded cellular modem, and a somewhat restricted version of Internet Explorer 6.

The UbiSurfer browser uses a proprietory protocol to have your pages rendered on one of Datawind’s servers and then sent ina compressed form to your machine. While this was painfully bad on the Linux version, it actuall seems to work fairly well this time. Once you’ve got the think connected, which takes about 30 seconds, and loaded the home page (above), it is reasonable speedy for a cell-phone connection. While taking longer than the 7 seconds quoted in the bumph, mine loads the BBC News page in a about 10 seconds. Sometimes it can be annoying and take a while to tab between fields, but generally it works.

Using a WiFi connection and Internet Explorer gives you pretty much what you expect, but ActiveX and Flash cause problems, making Facebook and Google Mail annoying. And it constantly asks  if you really want to visit pages with outdated certificates. Pretty much par for the course with IE6.

With WiFi you can apparently also use the Chat program which I really can’t be bothered to test, and a YouTube viewer which I haven’t managed to get working yet.

There’s also a PDF viewer, general media player and ebook reader on there. They work fairly well, but the PDF reader is very slow.

Games wise you get Allure Xonix, one of those draw boxes and capture an area while avoiding bouncy things games, Tile Fall, one of those click on blocks to destroy them in the right order games, and Paint, one of those not real a game but lumped in with them games. A better menu title might have been Entertainment, but probably not.

Finally, there is a thing called Terminal, which seems to be neither use nor ornament. It seems to be written to access the on-board modem, but doesn’t seem to work. Neither does it support Telnet, which is a bit of a pain in the arse.

All in all, and it pains me to say this, the Windows CE version is miles better that the older Linux version. It’s actually usable for a start. Apart from the lack of a telnet client, obviously.

UPDATE:

The telnet problem is now solved, by installing PocketPuTTY.

Download “PocketPuTTY 2007-02-28 dev build for PPC2002 (release)” from the PocketPuTTY Downloads page, and copy the putty.exe file from the archive to your device. Either dump it on the desktop or put it somewhere else and create a shortcut to it.

Genesis of the Arduino Dalek

July 24th, 2010 No comments

As previously mentioned here, I was recently given a broken toy Dalek, which I promptly took apart (in the name of Science).

Here it is before surgery commenced…

Having stripped the thing down, I found inside two perfectly good electric motors, and when you find two working motors inside a toy there is only one thing to do: Work out how to use a computer to control them!

So, figuring out that the easiest way of doing this was with an Arduino, I bought one.

I won’t bleat on about how good the Arduino is, or how easy it is to use. There are hundreds of sites that do that.

Instead, here is a list of things wot i dun to get a PC controlling the Dalek.

To start with, I think we’ll have a bit of circuit design. Below is a simple circuit that takes 2 inputs from the Arduino and runs a motor either forwards or backwards. One input decides the direction of the motor, the other whether it is on or off.

All very nice and abstract, but to be of any use it’ll need to be built. The quickest and easiest way is on Veroboard. So here is the design for that:

The relays do the switching, and the diodes are there to protect the Arduino from back-emf currents when the relays toggle. Two of these circuits will be used, one for each motor. I built them on separate strips of board to make things easier for myself. This is what they look like when all connected up and dumped onto the Dalek chassis:

The small board in the top left of the picture is just a plug I bodged up to make connecting the thing easier.

The parts used are 4x 1A5VDC DPDT relays, 4x 1N4004 diodes, a 10×39 strip of Veroboard and some wires.

After all that soldering and burning my fingers, the next step is to write some code to make the thing move.

Each motor can be controlled to go backwards, forwards or stop. This gives nine possible movements, as this table shows:

And now its time to test this whole think by writing a program that takes keyboard commands (the letters in red, above) and sending signals to the circuitry to control the motors. Heres it is:

// Project: Dalek control system
// Version 0.1 - Written before my Arduino even arrived
// Tony Blews tony@tonyblews.co.uk

int MotorDirectionR = 10;
int MotorDirectionL = 11;
int MotorPowerR     = 12;
int MotorPowerL     = 13;

void setup()
{
 pinMode(MotorDirectionR, OUTPUT);
 pinMode(MotorDirectionL, OUTPUT);
 pinMode(MotorPowerR, OUTPUT);
 pinMode(MotorPowerL, OUTPUT);

 Serial.begin(9600);
 Serial.println("Serial control Dalek system starting...");

}

// modes for the motor control
// convention here is modeXX - where X is F for forward, S for stationary and B for backwards
// first X is the left motor, second X is the right one
// for direction control, the LOW if forward and HIGH is backward
// for power control, LOW is off and HIGH is on

// all stop
void modeSS()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,LOW);
 digitalWrite(MotorPowerL,LOW);
}

// move straight ahead
void modeFF()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

// move straight backwards
void modeBB()
{
 digitalWrite(MotorDirectionR, HIGH);
 digitalWrite(MotorDirectionL, HIGH);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

// spin left
void modeBF()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, HIGH);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

//spin right
void modeFB()
{
 digitalWrite(MotorDirectionR, HIGH);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

// move forward left
void modeSF()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,LOW);
}

// move forward right
void modeFS()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,LOW);
 digitalWrite(MotorPowerL,HIGH);
}

// move backward left
void modeSB()
{
 digitalWrite(MotorDirectionR, HIGH);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,LOW);
}

// move backward right
void modeBS()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, HIGH);
 digitalWrite(MotorPowerR,LOW);
 digitalWrite(MotorPowerL,HIGH);
}

//main program loop
void loop()
{
 if (Serial.available() >0)
 {
 char inByte = Serial.read();
 // this version uses the QWEASDZXC "square" on the keyboard
 // as my laptop doesn't have a numeric keypad
 switch (inByte)
 {
 case 'q':
 modeSF();
 break;
 case 'w':
 modeFF();
 break;
 case 'e':
 modeFS();
 break;
 case 'a':
 modeBF();
 break;
 case 's':
 modeSS();
 break;
 case 'd':
 modeFB();
 break;
 case 'z':
 modeBS();
 break;
 case 'x':
 modeBB();
 break;
 case 'c':
 modeSB();
 break;
 default:
 modeSS();
 break;
 }
 }
}

And with that done, I suppose all that is left to do is show a video of the bottom bit of the dalek trundling around under computer control…

… which have to wait until the next post.

It disappears down into the bottomless pit…

June 22nd, 2010 1 comment

It disappears down into the bottomless pit…

Back in 1990, that could have summed up my computing degree, but it was the response you got when dropping items into the sacrificial pit on AberMUD.

AberMUD was a Multi User Dungeon written (mainly) by Alan Cox, long before he started doing bits with Linux.

If you don’t remember AberMUD, then you won’t want to bother reading any further. But if you do recall it, then prepare to rejoice.

I’ve located a copy of the sources that will compile under Linux, and got it running.

If you want to play it, SSH or TELNET to recondite.dyndns-free.com and login with the username mud and password mud

I’ve had to take Telnet access off, so now you’ll need some form of SSH client such as Putty, or use the web-based ConsoleFish.

Categories: Computers, Games, Links, Mud Tags: , ,

Turning a ViaMichelin SatNav into a Media Player

June 9th, 2010 No comments

ViaMichelin X-950

How do you turn a £20 quid satnav, bought from the local Steptoe and Son, into a pocket media player? Well, I’ll show you.

The aforementioned ViaMichelin X-950 runs Windows CE 4.2 Core as its base OS, with the GPS and mapping software running on top of that.

What we need is to stop it running the the mapping software automatically, but leave it on there with an option to run it.

To do this you’ll need the driver disk that can with the unit. ActiveSync alone won’t suffice here, and anyway it has to be ActiveSync 3.8 as later versions won’t work correctly (especially with WinXP SP3).

So install the software, fire up ActiveSync and connect the unit with a USB cable.

Next you’ll need to download the file at http://www.gpspassion.com/download/custVM_GpsPasSion_buddy.zip and extract it somewhere (to your desktop will do).

Run the custVM_GpsPasSion_buddy.exe program and follow the onscreen prompts. Answer Next/Yes/OK until its done.

Now unplug the satnav from the USB and reset it using the button on the back.

Click the OK box on the screen twice to install both software items, and then wait for the thing to reset itself. It should now look like this:

Win CE Screen

Next you’ll want to download http://hautil.free.fr/bm/ScreenRotate.zip, and copy the files in it to \Program Files\ScreenRotate. Running that program will, surprisingly, rotate the screen through 90 degrees.

Using Windows Explorer, find the file \Program Files\ScreenRotate\ScreenRotate.exe and create a Destktop short cut (File -> Send to -> Desktop as Shortcut).

Next you’ll need to run \My Documents\CustoVM\RegEdit.exe and change some settings.

Change the value of HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Control \ Power \ Timeouts \ BattSuspendTimeOut to be 2700 (which is 45 minutes).

By now you’ll be wondering where the WinCE control bar is, and how to input data. Well if you tap the very bottom edge of the screen near the plastic, the control bar will appear, and from here you can enable the on screen keyboard.

So far you should have a machine that boots into Win CE and has a video player (CORE) installed, and the mapping system still available (as an icon on the desktop called MapSonic.

You’ll be wanting an image viewer too, so download the file http://hp.vector.co.jp/authors/VA003011/gqe/gq151hpce.zip and extract it somewhere on your PC. The copy the files from the ARM directory to \Program Files\GQ and create a desktop shortcut.

And there you have it. Copy some sound files, JPGs and videos onto the thing and away you go.

You want a demo? Oh go on.





(The song “Happy Birthday Tony” is (c) Crackerwax 2008)

This info was gleaned from http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=57135 but that is in French, and this isn’t.