Home | Software | Rules and About | Atom feed
Admin | Edit
published: Tuesday 26 January 2016
modified: Friday 29 January 2016
author: Hales
markup: markdown

Dwarf Fortress on old hardware

The Game

Dwarf fortress is a dark game. In its main mode you can only indirectly control the dwarves and through your stupidity they will all die.

This game will bring your computer (and your work life, atleast temporarily) to its knees.

I was introduced to 'dwarfdom' (along with roguelikes such as nethack) by friends in highschool. Once upon a time my school library was a place where the commons would crowd at lunchtimes. In the depths of the share drives; games, emulators and roms lurked.

The librarians regularly patrolled the library in an attempt to stop the antics. Students trained hard in the arts of tab-fu. Nintendo 64 games became a staple.

The arms race ended when the network drives were cleaned up and re-arranged. The single drive shared between staff and students was split and students were left with their own seperate area. This dedicated region quickly descended into a chaos of malicious batch files and mass deletions.

The cleansing of the games did not stop the gamers. Through the flames a new generation appeared in the school, but no longer in the library. For these new laptop-bound gamers preferred the quiet corridors of old buildings and disused common rooms. True places of dwarfdom, where the light is thin, the plumbing drips and the fans hum.

The Test Subject

A year or so ago I threw this machine together. It's name is 'Tapemor':

From the outside it masquerades as a VHS machine. The play button is wired as the power switch, the play LED is the power light and the VHS hatch door has been modified to latch open and closed using magnets.

Most of the parts were scavenged from e-waste class electronics.


I wanted to run Tapemor with as passive as possible cooling. I replaced the fan on the PSU with a quiet/slow model and retrofitted a much larger heatsink to the processor.

Unfortunately the processor is prone to overheating. Although this computer draws only a little power there is bareley any airflow in the case and the processor likes to shut down well shy of 80 degrees C. The fan on the power supply does not pull much air through the case because of some badly positioned vents. I'll rectify this another day.

For now a blue fan from my old graphics card gently stirs atop the processor. Its bearings had started failing and making lots of noise in their original home, however here the fan is mounted upside down and has no problems. I'm running it off 3.3V, staked into the crimps on the ATX connector:

In place of a HDD I'm using a 16 gig CF card in an adapter, both off ebay. CF controllers can run directly as IDE devices, provided you have a physical adapter for the different pin pitches and layout. It's a nifty feature for old comptuers.

I would have opted for cheaper SD card or USB flash drive storage, however this motherboard refuses to boot off anything that is not a floppy or a harddrive. The CF card pretends to be an ordinary IDE harddrive so the motherboard is happy to run with it. I'm sure IDE to SD options are another alternative these days.


Tapemor is running wheezy, an old version of Debian that's still bareley supported. After wheezy they started using systemd (something I have had poor experiences with -- for another post another day) so I felt reluctant to update.

The intel i810 chipset's graphics are not supported by the kernel I have installed, so I'm limited to a simple text console. I believe support for i810 was dropped from the main Linux tree a long time ago.

Luckily Dwarf Fortress has a text-only (ncurses) mode that it can run in.

Running and Installing DF

I did not have a network switch handy, so I installed an ethernet PCI card in my main computer and bridged its connection with my router. This gave Tapemor internet access.

The Linux version of Dwarf Fortress comes compiled for x86 (32 bit) and luckily does not seem to need any modern x86 processor features or instruction sets. It does however require a whole slew of libraries, but I had no troubles installing them. If the game executable cannot find the library it's after then it will tell you what it's called.

Overall, installation was pretty painless. Running the game was more difficult.

