It turns out that with a bit of source code modification, you can get dosbox running quite well on your zipit z2!! This is HUGE for me, as I’m currently reliving my youth with a Pools of Radiance campaign on my z2! For those impatient to try it out, DL the openembedded ipkg and modified source files at the end of this post.
Enabling Swap
Follow the directions here for adding a swap file. I recommend a good 64 meg chunk. This will keep dosbox from segfaulting when it searches for available memory.
Modifying Sources
Head into your dosbox source directory (or the dosbox/src directory in your OE bitbake tree) and do a
"grep -r "640" ./* ".
This will return all the source files containing video mode switches. You’re going to want to change all the SDL function calls from 640,480 to 320,240.
Installing Dosbox
Bitbake your new dosbox and install prerequisites. You’re going to need a whole mess of SDL libraries like sdl-net sdl-image sdl-x11 etc. My usual routine is:
(bitbake host) bitbake (package name) && bitbake package-index
(z2) ipkg update && ipkg install dosbox
if #2 complains, replace (package name) in #1 with missing packageEditing Dosbox config and startup
By default dosbox will enable a number of options that are not conducive to use on the zipit z2. Luckily you can pass the dosbox config file location to it on startup. I start dosbox straight from the command prompt, as opposed to from an xterm window. It saves about 1/2 meg memory, and every little bit helps. I start dosbox with the standard xfbdev script ala:
export DISPLAY=:0.0
Xfbdev -screen 240x320@90 -hide-cursor -br &
dosbox -conf ./.dosboxconf
My dosbox.conf is attached with the code below, but at minimum you’ll need to set the following option to enable the arrow keys:
usescancodes=false
And that should get you going. The initial dosbox window will be larger than your display, and the cursor may be scrolled off screen. This will be resolved when you start a game, but I like to add the game start commands to the dosboxconf as below:
[autoexec]
# Lines in this section will be run at startup.
mount c /home/root/
c:
cd poolrad
start
And that’s that! You can download the updated source code and ipkg files here.
dosbox modified sources and configs

