Just Us

Dirty Diapers and Life…

Funny Error

November28

This morning I was messing around with NTP on my machines as I noticed all my systems were out of sync.  For some reason I completely forgot to configure NTP on all my Linux boxen.  So shortly after doing this I noticed my e-mail died.  After a little bit I noticed Alpine was displaying an error; it couldn’t connect to my IMAP server.  A quick look in the logs found this amusing error from my dovecot IMAP server:

Warning: Last died with error (see error log for more information):
Time just moved backwards by 29 seconds.
This might cause a lot of problems, so I'll just kill myself now.

http://wiki.dovecot.org/TimeMovedBackwards

Tales under Wine in Linux

July21

Back a long, long time ago, when computers had very little processing power and the idea of upgrading ones video card meant increasing your display from CGA to EGA or even VGA, adventure gaming was at the peak of it’s popularity.  As computers grew faster, video cards rendered in real-time and sound capabilities “blasted away the sound barrier”, PC gaming gave way to first person shooters and MMORPGs and the adventure game was almost forgotten.

There have been some attempts at reviving this long lost genre with such incredible games as The Longest Journey and it’s sequal, DreamFall, or Runaway: A Road Adventure and Siberia.  These were, and still are, great adventure games.  However, no major game publishers have released anything of significance in almost 10 years.  That is until the revival of the Monkey Island franchise.  Lucasarts teamed up with Telltale Games and released the next installment of Monkey Island, Tales of Monkey Island.  Lucasarts also made a, so I’ve heard, fantastic, remake of the original cult classic, The Secret of Monkey Island, which I have yet to replay.

So now on to the other part of this topic, Wine and Linux.  Windows and I do not mix, thus, I no don’t bother wasting my money and the hours of my life installing, fixing and maintaining a Windows installation.  However, when I heard Tales of Monkey Island was coming out I was tempted to toss an install on my system.  So I did.  This lasted about a week before dying.  So I figured I’d try ToMI under Wine in Linux.  I had little hope but lo and behold it worked almost without a hitch.  The version of wine I was running at the time was 1.1.25.  It installed fine but refused to register.  My laptop was running 1.0.1 of wine, it installed and registered fine on there.  So I copied the registry over to the desktop system running 1.1.25 and it worked.  One last problem was I was stuck in 1024×768 resolution.  Attempting to change resolutions caused the game to crash.  I started playing in this mode, as it’s not horrible, but after a quick search discovered a patch for Wine to fix the resolution.  So I pulled the latest sources from the git repository and let it compile with the defaults.  I needed to run ‘apt-get build-deps wine’ in Ubuntu Jaunty to allow gcc to build 32bit binaries on my 64bit system.  I also found that the latest git repositories had the patch included.

So I let it compile, after a good 30 minutes it finished.  I fired ToMI up under this new Wine and voila, everything works beautifully.  I spent some time this evening relaxing infront of a new Monkey Island game and have been enjoying every minute of it.  What a fantastic game this far!

Aside from an odd looking version of Guybrush, I still consider the Guybrush from Curse of MI to be the best, Dominic Armando reprises his roll of Guybrush and does an excellent job as usual.  Telltale did a fantastic job of capturing the Monkey Island feel from the prior games as well.  I also heard that, while not on the payroll, Ron Gilbert (original Monkey Island creator) lent a hand in the production of the game.

Definitely worth my $35.  I am so far more than happy and can’t wait to game some more tomorrow evening.

Reseting an iPod in Linux

July12

I received a free 4th Gen 20GB iPod some time ago and shortly after the hard drive failed.  I let it sit for some time and I just recently broke down and put an 8GB flash card in it.  However, I have no OS X or Windows.  I couldn’t get iTunes to work in Linux.  I actually came across someone elses blog detailing this but I didn’t bookmark it and can’t locate it.

If you have a fresh drive or flash card it needs to be partitioned correctly.  It needs a roughly 30MB primary partition of type ‘empty’, ’0′ if using fdisk.  Then the second partition needs to be FAT32.  Download the appropriate firmware from here: http://www.felixbruns.de/iPod/firmware/.  The firmware file, regardless of it’s extension is zipped.  Before we do anything, unzip it.  I used the 4th gen iPod firmware so it was along these lines:

