                       O2EM_GP2X v1.04 (Oct 2006/Jan 2008)

             an Odyssey 2 & Videopac+ emulator for the GP2X

         ported by Sean Poyser from original source available here:

                      http://o2em.sourceforge.net/

                 Original Version is copyright 1996/1998 
                by Daniel Boris <dboris@comcast.net>
         
              Original Version Developed by Daniel Boris, 
                 Andre de la Rocha and Arlindo Oliveira

//////////////////////////////////////////////////////////////////////////////

    Please also read the original o2EM.txt in the docs directory

    Before you can run O2EM you need a copy of the Odyssey2 or Videopac bios
ROM. For copyright reasons, this ROM image can not be included in this
archive. This ROM image is stored inside the 8048 processor and can be read
out with the appropriate equipment. The image should be 1024 bytes long and
should be in the BIOS directory, filename 'o2rom.bin'.

    You will also need cartridge images, but again for copyright reasons
these can not be provided. PLEASE DO NOT E-mail asking for ROM images! All
messages asking for ROM images will be promptly deleted. ROMS should be located
in the ROMS directory, extension '.bin'

    If you wish to use Voice emulation for games like KC's Krazy Chase. 
Download the voice samples (from http://o2em.sourceforge.net/) and unzip them 
into the VOICE directory in the main directory. There are two sets 
of voice samples, 'mainsamp.zip' which is the main voice samples and 'sidsamp.zip' 
which are the samples used by the game Sid the Spellbinder. You only need the 
Sid samples if you want voice in that game.

//////////////////////////////////////////////////////////////////////////////
Version 1.05
A year on and version 1.05 is here.
No difference to v1.04 except for F200 support

Thanks to Mijo for pointing out that o2em_gp2x didn't work on the F200 and 
for testing this new version.

Thanks to kevcal for sorting out and releasing the fixed allegro library.

No thanks to gph for breaking it in the first place (only joking).

//////////////////////////////////////////////////////////////////////////////
Version 1.04
Added credit to manopac who maintains an unofficial version of o2em, see here:

http://www.guttenbrunner.com/videopac/o2emPort.html

In the ReadMe_GP2X.txt file (this file)

The code for Saving and Loading states was ported from his unofficial version.

A bug was fixed in the virtual keyboard code. Enter and Clear were not being flushed
from the buffer causing problems once they were pressed.

Final exe compressed using GPSComp v0.3 (by rlyeh)


//////////////////////////////////////////////////////////////////////////////

Version 1.03
AKA Christmas 2006 Release

Virtual Keyboard finally implemented making most games fully playable - YIPPEE
Keyboard is toggled On/Off with 'Y' button
Keyboard Controls
'Joystick' Moves Cursor
'X' Presses key indicated by cursor

'Select + Joystick' Moves Keyboard
'Start' makes keyboard transparent
'Left Shoulder'  presses Enter on keyboard
'Right Shoulder' presses Clear on keyboard

Other minor changes
1. Some games, eg Satellite Attack/UFO automatically map the GP2X joystick to the 
correct joystick (for those that don't use the 'Switch Sticks' menu item).

2. Removed mapping some key mappings:
L Shoulder 0 - Remains

R Shoulder 1 - Remains
Y 2          - Removed (Use Keyboard) 

A 3          - Removed (Use Keyboard)

X 4
          - Removed (Use Keyboard)

3. Executable renamed to o2em_gp2x (ie no extension) to avoid confusion (hopefully) 
with the supplied scripts (as suggested by ZE_RO)

//////////////////////////////////////////////////////////////////////////////

Version 1.02
Quick bug fix release.
In version 1.01 ROM selector would only show a multiple of 15 roms, eg 15, 30, 45 etc
Now shows all ROMS 

//////////////////////////////////////////////////////////////////////////////

Version 1.01

Modifications/Improvements for Version 1.01 of GP2X Port

Major re-organisation of GP2X specific code intp gp2x.c and gp2x.h

No longer uses allegro library for joystick polling, this was done to allow start, select
and volume controls to be utilised (didn't realize the library had been patched to add these)

Due to a bug in the allegro library, version 1.00 of the emulator would lock up if it was
thge first application run on booting up (not an issue if you use gmenu2x), therefore added
a workaround to overcome this.

** Added ROM selector **
Activate by pressing Select
Up Down and Shoulder buttons to select ROM, 'B' to load ROM, select to cancel and return
to current ROM.
If no ROM is passed on the command line when launching the emulator the ROM selector will 
appear after loading, otherwise the ROM passed in will be loaded (this maintain compatibility 
with gmenu2x).

** Main Menu **
Activate by pressing Start
Up and Down to navigate, B to trigger option.
Start to exit menu (or the Exit Menu option)

** Reset Emulator **
Activated from the main menu.
Equivalent of pressing the Reset button on the original console.

** Exit Emulator **
Activated from the main menu.
Guess!!

** Load and Save States **
Activated from the main menu.
Only one state per ROM is currently available.
These are simply saved as files in the ./states directory (make sure it exists), filename is based
on rom name with the .SAV extension.

** Switch Sticks **
Activated from the main menu.
There seems little consistency to which stick is required to play one player games, therefore
this option will change which stick the GP2X is currently bound to. If a game doesn't seem to
respond to the controls then try this option, 95/100 it will sort the problem out.

** Volume **
Change using Volume buttons, pressing both down together immediately sets the volume to 0

** Controls **
Currently only the 0,1,2,3, and 4 keys can be pressed via the

L Shoulder 0

R Shoulder 1

Y 2

A 3

X 4

B is the fire button

These can be used to select games 0-4 at the Select Game screen, other variations

are therefore currently unavailable. Virtual Keyboard coming soon(ish)

Start  - Activate Main Menu
Select - Activate ROM selector
Volume - Change Volume, press Up and Down simultaneously to mute

** TODO **
Virtual Keyboard
Allow switching between Pal and NTSC within emulator
Allow bios changing within emulator
Anything else that springs to mind, suggestions welcome, seanpoyser@gmail.com

Included in the archive are 3 gpe files.
o2em_gp2x.gpe is the main emulator application
o2em.gpe      is a script that starts up the emulator as a G7000
o2emp.gpe     is a script that starts up the emulator as a G7400

Located in the gmenu2x directory are 2 scripts for gmenu2x that will start up the emulator
with the chosen ROM as either a G7000 or G7400.

//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
Version 1.00

Modifications for GP2X Port (not alot)

Files changed:

vmachine.c
main.c

All changes are within 
   #if defined(GP2X)
   #endif
Sections

Extra functions in vmachine.c are:

void EmulateKeyboard()
bool IsCommand()
void CheckForCommand()

//////////////////////////////////////////////////////////////////////////////

    Please also read the original o2EM.txt in the docs directory

    Before you can run O2EM you need a copy of the Odyssey2 or Videopac bios
ROM. For copyright reasons, this ROM image can not be included in this
archive. This ROM image is stored inside the 8048 processor and can be read
out with the appropriate equipment. The image should be 1024 bytes long and
should be in the BIOS directory.

    You will also need cartridge images, but again for copyright reasons
these can not be provided. PLEASE DO NOT E-mail asking for ROM images! All
messages asking for ROM images will be promptly deleted. ROMS should be located
the ROMS directory.

    If you wish to use Voice emulation for games like KC's Krazy Chase. 
Download the voice samples (from http://o2em.sourceforge.net/) and unzip them 
into the VOICE directory in the main directory. There are two sets 
of voice samples, mainsamp.zip which is the main voice samples and sidsamp.zip 
which are the samples used by the game Sid the Spellbinder. You only need the 
Sid samples if you want voice in that game.

//////////////////////////////////////////////////////////////////////////////

I haven't created a rom selector, front-end or keyboard simply because the whole idea of this 
port was simply so that I could play Satellite Attack which I can now do!

Currently the only way of selecting games is to create a .gpe file with the appropriate
script , see o2EM.txt for options (NOTE setting screen mode has no effect, full screen is always 
used) 

eg to play Satellite Attack (Videopac 34)

#!/bin/bash
cd 
/mnt/sd/o2em/
./o2em_gp2x.gpe ufo.bin -s1=0 -s2=3 -novoice

sync
cd /usr/gp2x/
exec ./gp2xmenu

-novoice will speed up initialisation as samples do not need to be loaded
-s1=0    disables console's joystick 1

-s2=3    enable console's joystick 2 necessary as Satellite uses the second joystick instead of the first!!


See example directory for other .gpe script files


Currently only the 0,1,2,3, and 4 keys can be pressed via the

L Shoulder 0

R Shoulder 1

Y 2

A 3

X 4


These can be used to select games 0-4 at the Select Game screen, other variations

are therefore currently unavailable, anyone fancy implementing a Virtual Keyboard!?


To reset console press both shoulder buttons and Y

To exit the emulator press both shoulder buttons and A


Any questions or suggestions please email to seanpoyser@gmail.com