How did you get into the device ? I’ve been trying to find a cable to connect something to it, and havent found anything. Any suggestions ?
No need for a cable, head over to linux.zipitwireless.org and download a boot image to a mini-sd card. Then you can boot the zipit into linux mode, no cracking of case required.
I hate to ask this, but it is particular evident that many Zipit users haven’t the foggiest what a compiler is, it would be really great if you could you please put up a statically-linked binary.
Great program.
I can post a statically linked binary if you like, however I have great concern it will cause the zipit to thrash heavily. With x11 and dosbox running with nothing emulated, you’re looking at at least 20-25 megs usage. Adding in a game and we push the memory usage over the limits of the zipit and into swap territory. A statically compiled dosbox binary would exacerbate this greatly. I’ll post it though, if you are interested.
You should check out the GP2X version of DOSBox for porting. It has a recompiler for ARM (although kind of a rudimentary one). I think it still uses SDL for everything else, and is made for 320×240.
Kind of curious how the Z2 performs, I wonder if there have been any benchmarks comparing it to other handhelds.
Hey Gilead, that’s a good idea Ill definitely check that out. Right now its running about 286 speed but I have yet to do any comparison tests etc. For the price (50) you wont get a much better wireless linux handheld, but for homebrew I think a 50$ used DS is probably a better deal. This is all kind of leading up to my pandora coming in. You pre-ordered yet?
Nah, they’ll send me one when they feel like it I guess. I’ve refused dev units before because of lack of time and wanting to have a more complete one but when they can manage to send one just for some ports I’d be doing then I’ll take it.
I do have a GP2X Wiz dev unit though.
.. wait, can you really get a used DS for $50?
Hell yeah, I got mine for 50 and it came with a game I sold for 15! I think even gamestop is selling them around the 50 mark now too.
Nice, might pick one up eventually.
The dynamic library version would indeed be best then. I since use a version that uses dynamic libraries. I too intend to port a few emulators to the Z2 once I get a version of GCC or TCC installed on it or in Winders.
Nice, I’ll be interested to know how that turns out. Now that sound is working I imagine a tight emulator would get the zipit community re-energized. Be sure to post it on the zipit yahoo forum, that’s where most of the development has been happening this past year
Ratz, there are still 3 libraries I’m missing in order to get this running, I know 2 where SDL related. I’m sure I’ll eventually get it going. I want to get GBA and C-64 emulator going first. I’m thinking of a version of the Legacy PC emulator too. The earlier pre-SDL versions looked like an easy port and it too uses a virtual bios for speed. Found an arm GCC version for Winder’s ala a GBA dev kit that will work.
I’m very interested to see the frame rate you pull from the Legacy PC emulator…. 300mhz should be enough to run ~386 with little optimization.
[...] you, who really wants to run Dos on it? Well, for the one or two of you left reading, now you can. The directions can be found here. [Hunter] has worked out a way to get DosBox running on his Zipit. At 315 mhz his old DOS games, [...]
[...] you, who really wants to run Dos on it? Well, for the one or two of you left reading, now you can. The directions can be found here. [Hunter] has worked out a way to get DosBox running on his Zipit. At 315 mhz his old DOS games, [...]
[...] you, who really wants to run Dos on it? Well, for the one or two of you left reading, now you can. The directions can be found here. [Hunter] has worked out a way to get DosBox running on his Zipit. At 315 mhz his old DOS games, [...]
[...] you, who really wants to run Dos on it? Well, for the one or two of you left reading, now you can. The directions can be found here. [Hunter] has worked out a way to get DosBox running on his Zipit. At 315 mhz his old DOS games, [...]
[...] se le estan sacando usos “extra” que como dije antes lo hacen realmente interesante. Aqui podemos ver el Zipit Z2 ejecutanto DOSBOX y por tanto … es un gran mar de aplicaciones y [...]
Has anyone given any thought as to setting up an ipkg repository for this device?
Ya we’ve been talking about it for a while, check the comments on the later z2 posts I’ve written, a couple of people have gotten the regular angstrom repositories to work, hopefully that’ll point you in the right direction.
Thank you very much for that good entry.
Speaking of the DS I got the 1st version which I prefer slightly more anyways for $10 & that was 3 years ago. A 13 year old kid sold it to me at a yard sale, Adapter, Stylus good battery, everything! He also sold me Rayman for $5 Back then I think Gamestop was selling them in the $80 – $90 range. His mom was there too, I was just kind of shocked, Even more so when I found out it worked perfect.
I saw this on hackaday, Happy I ran across it. I didn’t even know these things existed, My brother who is studying computer science at Georgia Tech was looking for a low cost arm laptop to tinker with. So I’m defintly letting him know about this, I might get to play with it too until I pickup one
[...] guy manged to run DOS Box on his zipit Z2 http://hunterdavis.com/archives/40#comments Looks like a great modding platform might look into getting one personally __________________ [...]
[...] Wireless Messenger può essere trasformato in una vera e propria Linux box. Basta installarci sopra DOSbox o un emulatore NES e seguire i consigli dell’hacker Hunter Davis che vi ha installato una [...]
Has anyone considered TinyCore?
http://www.tinycorelinux.com/
The Dillo browser also looks interesting:
http://www.dillo.org/
Regards,
MAS
Hey MAS,
Thanks for the link, I had not heard of TinyCore. Looks like a tight implementation, but not immediately applicable to the Z2. Would take a bit of trimming down, as TinyCore freaks out with less than 48mb real ram, and the Z2 only has 32.
Dillo is running well on the Z2 now, and is included by default on the debian image released. I’ve also been using konqueror and netsurf with success. Thanks for the info!
[...] let’s grab the tweaked version of dosbox off Hunter Davis’ blog and try to compile [...]
[...] be logged right in. Now that you’ve gotten this far, you should be ready to follow Hunter’s directions to build dosbox or maybe something even more exciting. Post in the comments and let me [...]
Here’s an off the wall question:
Dell Axim x3
Intel XScale 400MHz Prox
64MB RAM/64MB ROM
Can I relieve it of its Windows CE burden and put Linux on it?
I have been waiting years to try.
Only problem: Touch screen only, no KB.
Thoughts?
Hey DW,
It looks like these guys are working on it:
http://www.handhelds.org/moin/moin.cgi/DellAximX3
. Other than that it appears not a lot of folks are looking into it.
http://www.anytux.org/hardware.php?system_id=726
I’d be interested to hear if you get anything going. Good luck
Hi Davis!
I am from Hungary, and I am a newbie in linux. I have bought a zipit Z2 and Ubooted it.
I tried to install the dosbox but as I said I am newbie…
I want to use my zipit to play flv and avi movies, listen mp3s and playing old dos based games, or NES games.
Now I don’t know where to start…
Any help will be appreciated.
Thanks a lot!
Szabolcs.
Hey Szabolcs,
If you’ve Ubooted it you’re almost there! I assume you’re using a debian based userland? If you can apt-get install programs you should be good to go on installing things. You can download the dosbox modified sources and modified package from the link above, and may be able to run it or compile it directly on your Z2. For mp3s you have a few options, console or otherwise. For flv I believe mplayer should work fine for you, and I think also there was a nice youtube download script out there too. For NES check out the nes on Z2 video/tut I did a while back. Good luck!!
Hi!
I am currently using the z2sidX, because the X is necessary for the dosbox. I prefer the z2sid_v6 but it hasn’t the X server installed on it for the dosbox.
I downloaded the sources from the link above, but as I said I am newbie. I don’t know what is bitbake and how to ipkg… So I apt-get installed the Dosbox and started it with your config file. Of course it doesn’t work… At least it started but there wasn’t sound, doesn’t found the xfbdev command and the screen was “blinking” every 2-3 second.
So the only problem is that I can’t ipkg your modified sources and the necessary dependencies.
Thanks for your answer!
Have a nice day!
Hey Szabolcs,
OK, so replace xfbdev with the name of your X server executable. You’ll need to recompile dosbox because of the SDL calls to 640×480 as described in the article. If you apt-get install build-essential and libsdl* you can probably just compile directly on the Z2 itself. Good luck!
Hi!
Somehow I can’t do it…. When I try to run ‘make’ in the src directory on the zipit it stuck at the core_normal.cpp with heavy ‘disk usage’
But You know: Every beginning is hard…
If I have a virtual debian or ubuntu haow can I cross-compile your modified source-files? Do I need to add stg after ./configure?
I am trying so hard
I tried to use the Zipit Z2 Development virtual machine, but there isn’t installend sdl libraries in the scratchbox…
I want a worikng dosbox, and a working fceu…
I won’t give it up!
Hey Szabolcs,
If you have a cross-compiler set up (target=armel) (I’ve done some tutorials on setting up cross-compilers as well, check the archives on that) you just need to compile libSDL on your cross-compiler. It requires libPNG, libpcap, a few other related system libraries. I may have gone through the process of compiling libSDL in the dosbox post. Good luck!
Also, you can pass compiling parameters to gcc to limit the memory usage. Try:ggc-min-heapsize to 6MB and ggc-min-expand to 0
[...] you want to find a new use for this handheld device, you might be interested in running Linux, installing DOSbox, or maybe an NES emulator. The Zipit has a 300MHz XScale processor, 32MB of RAM, and a Mini-SD card [...]