# unzip iPod_10.3.1.1.ipsw

What you’ll be left with is ‘Firmware-10.3.1.1′ and ‘manifest.plist’.  We don’t need the package list for this, we are only interested in the firmware.

An empty iPod will default itself to disk mode when plugged in via USB.  So plug in the iPod and, if it’s not configured in fstab to mount, check, via dmesg, which dev device it was assigned.  On my system it gets assigned as sdc.  Now we will use the diskdump utility, ‘dd’, to dump the firmware on to the iPod’s first “empty” partition:

# dd if=Firmware-10.3.1.1 of=/dev/sdc1

Once this is done, unmount sdc2 if it was mounted automatically and unplug the iPod.  It will now reboot in to the new OS.  If you have a 2nd, 3rd, or 4th gen original iPod you will need the wall outlet power adapter to complete the upgrade.

This should also work for 3rd party firmware such as iPod Linux and Rockbox.

posted under Technology | No Comments »

Setting up Renegade with NetFoss for Telnet under XP

May20

Back in the day I ran a BBS using Renegade BBS software.  I’ve been trying over time to  get this running again.  There are quite a few updated BBSs out there that support Linux and telnet services out of the box; however, I want to get my original BBS running again.  I also have a soft spot for Renegade.

After numerous attempts using dosemu under Linux, WINE, VMware running FreeDOS and implementing my own virtual modem service written in Perl but I just couldn’t get things working right.  As it turns out there’s this nifty set of programs that are part of NetFoss.  NetFoss itself is a fossil driver (communication driver talks between BBS software and modem) but also includes a complete telnet server as well for handling telnet communication with the BBS.  However, this is designed for Windows XP.  So I decided to throw a quick XP install in to a VM and fire this all up.

Please note, to the best of my knowledge this does not work in 64bit Windows XP or IIRC, Vista.  It requires the 16bit NT Virtual Dos Machine (NTVDM), included in XP (and WINE) only under 32bit implementations.

The Windows XP system is running under VMware Server 2.0 on an Ubuntu Server 8.04.2 LTS Linux installation.  The hardware is fairly old, Athlon XP 1700+ w/ 1.5GB of RAM.  I gave the VM 256MB of RAM and 4GB of hard drive space.  Everything appears to run quite well.  Especially considering the server itself is already handling quite a few other tasks.

Documentation is pretty much non-existent for this so I am documenting this for myself and others. It’s very rough and by no means 100% complete. My goal is to be able to easily get a Renegade BBS running over telnet and work with a number of common doors.

Start by downloading the renegade package which includes NetFoss:

http://renegade.bigbig.com/rgv100f.zip

Unzip it and run the installer. This will create the basic BBS structure. Next, copy C:rgnetfossnetfoss.dll c:windowssystem32. Please, replace ‘rg’ and ‘windows’ with your actual paths. The next thing to do is make the necessary changes to the ‘net2bbs.ini’ and ‘nf.bat’ files.

Use the sample net2bbs.ini they give you and alter it to the following:

     [Settings]
     Command=c:rgnetfossnf.bat /n*N /h*H c:rgrenegade -n*N -Q -B115200
     StartPath=c:rg
     Port=23
     Nodes=256
     StartNode=1
     Debug=1
     View=Normal
     Log=net2bbs.log
     Semaphore=wait.sem
     KillList=kill.txt
     KillMsg=You are not welcome here.
     KillMsgFile=goaway.ans
     Editor=notepad.exe
     Resolve=1
     ResolveMsg=Resolving your IP Address, One moment...

They key change here is the ‘Command=’ and ‘StartPath’ lines. Change those to your Renegade paths. Then we specify the node ‘-n*N’, ‘-Q’ to tell Renegade to quit after the connection is gone and ‘-B115200′ to set the baud rate.

Now the ‘nf.bat’ file needs a couple of minor changes. First add ‘%1′ to the first netfoss line and change all the paths. I used the default ‘rg’ path with my install and the file looks like this:

