Monday, March 30, 2009

Falling Stuff 1.0b2

Last summer, during my annual two week vacation, I ended up starting work on a screensaver. It was a remake of an old After Dark screensaver module called Marbles, whereby marbles would fall to the bottom of the screen, only to be met with a set of large pegs. Using a bit of code I had written on a few lazy Sundays before, along with an excellent 2D Physics engine called Box2D, I was able to get a reasonable simulation up and running. It wasn't quite distributable, due to some occasional crashes, some performance issues, etc., so I never released it. Once my vacation ended, development on it slowed way down.

I recently spent a few days finishing up my screensaver project and now have something to show for. I've called it "Falling Stuff", for lack of a better name. For now, it is for MacOS X only, and only for Intel-based Macs at that, although I do have a Windows version pending (which needs polish, among other things). Also note, I have only tested this on OS X 10.5. In theory, it should run on 10.4 though.

The initial release of Falling Stuff, 1.0b2 (beta 1 was only distributed to a few friends) sports the following features:

* Pegs of two shapes
* Marbles of two shapes
* Hot falling action!
* Accelerometer-based gravity for select laptops (most MacBooks, I believe)

Ok, perhaps not much as of yet. :-) I have been thinking of adding some new features, possibly an interactive mode of some sort.

Anyways, here is a quick screenshot:

Falling Stuff 1.0b2 Screenshot

Falling Stuff 1.0b2 is available for download. If you have an Intel-based Mac, I'd love to hear what you think of it. If you have a Windows-based machine, I hope to have the Windows version out soon, although I doubt accelerometer support will be available for such, unless I can get my hands on some decent code and/or libraries to handle this.

To install, download and extract the zip file, then double click on the "Falling Stuff.saver" file. This should launch System Preferences, which'll ask if you'd like to install it. From there, you can either install it just for yourself, or for all users on the system.

Also, a readme/about file is available as well, which contains some info that wasn't covered in this post.

Sunday, December 07, 2008

Mac OS X Debugging Adventures

For the past few months, I've been spending some of my free time working on a cross-platform screensaver, one that runs under Windows and under Mac OS X. Getting the Windows version up and running was relatively easy. A Windows screensaver is just an exe with a special extension (.scr) and some code to handle a few special command line parameters. Having written Windows game code before helped there. Getting the Mac OS X version running was quite a bit trickier, due in part to my inexperience with OS X. I place some blame on OS X's screensaver engine though, which ended up being rather tricky to work with. It deals with screen savers in a very different manner than Windows' approach. OS X expects screensavers to be represented not as standalone applications, but as dynamically loadable modules, which can be loaded via one of a few different OS X-provided applications.

Every OS X screensaver module must adhere to a certain set of guidelines. Among them, they must be represented as an OS X bundle, they must provide a subclass of the OS-provided ScreenSaverView class, and they should play nice with other screensaver modules. Sounds ok, except I found the implementation of these guidelines to be a bit tricky. Why?


  1. OS X screensavers are subject to control via an external main loop, which each screensaver hooks into (for initialization, shutdown, time-stepping, drawing, etc.) This design seems ok in some ways: having no main loop to create reduces the amount of code needed for each screensaver to implement. I could see ways in which this could be easier for the beginner. In my case, there have been times that I've wanted to debug and profile portions of my screensaver logic using a main loop of my own, and without having to deal with the OS X screensaver engine.
  2. All OS X screensaver modules get loaded into the same address space. Furthermore, they get loaded in such a way that no two modules can share the same symbol names. If two modules implement a function with the same name, there's a good chance one or both of them will crash, even if only one of the two modules is actively displaying a screensaver. One solution to this is to name functions such that they don't clash, such as by appending a unique name to each function. Another solution, the one I chose to work with, is to load almost everything in a second dynamically loaded module, which gets loaded in such a way as not to cause naming clashes (via dlopen with RTLD_LOCAL.)


