Bochs for GP2X v.0.2 (PC emulator)
----------------------------------

by Madelman - iname.com@madelman (Reverse to write me)

Official homepage: http://elligre.tk/madelman/index.php/gp2x/


== Description ==

This is a port of Bochs, a PC emulator, for the GP2X. It's quite slow,
so it's not really usable, but anyway a nice proof of concept. Everybody
knows no console can be famous if it doesn't run Win95.

I've tried running FreeDOS, some old XT games and Win95 and everything works
correctly. But mouse is not implemented, only a virtual keyboard. Win95 boots 
in about 6:30 minutes, which is not really bad :)


== Using ==

OK, I'm going to give a little guide on how to get it working. Some people
thought this was a fake as they couldn't get it to run, well now you can
check it's not fake.

First of all, we are going to try FreeDOS.

Decompress the file to a folder in your SD card. I have included BIOS-bochs-latest 
and VGABIOS-lgpl-latest, which come from Bochs 2.2.5 distribution so you don't
need to download that.

You can get a FreeDOS image from 

http://prdownloads.sourceforge.net/bochs/fdos-10meg.tar.gz?download

Decompress the image to the bochs directory and modify bochsrc.txt so the line
beggining with ata0-master look like this:

ata0-master: type=disk, mode=flat, translation=auto, path="fdosmini.img", cylinders=20, heads=16, spt=63, biosdetect=auto, model="Generic 1234"

Ok, so everything should be ready now. Try to run bochs from the menu and see
if it works. It should show a menu asking what to boot, so let's choose FreeDOS
pressing F1. How do you press F1? Read at the end of the document how the 
virtual keyboard runs.

So, when you have pressed F1 another menu appears asking for more options. Press
the 1 key or ENTER and FreeDOS will finish loading. A command prompt appears and
now you can run whatever you like.

If you want to modify disk images you can use DiskExplorer from

http://hp.vector.co.jp/authors/VA013937/editdisk/index_e.html

You need to select "vmware plain disk" for it to work correctly.

When I have some more time I'll post a tutorial on how to run Win95 in my page,
but for the moment you can try the next one:

http://www.tjtech.org/ppc_bochs/

I tried to implement the mouse with the stick, but got tired of debugging it.
I don't plan to work on this anymore unless somebody gives me a good reason
to do it, as I don't think anything useful can be done at the speed the
emulator runs.


== Virtual keyboard ==

The virtual keyboard is activated pressing the START button. When it is active in
the screen you can move with the stick and select the keys to be pressed with B button.
CTRL, SHIFT and ALT remain pressed when you click them and you have to click them
again to depress. If you press L button, all these keys will be deselected.

When not in virtual keyboard mode, the stick is mapped to the arrow keys, button A to
the ENTER key and button B to SPACE.


== Thanks to ==

- bochs authors
- author of zbochs port to zaurus for some ideas
- paeryn for the accelerated SSL, I would have had a lot of work without them
(well, I had to do all that work but rejected it when I saw all he had done
to SDL. The resizing of the screen works beatifully)
- this port uses some code from sdl_gfx, thanks to it's author