@echo off
c:rgnetfossnetfoss.com %1
rem ** If running a non-door32.sys system, add a " %1" to end of above line **
if errorlevel 1 goto end
c:rgnetfossnetcom.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
c:rgnetfossnetfoss.com /u
:end

Okay, we’re all set. Run ‘net2bbs.exe’, make sure port 23 isn’t firewalled and attempt to connect to it. You should see the connection being made in the dos window.  Once the connection is successfully made another dos window will appear with the BBS running in it.

A basic Renegade BBS has now been started. Have fun configuring the rest of the system!

On a side note, Linux, Mac OS X and Windows don’t include very good ANSI terminals.  I came across this excellent one written for all 3 operating systems as well as a few other popular ones that handles ANSI emulation beautifully as well as being fully featured and it reminds me of the old school dialer terminals from the 80s.

SyncTERM

And I created a simple mirror on my BBS server here:

SyncTERM Mirror

This does a near perfect emulation and can run in full-screen mode as well.  I highly, highly recommend this.

posted under Technology | 5 Comments »

Upgrading Amarok 2 to 1.4

May5

I recently upgraded most of my Ubuntu boxen from 8.10 Intrepid to the latest 9.04  Jaunty.  The upgrades all went great minus some Xorg stuff on my laptop which was quickly resolved.  I did find one large drawback…  Amarok 2.0.  I’ve been using Amarok 1.4 for quite some time and it’s an awesome piece of software.  When I fired Amarok 2.0, first on my older laptop, that took some time, I was quite underwhelmed.  Anyway, Amarok 2.0 is nothing like it’s predecessor in anyway whatsoever.  So I tried different media players from rhythembox, to songbird, to a bunch of smaller ones.  I did find one called minirok which was a stripped down Amarok 1.4 and settled on that for a while.  Finally, I decided to try and install Amarok 1.4 and got it working.  After some searching around and what-not here is how it’s done.

First, start by removing Amarok 2.0:

# apt-get remove amarok

Next we need to add a new repository to our sources:

# cat <<EOF>>/etc/apt/sources.list
deb http://ppa.launchpad.net/bogdanb/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/bogdanb/ppa/ubuntu jaunty main
EOF

And lets make sure we get the proper key for these repositories:

# cat <<EOF|apt-key add -
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.0.10

mI0ESZG9dwEEAM5SRxksQzjok7uw93gEWMGT+89fLoKA5ij0FCn9mmMhJAgJeh3LTO6W9B9J
9wQNUPp+vzuP1Nib+/ZuiC8eB5J73ITdm/7o+zXwuX/KEeGBkvlb9/IeS4X3Sy4p5dWResuP
ZIP/VFrC/lMIO4J6/3IJld3jv8eQXm4q1DDY4PtNABEBAAG0IExhdW5jaHBhZCBQUEEgZm9y
IEJvZ2RhbiBCdXRuYXJ1iLYEEwECACAFAkmRvXcCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRC58cQyrnSuY5g0A/9a/9Xds26+egxE+7j4e5ycRjgpSXe4oABBAqQ+SuMxr+OcCb8i
NRtJzUuxn4uGigc10DDinqfZlFhl13iLdQmypEPXVzeUIbvS/STHJKU/gu1Il4IRX+3FDDsG
WPgh0PQaCjXdCsMd9oka+4lgW95qKsOTihoLwvvx+ozAozAG0g==
=j5d9
-----END PGP PUBLIC KEY BLOCK-----
EOF

Now it’s time to update and install:

# apt-get update
# apt-get install amarok14

After a few moments it’ll be added back to your menu and you’re all ready to rediscover your music all over again!  Enjoy!

posted under Technology | No Comments »

Froggix 1.0

March30

So in my spare time I decided to tackle another fun project to brush up my programming skills.  It had been a bit of time since I had done some C work so I decided to tackle SDL and C by creating a clone of the classic Frogger designed to run in Linux, titled Froggix.