For the times when I want to debug or profile my app without OS X's screensaver engine getting involved, I can switch to Windows and use that version. I don't always want to switch to Windows though, so I created a small Mac app to help with debugging. It loads the platform-independent portions of the screensaver code and drives them via its own main loop, avoiding the OS X screensaver engine altogether. I recently ran into a problem with that approach though. I created the app, ran it, confirmed that it worked, then hit a case where I wanted to step into the screensaver code. When I tried to launch the app with a debugger attached, the app would immediately crash. It's main function would never get called, and I'd be stuck with a debugger command prompt and the following error message:


dyld: Library not loaded: @loader_path/../Frameworks/libBox2D.dylib
Referenced from: /Users/davidl/Documents/Code/Platformer/trunk/MacOS/build/Debug/Lugnut_Native.so
Reason: image not found
Program received signal: “SIGTRAP”.
Xcode: Introspection dylib not loaded because thread 1 has function: __dyld_dyld_fatal_error on stack


To note, Lugnut_Native.so is the current name of the shared library that contains most of my screensaver code, and libBox2D.dylib is another shared library that it depends on. "Platformer" is the original name of the project, which started out life as a 2d platformer, and eventually evolved into a screensaver having nothing to do with 2d platformers. Such is life.

The error message listed above says that my screensaver library, Lugnut_Native.so, can't load one of its dependencies, libBox2D.dylib. It's looking for it, and it can't find it.

A bit of background info: "@loader_path" is a term that has special meaning to the Mac OS X dynamic linker. When one module tries to load another module, it can use the token, "@loader_path" to indicate that the module to be loaded is located relative to the location of the module doing the loading. In this case, the module Lugnut_Native.so was trying to load another module, libBox2D.dylib, and it was trying to load it from a location relative to itself. Both modules were supposed to be located on my hard disk in locations predictably relative to each other. This is where "@loader_path" came in. It says that Lugnut_Native.so should expect that it's dependent library, libBox2D.dylib, in located spot relative to itself. The OS X dynamic linker replaces "@loader_path", with the path of the directory that Lugnut_Native.so exists in.

The problem ended up being that the wrong copy of Lugnut_Native.so was being loaded. There were two copies of the file, both getting created in the app's XCode-driven build process. The first was created by the linker. This was the copy that was getting inadvertently loaded. The second copy, the one I wanted to load, was a copy of the first placed inside the app's bundle, a location where OS X was supposed to be able to find it. In some cases, OS X would find it. If I ran the app outside of XCode, everything was ok. When I ran it from within XCode with a debugger attached, it'd crash immediately. Why would it do this?

The latter copy was the one I wanted to load. It existed inside the app's bundle. The copy that was getting loaded wasn't. When the OS X dynamic linker tried to load the incorrect copy, it was unable to find libBox2D.dylib in the specified location!

