This is my personal blog. I also have a professional blog at http://siliconsparrow.com/

17 December 2008

Simple Slide Show is now open source

Filed under: General — adam @ 10:00 pm

I’ve taken that old Simple Slide Show program I wrote years ago and given it a bit of a brush-up. I also changed the licensing so it is open source.

As a bonus, I have added a new feature to allow you to customise the colour and font used in the image captions.

You could use the source code from this to make your own more fully-featured slide show application, or just use it as example code for writing whatever. I hope you find it useful.

CLICK HERE to go to the download page. It’s free!


9 December 2008

Linux is amazingly useful

Filed under: General — adam @ 4:04 pm

It’s incredible the things you can do in Linux. Here’s two amazing things I’ve done today:

Amazing thing #1

I had a corrupted disk and I wanted to run some recovery tools on it but to be safe, I wanted work with a copy of the corrupted disk. So I created a raw copy of the entire disk and piped it to a different machine which had enough storage:

cat /dev/hda1 | netcat -q 1 192.168.0.15 9998

That created a file of 1128GB in size – probably the single biggest file I’ve ever created. It took more than 12 hours to copy to the other machine!

Then I created a loopback device so the system could pretend the file was a real disk:

losetup /dev/loop0 /home/adam/recovery.raw

Then I ran xfs_repair on it and recovered all the files. In the old days I would have to physically install a second hard drive in the corrupted box – did I mention that I did all this remotely from off-site through an ssh session.

Amazing thing #2

I needed to find all the Makefiles for an older version of my projects and update them. This command searches through a bunch of folders for files which contain the string “1.6″ and loads them all up in a text editor for me. It sure beats manually going through dozens of folders and eyeballing every file.

find /usr/src -name Makefile | xargs grep -l "1.6" | xargs kate

7 December 2008

Networked Warcraft II under DOSBox

Filed under: Nerd Notes — adam @ 8:36 pm

This is a guest post contributed by Richard Geoffrion. Thanks for sending this Richard, I hope others will find it useful!


First off, thank you so much, Adam, for the primer on getting Warcraft II working under DOSBOX. The “-t cdrom” option was the piece I was missing to get my game to recognize the CD and work.

After I installed my game, I wound up copying my entire Warcraft II CD to my C:\DOSGAMES\WAR2 directory, then I added “mount d c:\dosgames\war2 -t cdrom” to the [autoexec] section. By copying the CD to the same path as the installed game, I don’t have to duplicate the space to hold the files from the CDROM.

As for playing multiplayer Warcraft II in DOSBOX, it could not be made any easier. There is NOTHING that the user has to configure in Microsoft Windows (or Linux…or OSX) to get IPX gaming working under DOSBOX. The DOSBOX team has built an IPX wrapper right into DOSBOX. Once the Warcraft II game is operational on two or more computers on your network you are ready to setup networking in DOSBOX.

Instructions:
1) Identify the IP addresses or names of each computer that will be participating in the gaming session. (Windows users: To display the computer’s IP address click START, click RUN, type in “cmd” and click the OK button. At the prompt, type in the command ipconfig and press enter. Write down or remember the number on the IP ADDRESS line. If you want to know the name of the computer, you can type in the command ”hostname” and press enter to see the name.) (Linux/OSX users: run ifconfig from a terminal (you may have to sudo the command or su to root)

2) Once you have identified all of the IP addresses (or names) of the computers on your network that will be playing the game, pick one to designate as your IPX SERVER.

3) *OPTIONAL STEP* Sometimes the Microsoft Windows firewall is turned on and it could interfere with proper communications between the client and the server. If you want to run a test to make sure that everyone can connect to your server, then go to each computer that will be connecting to your designated server and start a windows command prompt. Once the prompt is open, use the ping command along with the IP address of the server -OR- the server computer’s name to make sure that the server can respond to the clients. [Example: " ping 192.168.1.100 " -or- " ping HP-PAV6330 " ]

4) Start DOSBOX on your designated server. Run the DOSBOX command:

ipxnet startserver

That is IT!! That is ALL YOU NEED TO DO on the server! It is THAT SIMPLE!

–we’re almost done!–

5) Now start DOSBOX on each client computer that will be joining in the multiplayer fun. Once DOSBOX is running we will be using the DOSBOX command ‘IPXNET CONNECT’ but we’ll be adding something to it. We will either add the IP address of the server or the name. If we were to use the IP address or name from the examples in the optional step 3, our DOSBOX command might look something like this:

C:\> IPXNET CONNECT 192.168.1.100

-OR-

C:\> IPXNET CONNECT HP-PAV6330

At this point, DOSBOX will handle wrapping the IPX packets in TCP/IP.

6) Start WAR2 on the server, Select Multiplayer, select the IPX Network connection method and
click CONNECT then CREATE GAME.

7) Start War2 on each client, Select Multiplayer, select the IPX Network connection method and click CONNECT then JOIN GAME.

8) Begin your game and race your peons out to the unclaimed gold mines to put walls around them to protect them from any players..especially computer players. Oh..wait….that doesn’t belong in this set of instructions! Now who let that slip by quality control?!!?

NOTE 1: It *IS* possible to play WARCRAFT II with a friend across the internet. The variety of the additional steps needed are a bit beyond anyone’s ability to document in a single document but I can briefly outline the requirements below.

A) The gamer who will be the server ( the server user) will have to know their real-world public IP address. If you don’t know your public IP address, you can visit a site that displays your public IP address. A google search on finding your public IP will reveal many. http://www.whatismyip.com is one. [#]

B) If the server user is behind a router/firewall, then the server user will also need to..

*) know their private IP address. This is the IP address that was discovered in the ‘ipconfig’ command from step 1 above.

*) configure their router/firewall to forward the UDP port 213 –DOSBOX IPX WRAPPER traffic– from their external interface to UDP port 213 on the private IP Address of the computer that is the DOSBOX IPX server.

Note 2: The DOSBOX command ” IPXNET help ” will display a list of available networking commands and a small bit of documentation — like the fact that the DEFAULT port for the IPX wrapper in DOSBOX is UDP port 213

Note 3: These same networking steps should work for any IPX DOS game that runs in DOSBOX. These steps have been successfully tested with “One Must Fall”. [Google omf21cd.zip to download this free game.]

[#] Please avoid http://moanmyip.com if you are ..oh I don’t know… at work setting up for a Christmas LAN party! Of course using that link as a secondary browser-start-up-home-page can be fun.

Happy Retro-Gaming!


Powered by WordPress