This is a first rough “release” of sorts.  All of the basic game play is there.  You can dodge cars, ride logs and turtles, reach the goal and advance levels with increasing difficulty.  There is a lot that is not implemented as well as a number of bugs.  Since this is really a work in progress please bear with me.  I know there’s no game over screen, the score flickers and in the Win32 compile there’s no score at all displayed and when you get the frog in a goal there’s no indication aside from the happy frog — oh and after starting a new game some variables such as the frogs in the goals don’t get reset, the free life doesn’t get reset and the speed of the first row of cars never resets on a new game either.  I am sure this is a short list of bugs.

As far as yet-to-be-implemented, there is no snake, alligators, badgers or flies.  I also need to improve some of the game play.  Frogger is very sensitive to cars, if he gets anywhere near one he dies, but as far as jumping on turtles and logs, he can have a toe on the edge of the log and be safe.  So there is work yet to do.  There is also no 2 player mode, regardless of what the title screen says.  There is also a fair amount of information being dumped to STDOUT and STDERR that can safely ignored.

The Windows version runs in XP under VMware, that is as far as my testing went.  It was compiled using mingw cross compile libraries on an Ubuntu 8.10 system.  There is also no Windows installer for Froggix.  Just unzip it and double click on ‘froggix.exe’.  Windows includes all the necessary SDL libraries, which is why the binary download is much larger than the Linux version.

If compiling from source a simple, ./configure && make will do the trick.  You do need the SDL libraries as well as SDL_image, SDL_ttf and SDL_mixer.  Also move ~/src/froggix up one directory so it finds it’s sounds, fonts and graphics.  There is a warning while compiling about ‘VERSION’ being declared twice, this can be safely ignored.  If compiling for Windows, using the convieniently included ‘cross-configure.sh’ and ‘cross-make.sh’ should do the trick if the mingw and SDL environments for cross compiling are in place.  I have never compiled this directly under Windows, but I would assume the same environment in cygwin is necessary.

Everything is rough around the edges on this release, even the method I’m releasing.  But please feel free to comment or e-mail me.

The screen shots in this post are all taken from the Linux version of the game.  The only major difference with the Win32 release is the lack of the score being displayed; score is being kept in the background.

I would consider porting this to MacOS X but my only access to a OS X system is via really, really old 400MHz G3 system that after a few days of compiling never was able to get a fully development environment built.  One day I’ll try and tackle this again.

Btw, this post is the docs for the project thus far.  That’s weak, I know.  Here are the files:

Linux Binary:

froggix-bin-1.0.tar.gz MD5: 5dc8a489bff00fc7227ad489dfda9d90

Windows Binary:

froggix-win32-1.0.zip MD5: 07cb1e398cb93399e7dafa962567bb1a

Source:

froggix-src-1.0.tar.gz MD5: a30cdc6f0b2346a91d066a3e29b305fd

posted under Programming | 1 Comment »

Connor on IRC

March9

I left my computer unattended and Connor decides to chat on IRC.  (Geryon is my handle)

19:36 <@Geryon> ++//;;;[]3333333333333333333333
19:36 <@Geryon> ...00000
19:36 <@Geryon> .
19:36 <@opcenter> what was that? :)
19:37 < brent____> connor
19:37 < brent____> he gets to the keyboard sometimes
19:39 < jarv> heh
19:50 <@opcenter> nice :) 

As our friend Brent put it, kid is on IRC before learning to talk!

Gimp Plug-in for Guides

January26

I am currently working on a small OpenGL program for my son to play with.  In the course of writing this I came across some issues with my textures.  I ended up with quite a few textures, each in it’s own file.  Management and load times were hindered by this.  So taking a recommendation given to me I combined them all in to a few texture maps instead.  Dealing with these maps is a lot easier if each “cell” is the same size or X sells combined for a single texture.  The images are quite large and I needed to create a ton of guide lines in GIMP to handle this.  It’s a PITA to go and create each individual one for each texture map so I ended up creating a small GIMP Script-Fu plug-in to generate these guidelines for me.

It works very simply by taking two parameters, Horizontal/Vertical lines and the distance to space them apart.  It’s now a world easier to manage each individual texture within the larger texture map file.

It’s simple to install. Download the file:

guides-every-x-pixel.scm

