Retro gaming on iPad, for iOS developers

 MADTV and Gabriel Knight running in dospad on the iPad

MADTV and Gabriel Knight running in dospad on the iPad

Sometimes it's good to take a break from coding, and what's more relaxing than running some retro games on your iPad?

Getting DOS onto iPad

Some time ago a DOS emulator called iDOS briefly made it into the App Store, but it was already long gone when I heard of it and tried to download it. As luck would have it the source code for the app is available under the name dospad from Google Code, so any registered iOS developer can build it using Xcode and run it on their iPad.

I believe iDOS or dospad is also available for jailbroken iPads, for those who are not registered developers but are OK with jailbreaking their device.

Installing games

With dospad you get a fully functional DOS system for your iPad. There is mouse support and sound support, making it brilliant for some retro gaming. If the games are mouse driven you can even go full screen for a very immersive experience.

Sierra's adventure game Gabriel Knight is one of my all time favorites, and since I no longer have a floppy disk drive on my computer I downloaded it from an abandonware site called The House of Games, where there's a large selection of old DOS games.

dospad2.png

With dospad installed on your iPad, you can drag files into it using iTunes. Just go to the iPad's Apps tab and select dospad under the File Sharing header.

Dospad comes with an unzip utility so once you have transferred the zip file with your game you can use the DOS command prompt to create a directory and unzip the file into it.

dospad3.png

For Sierra games you then run install.exe to select your sound options. I selected Soundblaster Pro which seems to work well.

Launch the game by running sierra.exe.

Mouse controls

Obviously, this being DOS, you don't use it like a standard touch screen. Instead you control a mouse cursor on screen in the same manner you would using the touchpad on your Macbook. Tapping the screen left clicks at the position the cursor points to.

dospad4.png

You can play either in portrait or landscape mode, as well as full screen.

dospad5.png

Happy retro gaming, and make sure to save your game often.

Running SDK apps on a jailbroken 2.0.1 iPhone [Updated]

Update: There is useful information in the comments about how to do this with later versions of the SDK as well. Thanks to everyone who has contributed. 

 

This summer I've spent some time working on my iPhone app, which I hope to release on the App Store later this fall.

Since I imported my iPhone from the USA, I have to use the iPhone Dev Team's Pwnage Tool to unlock and jailbreak it. I chose to stay on firmware 1.1.4 until 2.0.1 was available to avoid the performance issues that were widely reported. This means I have not had the opportunity to try my application on the phone itself, but last night I updated to 2.0.1 and tried installing the app.

It turns out my application works great, but I still need to add a few more features and spend some time generating nice visuals to replace the placeholder graphics I am using.

To get the application running on the iPhone I had to copy it using scp to the /Applications directory on the phone and bypass the iPhone Code Signature check. After some googling I found the ldid tool written by Jay Freeman, which takes care of the Code Signature.

Here are the steps I used to get my SDK developed app running on a jailbroken iPhone, all commands should be entered as one liners in the Terminal:

1. Make sure you set Xcode to compile for the device, not for the simulator.

2. Compile the project, then copy the resulting MyApp.app directory to the iPhone's /Applications directory.

mac# scp -r MyApp.app/ root@iphone_ip:/Applications/

3. Access the phone using SSH. The root password is alpine, at least on my phone.

mac# ssh root@iphone_ip 

4. Make sure the executable is marked as such, this step is probably unneccessary but it wont hurt anything.

iphone# chmod +x /Applications/MyApp.app/MyApp

5. Install the ldid tool, this step probably needs Cydia to be installed on your phone.

iphone# apt-get install ldid

6. Run ldid on the application executable on the phone.

iphone# ldid -S /Applications/MyApp.app/MyApp

7. Your application icon should now turn up once the phone is rebooted.

These steps will work even if you have not been accepted to the paid iPhone developer program.

Note that these instructions are experimental. I can't be held responsible for whatever happens if you try them.