The solution I used, and there may have been several, was to tell XCode that when it launched the app, the dynamic loader should try to load dynamic libraries from a specific location, namely the directory where the desired copy of Lugnut_Native.so existed (inside the main application's bundle, to note.) It did this by making sure an environment variable called DYLD_LIBRARY_PATH was set, and that it got set before the app launched. DYLD_LIBRARY_PATH, when set, tells the OS X dynamic linker to load dynamic libraries from a given path. By setting this variable to the location where the desired copy of Lugnut_Native.so was, the dynamic linker should load it, or so I hoped at the time.

When the app crashed, it presented me with a command prompt, with which I was able to list the environment variables exposed to the app and to the dynamic linker. The command, "show environment" (without the quotes), said that DYLD_LIBRARY_PATH was already set and that it pointed to the path with the incorrect copy of Lugnut_Native.so. If there were a way to tell XCode to set DYLD_LIBRARY_PATH to something else, maybe I would be able to debug my app.

As it turns out, there was a way to set DYLD_LIBRARY_PATH before the app ran, thus making sure that the correct copy of Lugnut_Native.so would load, and thus allowing me to debug my screensaver in the manner I was hoping for. Here are the steps I took, minus most of the annoying missteps I ran into:


  1. Under the "Executables" section of the XCode project, I clicked on the app to debug, then pressed Command-I to bring up its Info dialog.
  2. Clicked on the "Arguments" tab of the dialog that came up.
  3. In the section, "Variables to be set in the environment:" section, I clicked on the plus sign to add an entry.
  4. In the new entry, I set the name to be DYLD_LIBRARY_PATH, and the value to "$SRCROOT/$CONFIGURATION_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH", without the quotes. The value here told the dynamic linker to try loading modules from the application's bundle first and foremost, which is where the correct copy of Lugnut_Native.so was to exist. Furthermore, it gives the dynamic loader a full path name, rather than a relative one. This turned out to be important. When I tried setting DYLD_LIBRARY_PATH to just, "$CONFIGURATION_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH", it didn't work, which is not what I was expecting. $CONFIGURATION_BUILD_DIR, when used elsewhere in XCode, usually resolves to a full path name. Prefixing "$SRCROOT" to this value fixed it.
  5. I closed the dialog and then launchd the app in the debugger (via XCode's "Run" menu.) It worked!


From then on in, I've been able to debug my screensaver under OS X using a main loop of my own creation, which is a bit more flexible than trying to debug the screensaver via OS X's screensaver engine. Listing the reasons why are beyond the scope of this blog posting, perhaps some other time I'll list them. Time for a break. :-)

Friday, June 20, 2008

Harvard Square WiFi

Free WiFi was recently installed in Harvard Square. Earlier today, I tried getting access to it and had a moderate amount of luck. The places I was able to get it working included:

  • in the little park just outside the Peet's Coffee on Mt. Auburn and JFK. The signal was ok there.
  • in the tea cafe adjacent to the Fire & Ice. The signal was rather spotty here; I was able to get a usable connection on one side of the cafe and not the other.

The free wifi did not work inside the Starbucks, which does provide WiFi, although it's rather expensive. It's supposed to get cheaper at some point soon. According to one Starbucks employee I talked to, 'maybe by September'. My fingers are crossed. I enjoy changing up where I work and am fortunate enough to be able to do so. Mixing the pervasiveness of Starbucks with reasonably-priced WiFi spots sounds good to me.

Monday, March 24, 2008

Building Visual C++ Apps on the Command Line

I recently started spending some time working on my laptop; in coffee shops, libraries, etc. Much of my work involves working in C++, which means that I've gotta spend time compiling. Unfortunately, my laptop is old. Running Visual C++ on this machine, which I need for much of my work, is like putting it on a treadmill turned up to high. It's ok for a while, but gets tiring awfully fast. Visual C++ on my desktop machine isn't a problem. It's got gobs of memory and a nice dual core CPU. A few days away from it has made me realize just how spoiled I've become by it.

Fortunately, Visual C++ can do builds on the command line. Editing can be done in a less memory intensive application, which in my case, means that my laptop won't have to use the hard disk when it runs out of memory, something that happens all too quick these days.

Here's how to do it, or rather, here's at least one way to do it:

First, a command prompt needs to be set up for use with the Visual C++ toolset. There are two ways to get this running:


  1. Launch a command prompt and run the batch file, vcvarsall.bat. On my laptop, this is installed to C:\Program Files\Microsoft Visual Studio 8\VC\. I installed Visual C++ 2005 to the default location. If you've got this installed, it's probably in there too.
  2. Open the "Visual Studio 2005 Command Prompt" shortcut that the Visual C++ 2005 installer creates. It's in the, "Visual Studio Tools" folder.


Once you've got a command prompt window open, CD into the directory where your .sln file exists. From there, to build all configurations (Debug, Release etc.), type in the following command:

vcbuild TheApp.sln

If you'd like to build just one project configuration, perhaps "Debug", then type in the following:

vcbuild TheApp.sln Debug

That's it! Nice and simple, no IDE required. Of course, you'll lose out on things like a debugger, or the ability to point and click your way to build management, however there are ways to do those outside of the IDE. In my case, I figure I can wait to do those when I'm at my nice and fast desktop machine, or I can just run the full Visual Studio IDE on my laptop every once in a while.

Update: More information can be found on VCBUILD here:


Update #2: Turns out VCBUILD has a problem regarding dependencies. If one use Visual Studio's Configuration Manager to set up a linker dependency for a C++ project, VCBUILD won't use that information. It'll build the projects, but will not build the projects in the correct order, nor will it pass the correct information to the linker . One workaround is to use DEVENV.EXE, which serves both as the exe for the full IDE, and as a way to build projects at a command prompt. It's a bit different than VCBUILD, and I didn't notice any way to build all configurations in a .sln, but it can be utilized to build individual ones. For example, to build the configuration, "Debug", the following can be used:

devenv.exe TheApp.sln /Build Debug

To note, this will not launch the full IDE; it will build the app, use the current console window for logging, and then exit, just like VCBUILD. No GUI will be shown.

Saturday, June 23, 2007

OLPC Game

A few weeks ago, I was fortunate enough to be able to go to a game jam run by some One Laptop Per Child (OLPC) folks. The idea of this event was to develop a game for the OLPC laptop in the span of a weekend. My entry for the jam ended up writing an implementation of Reversi, which was a lot of fun to write. Given that the OLPC laptops are designed for children, the judging of the games were done by children. At one point during the judging, one of the children came up to me and handed me a slip of paper, which his mother explained was his vote for the best game. Cool.


(I still want to write a good blood and guts game some day though, although I suspect the OLPC wouldn't be my target platform!)


The OLPC laptops, which are also called XOs, are neat. They have a built in camera, plus a screen that can be swivelled around, turning the machine into a tablet-mode of sorts. There are Playstation-esque controls on either side of the screen, which complemented the machine nicely, although I do not believe they are working in the game toolkit of choice for the XOs (Pygame). The screens also have a low-power, sunlight-friendly grayscale mode, which I think Reversi will work well in. I'll likely need to do some optimization on the game before it works well in low-poer mode.


The best part of attending this game jam was that it allowed me to develop a game that I normally wouldn't have. Almost all of my programming time these days goes into work, which I don't necessarily see as a bad thing, but it is occasionally nice to be able to work on something with a different set of goals and limitations.

Tuesday, January 02, 2007

Grrrrrrrrr

New Year's Resolution #3: Don't lose phone.

New Years Resolutions, 2007 Edition

I both hate and love New Year Resolutions. On one hand, they are often overinflated promises that tend to get broken. On the other hand, they serve as a point of self-improvement (or self-destruction, for the masochists.)

For 2007, I have one and only one resolution, which is to work out more. Biking reemerged as an interest of mine in the summer of 2006 and while it was reasonably fun, I don't enjoy it so much that I want it to be my only source of exercise. (No offense, I hope, to the local ski mafia. You all get far more exercise than I.) A gym club membership has been established (my wallet scream-eth), with my first order of business being to continue the anti-RSI exercises I was given by a local group of physical therapists.

Installing and maintaining a Linux-based workstation is under consideration as my second resolution. Work's been progressively turning me into a Windows weenie, to the point that Vista is starting to look somewhat appealing. In the grand scheme of things, this really isn't that important, however Ubuntu is starting to look nicer by the minute. If one of the various x86 virtualization products were to support GPU virtualization, at least so far as to allow me to run Direct3D apps in a virtualized environment, then these Linux-based workstation plans may be set, unless I go Mac.

Wednesday, November 29, 2006

Windows MIDI Players and Tempo Control

Since it's late and I'd rather not disturb the roommates + landlord, I am practicing on an electric bagpipe chanter.

I am on the lookout for a good midi player for Windows, something I can use to play along with MIDI versions of bagpipe tunes. Since my playing is a bit slow, and the tunes I'm looking to play have a default tempo that's way out of my league, a player with some sort of speed control is pretty much a necessity.

Here's what I've found this evening, in order:


  1. Sigma Player 1.0 - A simple freeware player supporting multiple audio formats. The interface is a bit odd, sporting all black buttons and a close button that simply says, "Close". Forgiveable, except that dragging and dropping a file onto it doesn't seem to do anything, and the "slow motion" feature that the website touted isn't variable. It's either regular speed or slow-mo, and no in-between. This is better than nothing, but not what I'm looking for.

  2. Sweet MIDI Player 2.2.6 for Windows - This one's better than Sigma Player, but still has shortcomings. It's interface is structured like a sound board, with vertical sliders to adjust the volume of individual channels, as well as knobs to pan them to the left or right. More importantly, it sports two text boxes to change tempo: one displays the tempo as a number (222.16, for example), and the other displays a percentage that the tempo can be adjusted by (whereby "-50%" will cut it in half.) Personally, I'd prefer slider bars to text boxes (or both), but this worked out well enough for me to play along with the tune at a reasonable speed. This proved to be an exercise in out-of-tune playing, and ended up sounding about as good as a chorus of belligerent whales. I tried using the pause controls and the tempo setting to get the tune to stay on low-A for a good while, which I hoped would allow my chanter to be tuned to the computer's synthesizer, however pausing the tune in Sweet MIDI Player had the effect of muting the song and requiring it to be restarted from the beginning. Argh. Perhaps this has to do with the MIDI synthesizer it used, perhaps not. Regardless, Simple MIDI Player is ok for now, but needs to be replaced.


Oh well, I'm off to actually practice, and not just write about it. More on this later.

Wednesday, May 24, 2006

Miscellaneous

I've started to play the bagpipes again, after a few-year lull. Had the chanter stock fall off earlier today. The rubber ring holding the chanter stock to the bag had disintegrated. Me thinks I should've taken better care of it; too late now. I think I'll give fixing it a try, but suspect that a new bag is in order. Some net-searching turned up zipper-openable bags, which seems like it'd make for easy cleaning, as well as making it easier to find escapee drone reeds.

Finished playing the New Super Mario Bros for the DS. It's fun. Nothing really new; the game is standard 2D Mario fare with elements from the 3D marios (wall jumping, double jumps). Ground stomping is in there too. Some of the new features are more novelty than anything. There's a big mushroom, which'll make you as tall as about 1/2 the screen, however it's really only cool for a level or two. The same can be said about the tiny-ifying mushroom. Regardless, the game is fun and the level design is especially good. I do wish the game could be played on a TV though, as this'd be a nice game to play with a few people.

Am starting to take up archery. I've gone to two archery shoots/practices run by a local club, The Carolingian Company of Bowmen, which is SCA based. They've been lots of fun and I plan on going to more practices. After the first shoot, the fingers on my right hand, the one I use to pull the string back, hurt quite a bit. By the second shoot, I started using a glove. That seems to have fixed that problem.

Monday, May 15, 2006

Miscellaneous


  • It's still raining, and has been for the last week. Boston's North Shore region got pounded, with some areas getting up to 18" of rain. The house I live in (in the Metrowest area) has a small amount of water in the basement, but not much; no more than a quarter of an inch deep, and only in one spot. That spot happens to be under part of the server table though. It doesn't appear to be growing though, which is good.

  • I just got Purple Motion's new CD in the mail. It's very good. If you liked demoscene-type stuff, it's a good buy. (Purple Motion wrote music for Future Crew, who did the PC/DOS demo, Second Reality.) Included on his CD are some new stuff and some remixes of old stuff, including a remix of his contribution to Second Reality. It's very good, although I prefer the original version. The remix of Starshine is awesome though.

  • The New Super Mario Bros comes out today [for the DS]. A local EB Games didn't have it, and won't until tomorrow. Grrr.

    Another new Mario Bros game, Super Mario Galaxy, might be a launch title for the Nintendo Wii.

  • A new beta of VSLua was released recently. VSLua allows Lua code to be debugged from within Visual Studio. This is the first version to support the use of custom Lua dlls, something the previous beta did not have, and a requirement for the code I work on. (I use LuaPlus, a C++ interface to the C-based Lua API.)

Sunday, March 26, 2006

Post-GDC Notes

Last week, I had the opportunity to attend the Game Developer's Conference (GDC). This was my first professional conference, excluding a MacWorld expo I visited in the mid-late 90's, and was also my first time arranging my own travel plans (in regards to airline tickets, hotel reservations, etc.) Here are my notes, roughly in the order I could think them up:


  • The Lua roundtable on Thursday was excellent. There was a wide range of people there, from console developers looking to shrink the Lua runtime down to well under 100k, to those who were just curious about what Lua was. Some had modified the language and runtime itself (supposedly, it's fairly easy), others had connected Lua to C/C++ in a myriad of ways (either using custom bindings, or SWIG.)

  • Microsoft seems to have good momentum in regards to XBox Live Arcade.

  • Some of the conference rooms were way too small. Room A1, you suck.

  • The Minna Mingle party was a lot of fun. The company I work for, Funkitron (who paid for the trip, thanks again Dave!), had a table there. It was in a weird spot though, on top of a stage in a reasonable-sized auditorium. Well, not quite an auditorium, more like a fancy restaurant from the 20's. The type where gangsters might hang out. Anyhoo, the table's spot seemed to scare people off. Some sort of stage fright thing I suppose. That and it was somewhat separate from the other tables. The party did gave me some time to hang around with Darius Kazemi, who I hope was able to get some good rest over the weekend. Oh, and to whomever brought the copy of Blokus (I think it was Garage Games), you rule.

  • The Shockwave party was cool too. Got to play some Poker for a bit, which isn't my strongest suit. Thanks to Ion Hardie from Reflexive for giving me a few extra poker chips.

  • The burrito place near the Santa Clara hotel is awesome. Props to Slingo's Mike Sweeney for recommending it. I wish I remembered the name of it though. They had some of the best burrito sauce I've ever tasted.

  • Losing my cellphone sucked. I think that a better system of pants pockets and/or a belt clip of some sort will fix this next time around. To note, 1-800-CALL-ATT allows calls to be placed from pay phones using major credit cards. 1-800-COLLECT also works, but they don't accept Mastercard (1-800-CALL-ATT does.)

  • The keynote from Nintendo president Satoru Iwata was sweet. Every attendee got a pre-release copy of the new DS game, Brain Age. The new, 2D-styled, Zelda-for-DS game they're working on looks to be good.

  • The new Super Mario Bros game for DS looks nice, although I wish I'd spent more time playing around with it at the booth. Speaking of which, Nintendo's booth was sweet. Most booths were just a few guys sitting around demoing a product, which was helpful in a lot of cases. Nintendo's was the most fun though, and consisted of nothing but DS after DS, all of which were the new "Lite" models. Sony's booth was alright, and they had a lot of PSPs there. It never seemed as crowded as the Nintendo booth though, although that could just be the fanboy in me filtering out information.

  • In terms of luggage, pack light! Or pack an extra piece of luggage. I ended up running out of space and had to toss some of my conference swag (various magazines and t-shirts had to get sacrificed to the hotel trashcan gods.) In retrospect, I probably should've just gone out and bought a cheap duffle-bag right then and there.

  • If you're gonna stow away luggage at the conference center, do it early in the day, especially if its the last day of the conference. I was lucky enough to get there when there was still room to do so, but they ran out of space shortly afterwards (at 10:30, according to one of the attendants.)

  • When calling a cab, if they take your name, don't expect them to wait around very long for you, if at all.

  • Sugared cola, bad; coffee, better; water, best. Furthermore, if you're used to one source of caffiene (in my case, coffee), don't switch to another while at a conference. Relearning how tired sugared cola makes me really wasn't one of the things I wanted to get out of the conference, but it was.

  • The Will Wright talk was well done and interesting, although not for everyone. His talk came off like that of a college professor, specifically the excitable and bright, but absent-minded type. For the WPI people here, it was a bit like listening to Mike Ciaraldi talk, in that both seem to distribute information on a fast-paced and slightly random manner. (I mean this in the best possible way, BTW. It's the sort of ADD thing that makes TV shows like Robot Chicken really worthwhile.) I don't think many suits stayed around for the whole talk though. The crowd that left was decidedly more geeky looking than the crowd that came in.

  • Some Californians can't seem to take the cold. For all week, it was in the 60's and was sunny. I recall hearing one cellphone-using woman mention how cold it was.

Friday, March 10, 2006

Gold! Gold, I tell ya!

Feeling lavish? Perhaps you'd like to be a little more lavish? Maybe a diamond-encrusted, gold-plated USB memory stick will take care of things.

Perhaps that's not lavish enough for ya. If that's the case, why not get a gold-plated PC? Comes with a free t-shirt as well.

Wednesday, March 08, 2006

Google Maps

Note to self, when using Google maps to find a location, always double check the final address. Also be wary of abbreviations. I learned both lessons earlier today.

I really wanted to go here...

but ended up here.

The correct address was "281 Massachusetts Ave 02474", not "281 Mass Ave 02474". Both put me on the right street, but the the abbreviated one placed me a few miles down the road. Argh!

BTW, Lexington Eye Associates, which is where I headed to, have really nice eye doctors.

Thursday, March 02, 2006

DOS

Last weekend, I began scrapping together a DOS machine, the primry purpose of which would be to play games, run demos, and generally just feed my nostalgic senses. You see, back in the day, I spent a lot of time working in DOS. My first computer, an IBM PCjr, ran some variant of IBM DOS. I don't remember the tech specs of it very well, and I'd have a heck of a time trying to figure out what made IBM DOS different than other DOS'es, but i do remember having to swap out floppy disks... a lot. [1] Boot the system, put in a floppy. Run a program, put in another floppy. Go back to DOS from some application, put the DOS floppy back in. That was, of course, assuming that the program could exit back into DOS, and didn't require a reboot.

So come last Saturday, I eyed an old system sitting under my TV table and said, hmmmm, why not get it running. Components ended up getting scrapped together from various sources (Kevin, thanks again for the sound card!) Certain, nameless websites provided me with MS-DOS 6.22 installation floppies, which after being written to old OS/2 install floppies (which I have on CD as well, that's a project for another day though), proceeded to get installed on the target system. After quickly remembering how little fun installing software via floppies was, I proceeded to get a network card up and running. The initial plan was to get TCP/IP up and running under pure DOS. That failed. [2] Instead, I ended up installing Windows for Workgroups 3.11.

Ugh. Windows?! On a modern DOS machine? I suppose I could've copied files over a serial cable, which might've been cooler (or should I say, more l33+ h@X0R ), but fuck it. Windows 3.11 was just as much a part of the computing experience back then as was DOS. Plus, that meant I got to install After Dark, an awesome set of screensavers that I really wish were offered on modern Windows systems. (The last released version runs under Win98, but not 2000 or XP.)

So now I was up and running! I could copy files over via FTP [4]. Scorched Earth was installed in a prompt fasion, as well as Pinball Fantasies, Prince of Persia, Capture The Flag, Stunts, and a few others. Some DOS demos made there way onto the machine as well. Second Reality and Crystal Dream II among them.

So what's the point here? I could've just run a lot of these games under DOSBox, which is a really nice cross-platform x86 + DOS emulator. Why the need for a dedicated DOS machine:


  1. it's more compatible than DOSBox. Or VMWare + DOS for that matter, both of which I tried in the past. These setups are alright, except there'd always be a few apps that never worked quite right. DOSBox had a few incompatibilities, VMWare + DOS had performance issues, even on a fast machine.
  2. it's fun. I'm beginning to understand why some people stick with certain computer platforms long after their respective manufacturers stop supporting them. Amiga users fall into this category. Heck, back in high school, the local Mac user group doubled as an Apple II user group.





[1] The IBM PCjr had two cartridge slots, in addition to the floppy drive. Some of the cartrides I had were very very cool, and given that I only had a small handful of them, they got used very extensively. Crossfire and Mineshaft particularly come to mind.

[2] While trying to get networking up and running in pure DOS, I did encounter DOS implementations of the SSH 1 and 2 clients, which can be found at http://sshdos.sourceforge.net/

[3] I could've installed Windows 95 or 98 instead, in which case I would've had a more recent update to MS-DOS, and've had some level of compatibility with Win32 apps, but where's the fun in that?

[4] I think that at times, we take for granted how easily one can get onto the Internet. All modern operating systems support this right out of the box, and almost always include a wide range of tools to interact with other machines. Windows for Workgroups did not include Internet support at all, at least not when it was initially released. It could connect to various types of Local Area Networks, including a now primitive version of SMB/CIFS (updated versions of this are the default filesharing option in modern Windows.) Internet support was available in separate downloads, however, such as Trumpet Winsock and a Microsoft TCP/IP 32. For the DOS box I just set up, I used the latter. The tools it includes are limited to FTP, Telnet, ping and traceroute (there might be others, but only the first two are advertised as available.) I find it kinda weird that these tools are still perfectly useable on modern systems, even though the software I'm using is over 10 years old. Anyways, if you ever need a dead simple FTP server for Windows, ftpdmin might just do the trick. It's a command line program, but its syntax is simple. The following command runs the server and disables write access: "ftpdmin -g

Wednesday, February 22, 2006

del.icio.us

I just got myself a del.icio.us account. If you haven't seen this site, it tracks bookmarks via tags. My page there can be viewed at http://del.icio.us/dll.

Friday, February 17, 2006

Immortal Pongbat

Last night, I released a new version of Immortal Pongbat, a game that a few friends of mine (Mark Aikens and Ben Lucas) and I worked on a few years ago. It was two years since I did any work on it. and after a well-placed e-mail from someone in the Netherlands asking about its source code, I decided to go in and tidy things up a bit. (Not that receiving an e-mail from the Netherlands was particularly important. It could've just as well been from someone in Germany, Russia, Zimbabwe, Antarctica, Space, somewhere down the street, from Right Behind You!, etc.)

Anyhoo, if you're reading this, you should download it. It's mega awesome, and undoubtedly has more mega awesomeness than that lame office toy that's probably sitting on your desk.

Wednesday, January 25, 2006

Laser-Guided Input

Got a mouse with a laser in it? How about a keyboard with a laser?

Thursday, January 12, 2006

Link Parade


  • RetroGaming Radio - A monthly radio program centered around older/classic video games. Recent shows can be downloaded in mp3 format.

  • Russian Climbing - A short movie featuring some urban climbers performing some Matrix-esque moves in and around some abandoned buildings.

  • The Doomsday Engine - A heavily modified version of the Doom game engine, with support for Doom 1, Doom 2, Heretic, and Hexen. Quake-style networking with mid-game joining appears to be supported, however I've yet to try this yet. If that doesn't work, then there's always ZDaemon, which is another modified version of the Doom engine.

  • Lunar Magic - A WYSIWYG level editor for Super Mario World.

Wednesday, December 21, 2005

WikiWikiWeb

Long before Wikipedia existed, there was the Portland Pattern Repository's Wiki, aka. the birthplace of the "wiki", aka. "C2". It's content is still quite relevant, and when it comes to information on software development, it can't be beat.

I've visited the C2 wiki before, but recently went back after reading through some Wikipedia articles on software development. Here were some of my favorite finds:

  • Systems As Living Things
  • People Projects And Patterns, a good starting point for browsing.
  • Anti Patterns Catalog, which lists a variety of ways that software development projects can go wrong.
  • Truck Number and Truck Number Fixed. What if someone on a development project gets hit by a truck? What if it were more than one person?
  • WikiPedia: A C2 look at it's younger and bigger brother.
  • Beer O'clock
  • Random Pages, which according to the page, is an autogenerated list of random wiki links. Reloading the page didn't seem to give a different set of links, nor was trying to load the page in a different browser (IE instead of Firefox.) Perhaps it's on a timer, I don't know. Regardless, the set of links I was presented with had some interesting content.