And copy it to ‘~/gimp-2.x/scripts’.  This will automatically be picked up by GIMP when it’s started or if it’s already running the scripts can be refreshed form the GIMP menus, ‘Filters’->’Script-Fu’->’Refresh Scripts’.

To access the script, from the GIMP menus ‘Image’->’Guides’->’New Guides Every X Pixels’.  The dialog will appear and you’re all set.

I also have this posted on the GIMP plug-in registry here:

http://registry.gimp.org/node/13774

PerlMan!

January19

PerlMan is a Pac-Man clone I started to write back in late 2006 in my spare time.  I was interested in learning SDL Perl and interested in writing a game.  So I figured I would tackle Pac-Man as it hits on a number of classic gaming styles.  Character collision detection, environment collision and basic AI.

Unfortunately the code is slow.  I am not certain I am doing the collision detection quite right, it works but eats up the processor.  I am having difficulty keeping the speed steady and the AI for the ghosts seem CPU intensive and extremely poor.  I also don’t think I quite implemented the maze properly.  I am not a game programmer and tackled this without reading up on anything except for SDL Perl use.

There is a ton of debugging information available, in the code included at the end of this post I have it disabled.  It can be enabled from within the code easily and each debugging option is documented.

As of right now there are no power pellets and actually no way for a ghost to ‘kill’ Perlman; they’ll just pass through each other.  Also the warp tunnels are not implemented allowing Perlman to wander off the screen.

I would like to eventually spend some more time on this and get it working well enough to play.  For now this is what I have.

To run the game all that is needed is Perl, which all major Linux distributions include and the SDL Perl bindings.  For Debian-based distros (Ubuntu) ‘apt-get install libsdl-perl’ will do the trick.  This should also run in OS X and Windows with the proper Perl environments.  I have neither of those to test on though.

perlman-011909.tar.bz2 MD5: 95406e07b847bd8da117d5cc60541c14
perlman-011909.tar.gz MD5: 84a47b9e32f7749cb5756da19f92b302
perlman-011909.zip MD5: d8cf5157ae934b5bb2da14bcfb092ff3

The Funnies

December28

Each morning I read the comics.  Since I don’t get the newspaper every day I generally would view them online.  However, each comic is on a different page and I would have a list of bookmarks for my favorite strips.  To make it easier I wrote up a small Perl script that reads a configuration file and uses that to fetch the comic strip off the website.  The script was mostly written during my spare time at work and was never meant to be ran by anyone but myself.  So I apologize for some sloppy code that lacks comments.  But if anyone is interested I attached the files below.

To get it running you need Perl, wget and imagemagick.  I use imagemagick to convert all the downloaded comics to JPGs since many are GIFs.  I did this because the proxy server at my old job would sometimes have difficulty with GIF images and they wouldn’t fullyl download.  The only changes that need to be made is the path that is set in ‘comics.conf’.  Then run the script and it will create directories ‘images’ and ‘indexes’.  The index file for today’s comics are stored in there.  It can be ran locally on your desktop from your home directory or on a web server.  I do both.

comics-ss

It currently supports the following comics, “Andy Capp”, “User Friendly”, “Baby Blues”, “Luann”, “For Better or for Worse”, “Dilbert”, “Garfield”, “Wizard of ID”, “Ziggy”, “Stone Soup”, “Momma”, “Rose Is Rose”, “Peanuts”, and “xkcd”.

To remove a comic simply delete or comment out the line with a ‘#’ sign.  To add more comics you will need to supply the name, website, and a regex to grab for the comic image itself to download.   So it pretty much grabs the index file for the comic, searches it with the regex and if it finds the image it fetches that image and stores it.  If there are any problems the comic index page will reflect the error.

Any feedback is welcomed and I’ll be happy to take a few requests to add comics to the configuration and post them here.

comics.tar.gz MD5: ac626845a398999e0cbbf8576fc4cca3
comicFetch    MD5: 9ce0a4de874305964367fd29b7783d55
comics.conf   MD5: 174c45258aba2a0a07f0c3dc3a2923fc
posted under Programming | 1 Comment »