I was initially able to generate a world, however I ran out of memory when I tried to play it and my kernel killed the game. It seems that 180 MiB is not enough these days :(

No worries! I have whole megabytes being wasted by all this background junk:

Bash itself takes a few MB, so I switched over to dash. More space!

You will notice that these pictures are taken with a camera, not screenshotted. Normally I would use a utility called fbgrab to take pictures of native linux consoles, however it failed to work in this situation. I believe the text console I'm using is run directly using BIOS calls rather than the kernel rendering into a framebuffer.

I could have ssh'd or telnetted in, but I was really squeezy on memory. Tolerate my photos!

I chose the simplest and smallest world generation possible:

The worldgen process revealed a problem: poor character support in my console.

Where are the mountains and the oceans? Hidden in the darkness of out-of-range characters. I was not able to fix this by changing console fonts.

I was ecstatic when I was able to get a 1x1 embark working:

The frame-rate hovered around 50FPS and everything seemed to be going well. I'm sure memory usage would expand over time until the game crashed, however I did not play for long. I had my reasons:

The shot above is realtime. The top of the chamber is actively being dug by a dwarf. What dwarf? Sssh. That's beyond my charset.

Switching to another console I had a peek at the memory usage:

16 megabytes free??? I have acres of room! Pah what was the kernel complaining about.

Final notes

Can you run Dwarf Fortress on something even older? What hardware do you have lying around? Give it a go.

(Try watching some videos using libcaca too!)

Federico - website - Tuesday 17 November 2020

Surfing the web like the old days (not true actually haha), i found your website! I like to do the exact same experiments... trying software in old hardware is fun. An much more when you can create a world inside a little machine. If you dont mind i want to add your website link to my own. Its not too fancy or self-hosted but it werks. Web nowdays is to bloated to my taste... i left social media and now im a cyber nomad.. roaming the net searching for sites like yours!!
Cheers from Argentina!!

Hales - (site author) - Tuesday 17 November 2020

Welcome cyber nomad. Copied + pasted from my reply on your guestbook:

Hello Federico,

I'm more than happy to have a link to your site.

I can only get your front page to work, all of your other links take me to example "Welcome to my website!" neocities pages. Are these pages still unwritten?

There are lots of interesting niche communities out there that do not want to move onto social media sites. They're hard to find, unfortunately, but some of them are really interesting. Eg Pouet https://www.pouet.net/topic.php?which=8787

N.B. I'm reading and quoting from an auto-translated version of your site.

> I must admit that the main initiative was also to have a form of escape from the current condition of the internet, in which day by day it is losing personality thanks to social networks. It's been a while since I got my ass out of there and for the better. That is why I see the need to have a personal contact method.

I agree. The services social media sites provide to users are every-changing illusions that care little about information quality, strength or permanence. Users are seen as objects to be manipulated or played against each other to increase engagement or other goals. Every story, write-up, experience and photo submitted to a social media site is temporary: doomed to die some years in the future when the site owner deems it of low financial value.

I used to make mods for video games many years back. I uploaded the zip files to various file-sharing sites and my images to various image-hosting sites. These are now all gone forever. They were not great mods, but I used to make my own textures from my own photos and I had quite a bit of fun, so losing them forever is something I regret heavily.

I now only upload things to my own site (and I keep backups!) so that I can ensure my stuff, even the old stuff that I'm a bit embarrassed about, can stay available online for as long as possible. It also means I don't have to worry about social media algorithms or other complex systems.

There is a period of history called the 'dark ages' where very little written material survived from. I think we're now in a second dark age, where the vast volumes of stories, images and videos we make are now doomed to be lost in 10 or 20 years time. Simultaneously it's a period where a lot of large online companies realised they can dramatically manipulate human behaviours. Historians of the future are going to be very angry with us for not keeping more evidence from such an interesting period of human history :D

Do whatever you want on your site. Put stuff up that you would want to read. Don't do any more work on it than you want to or worry about what other people will think. Just make sure to keep backups!

Regards, Hales

Hales - (site author) - Tuesday 17 November 2020

Addendum: I notice your guestbook is hosted by a 3rd party (smartgb.com). I would hope this service lasts a long time, but I wouldn't expect it to last forever. If you care about your guestbook then please keep backups, even hitting Ctrl+S when visiting it occasionally will provide something you can put back up on your site later if smartgb.com dies.

I've visited a lot of old sites with dead (or spammed!) guestbooks and it's really sad. You miss out on a lot of the context of that site.

Federico - website - Monday 23 November 2020

I'm not into web design. Its possible to make a guestbook in markdown and store the messages in plain text? I don't have to much storage in neocities but it's just text and I'm not that famous hahaha

Federico - website - Wednesday 25 November 2020

Hey hales!! Good news now im hosting my web locally from a second phone i have.... just AMAZING. Wifi/4G connectivity, 24/7 and thanks to the phone battery it can last a good amount of time if power goes down.... Apache, PHP and Mysql so I can make my own guestbook even a little forum or live chat. I finished configuring the port redirection and the dyndns so you can find me on metalinchains.ddns.net... I'm feeling the power of boomer growing inside me xD. Next project is trying to do the same as above but using Termux and Arch Linux for extreme performance. I'm surprised about the loading speeds...
See Yaa!!!
PS: I love to death portable stuff.. imagine a nomadic web server haha carrying your own server in your backpack like a Chad!!

Hales - (site author) - Wednesday 25 November 2020

Hosting from a phone + dynamic dns? Hahaha that's amazing.

> using Termux and Arch Linux for extreme performance

Use whatever distro you're happy with, the performance differences between them are very minimal. Most performance differences are due to different choices of applications running.

> PS: I love to death portable stuff.. imagine a nomadic web server haha carrying your own server in your backpack like a Chad!!

Pleb: hosts using paid services. Succumbs to datacenter floods, earthquakes, blackouts and court orders. Spends more time on SSH than with the ladies.

Chad: hosts using highly-efficient smartphones hanging out of his backpack. Floats and swims during floods, dances to the ladies during earthquakes, shines his smartphone torches during blackouts and outruns court orders using his bicycle. Everyone wants to use his solar backpack phone charger, but no-one can keep up. Fixes site problems within seconds because the servers are always within reach.

Sean oDonell - Tuesday 1 December 2020

Nice website, but the white background is killing my two eyes.

metalinchains - Wednesday 2 December 2020

Sean I recommend using glasses with blue filter to protect your eyes!

metalinchains - website - Monday 14 December 2020

Finally im running termux... i decided to do that cos the app running the web server was a crap full of advertisement. But the major flaw was that I was not able to modify folder permissions. Another great improvement is that I have a base linux distro running all the services instead of multiple android apps in the background.
I decided to keep things simpler and smoother running my blog section with bashblog (a script in bash that automates blog creation) and pure html, css and is. The phone can barely keep up if I trie to do fancy stuff. So I do almost anything the FOSS way like real pumping pipes unix Chad. I found a perl script for making a based guestbook. Do you think is good idea? I want to keep all the comments in a text file (I want it future proof)
I hope you are doing fine!

PS: sorry if I write to often in the same post.
How do you add comments to your post? Which method do you use? It looks very simple.

Hales - (site author) - Sunday 27 December 2020

Hey Federico,

> I found a perl script for making a based guestbook. Do you think is good idea?

Give it a try. The language doesn't matter as much as the implementation.

> want to keep all the comments in a text file (I want it future proof)

That's good thinking. Systems that store the comments in a database are fiddly to change away from; and you may end up having to try a few different comment systems.

> How do you add comments to your post? Which method do you use? It looks very simple.

As simple as I could make them :) I wrote this site's scripts myself, including the comment system:


My comment system works pretty much like this:

1. User submits comment form (HTTP post)
2. My comment.cgi script runs
3. Antispam field is checked
4. Throttling is checked (ie comment is blocked if user or anyone has made more than X comments in the last Y hours)
5. Comment is written to a text file, with the time and date stored in the filename (unix epoch time format)
6. Page is regenerated with the comments

There are some sanity considerations: you need to "escape" or remove any special characters that guests submit, otherwise guests can write HTML & javascript into your site. Throttling is also useful, so if someone decides to spam your site then they are limited to just a few comments before being locked out. This lets you fix it at your leisure, rather than having hundreds of spam comments added second of every minute of every hour until you notice.

HTML forms and HTTP posts are pretty simple to work with. If you have the time: give it a go.

Add your own comment:

Email (optional):
URL (optional):
Enter the word 'irrlicht' (antispam):
Leave this box blank (antispam):

Comment (plaintext only):

If you provide an email address: it will only be used for the site admin to contact you, it will not be made public.

If you provide a URL: your name will hyperlink to it.