Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Running Dwarf Fortress On BeagleBone Black - Mobile DF  (Read 1894 times)

Scruiser

  • Bay Watcher
    • View Profile
Running Dwarf Fortress On BeagleBone Black - Mobile DF
« on: June 17, 2013, 11:40:23 pm »

Long time lurker, first time registering and posting... 
(2+ years lurking proof: kill elves, mermaid bone, meatgod (not giving anymore on this one), Boatmurdered, magma trap,danger room, quantum stockpiling)

So my company is having a design contest with the BeagleBone Black (a developer/hobbyist board google it if you want to know more).  They were explaining all the specs on it and it has 512 MB DDR3 Ram and a 1 Ghz processor.  Basically a small computer on a board that fits in the palm of your hand.  The Beagle Bone Black community already has instructions for installing various distributions of Linux (Angstrom, Ubuntu, Gentoo, and more).  I was thinking about projects to do on it and it occurred to me how often some newb asks for a mobile version of DF.  Of course DF is too processor intensive to run on a mobile device... But the BeagleBone Black has DDR3 ram... even if it doesn't have that much of it.  So if I pregenerate the world file on my laptop and I run a 2x2 embark, do you think the board can handle DF?  Sanity check me here and let me know if this is plausible before reading on.  I just got the board today but I should have at least made a first attempt at running DF by the weekend. (I moved df_linux onto the file system, but there are additional libraries I need to install.)

If that is plausible, then I need to find a cheap screen and a converter to convert mini HDMI to the input of that screen (Beagle Bone has an mini hdmi output).  The board has a usb port so I could use a standard keyboard, although I would prefer to find a mini keyboard with just enough keys to play DF.  There is a mini-usb port for debug and power and a 5V plug for power.  I need to find a battery pack that is small that I can connect to one of these.  If I have time then I will figure out how to use the Pin headers to get key presses and make my own interface with all of the keys used in DF labeled.  Also if I have time, I will figure out how to use the mini SD card for virtual memory so if 512 Mb is exceeded it won't crash.  Ideally I will also want to make some kind of casing to hold of the components to together.  I have a 50 dollar stipend, and I am willing to spend 50-100 dollars of my own money.  The design is due by July 25.

Questions for everyone:

Is it it plausible to run dwarf fortress with a 1 Ghz processor and 512 Mb DDR3?
What is the minimum screen size it is reasonable to play DF on?
Any bugs/issues/advice with the linux version of DF? (I've only used the Windows version)
Any other thoughts, suggestions, questions?
I've lurked long enough to know that the DF community will be supportive.  If there is interest I will post updates all the way up to completion.  I am documenting my design process so if it is successful then anyone with DIY skills will be able to make a portable DF  player for under $150 dollars ($45 for beagleboard, $50-100 in parts).
Logged
Things I have never done in Dwarf Fortress;

- Won.

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: Running Dwarf Fortress On BeagleBone Black - Mobile DF
« Reply #1 on: June 18, 2013, 03:19:00 am »

If I understand, the BeagleBone use an ARM CPU. This might be a problem because DF is compiled for x86 CPUs, unless I missed something.

The specs should be okay for a 2X2 embark and a small world with short history. Memory speed is quite relevant as variable access is what kills the fps the most.

Linux DF is launched by a shell script, otherwise it is as stable as the windows build. Dfhack also work on linux perfectly if you need it.
Logged

Scruiser

  • Bay Watcher
    • View Profile
Re: Running Dwarf Fortress On BeagleBone Black - Mobile DF
« Reply #2 on: June 18, 2013, 08:36:13 am »

Thanks for pointing out the instruction set issue.  I might be able to still run DF using a tool like Wine.  I'll have to time in the weekend to see if I can compile Wine on the board and then I can see what the DF's performance is like.
Logged
Things I have never done in Dwarf Fortress;

- Won.

Taffer

  • Bay Watcher
    • View Profile
Re: Running Dwarf Fortress On BeagleBone Black - Mobile DF
« Reply #3 on: June 18, 2013, 11:59:13 am »

Thanks for pointing out the instruction set issue.  I might be able to still run DF using a tool like Wine.  I'll have to time in the weekend to see if I can compile Wine on the board and then I can see what the DF's performance is like.

Wine stands for WINE Is Not an Emulator. It provides the Windows API on Linux, it doesn't emulate CPU instructions. ARM CPUs will not run applications compiled for x86 without virtualization courtesy of qemu. Performance will suffer because ARM doesn't have much hardware support for virtualization, unlike x86 & x64.

In short, your only option is to run an x86 operating system inside of an emulated x86. This will not be "cheap" in terms of CPU, and DF will require more processing speed (as many a fort can attest) than this scheme will likely give you. Getting DF to run doing this will likely work. Getting DF to run well, on the other hand, will likely not.
« Last Edit: June 18, 2013, 12:25:48 pm by Taffer »
Logged

Scruiser

  • Bay Watcher
    • View Profile
Re: Running Dwarf Fortress On BeagleBone Black - Mobile DF
« Reply #4 on: June 18, 2013, 10:41:32 pm »

Considering that it barely has the processing power to run DF at a passable FPS even if I didn't need virtualization, there is no way I am going to be able to get this project to work.  On the plus side at least I have only put a few hours into this idea.  Thanks for the fast reply Taffer.
Logged
Things I have never done in Dwarf Fortress;

- Won.