

                     O2EM v1.01 (October/2002)

                  an Odyssey 2 & Videopac+ emulator

      copyright 1996/1998  by Daniel Boris <dboris@comcast.net>
         
    Developed by  Andre de la Rocha <adlroc@users.sourceforge.net>

                     http://o2em.sourceforge.net

---------------------------------------------------------------------------



 This is a new release of O2EM, the freeware Odyssey2 / Videopac console
emulator, created by Daniel Boris in 1996/97. Since version 0.80 it has
been developed by me, based on the v0.65 source code released by Dan.
Release 1.00 added complete support to Videopac+ G7400 emulation and other
features (see changes). It was written in ANSI C and works under Windows,
Linux and DOS, using the Allegro game library v4.0.x.

 This release includes the source code of O2EM v1.01 and binaries for
Windows, DOS and Linux/X11. The sources probably can also be compiled under
other platforms like FreeBSD, Irix, Solaris, QNX and BeOS, but it was not
tested. With the Windows binary, I've also included the latest stable
version of the Allegro DLL. To use the Linux version you must get the
Allegro library for Linux yourself and install it as root. See links below.

The Windows version of O2EM v1.01 was compiled with MingW (MingW is a free
Win32 port of GCC -- Cygwin can also be used), the DOS version with DJGPP,
and the Linux version with GCC.  O2EM is a command line based program,
but there are several Windows frontends you can use. The "official" one
is O2EM Launcher, developed by Heitor Barcellos and me. It is the only one
that support the new features added since version 0.80. See the links
below for more.

The latest version of O2EM can be found at http://o2em.sourceforge.net
If you want to send bug reports, or be part of O2EM development, go to the
O2EM project page at SourceForge : http://sourceforge.net/projects/o2em/
You can also contact me using the e-mail: adlroc@users.sourceforge.net
But please do not e-mail me to ask for ROM files.


Useful links:

Dan Boris' home page: http://www.atarihq.com/danb/
O2EM Launcher home: http://www.geocities.com/hbarcellos/o2launcher.html
Allegro library: http://alleg.sourceforge.net/
MingW C/C++ compiler: http://sourceforge.net/projects/mingw/
Soeren Gust page : http://soeren.infoserv.de/Index.html
Port of O2EM to MacOS (made by Richard Bannister):
http://www.bannister.org/software/o2em.htm
Odyssey2 Home: http://www.classicgaming.com/o2home/


According to the Dan's rules for distribution of O2EM, you are free to
write derivative programs based on this code, or use portions of the
code in your own project under the following conditions:

1. No part of the code may be sold or used in a commercial venture.
2. He is given credit in the documentation of the program.
3. He do NOT require that you release the source of your derivative
work, but encourage you to do so!



Acknowledgments:

I would like to thank the following people:


    Dan Boris : for creating O2EM.

    Soeren Gust : For sending me his patches to O2EM and for technical
    information about the console. Part of his tech document was used
    to implement VP+ emulation.

    Simon Scudder : for sending me several technical informations about the
    O2 (including the datasheet of the VP+ gfx chipset), sampled sounds and
    his nice O2 disassembler.

    Heitor Barcellos : for creating the O2EM Launcher frontend.

    Marcelo Ribeiro : for the icon used with the windows version of O2EM,
    bug reports, and for information about O2 games.

    Rafael : for compiling a big list of bugs present in O2EM v0.87.
    
    Zimmerman : for sending me his patch to add key customization, on which
    v1.00 customization was based.
    
    All the members of the OdysseyBR users group: for several bug reports,
    as well for support in general.




                                                     Andre de la Rocha


Changes:


V1.01:  10/23/2002

    - Major speed optimization.
    
    - Implemented VDC <-> VP+ collision detection.
    
    - On the original machines it is possible to make all VDC 
    colors bright by clearing P17. This affects the background and
    dark grid colors. Implemented. Now the Killer Bees! intro screen
    works correctly.
    
    - Fixed the wrong color order when mixing between VP+ and VDC graphics.
    Jopac Moto Crash now works.  Fixed by Soeren Gust.
    
    - Now the VBLANK pulse is visible on the T1 input. This can be used
    to differentiate between PAL and NTSC.

    - Other minor fixes.



V1.00:  09/12/2002

    - Implemented complete Videopac+ G7400 emulation. Implemented it from
    scratch, based on the EF9340/41 datasheet (sent by Simon Scudder), on
    the technical docs made by Soeren Gust and disassembling the VP+ bios.
    You will need a Videopac+ bios image file in order to use this feature.
    You can use the -bios option to select it, rename the file to o2rom.bin,
    or select it in O2EM Launcher settings. Please note that a few O2 games
    do not work with the VP+ bios, so most likely you will need both bios
    versions to be able to run all the games. For copyright reasons these
    files are not included with O2EM, but you can find them in the Internet.
    
    - Added a default configuration file. Now you can specify your prefered
    options in a configuration file, instead of typing it every time you
    execute the emulator. The command line options override the default
    settings in the file. See O2EM.txt for more.
    
    - Extended the -s1 and -s2 switches to allow customizable keys with the
    joystick emulation. Based on a patch written by Zimmerman that
    implemented customizable keys it in a different way. See O2EM.txt for
    more.
    
    - Added support to the Four in 1 Row game.
    
    - Added the -exrom switch to enable the use of a special ROM mapping mode.
    See O2EM.txt for more.

    - Improved the sound with Frogger and Popeye.

    - Minor fixes.



V0.90:  08/07/2002

    - Fixed the color palette, based on screen shots from a real O2 console.

    - Fixed a bug in the sprite drawing priority. Now in several games the
    sprites look better (Demon Attack, Turtles, Atlantis, Computer Golf,
    Football, Helicopter Rescue, etc.).

    - Modified the emulation of sprites and characters in the border region of
    the screen. Fixed the bug of character wrapping to the other side of the
    screen and other problems (Atlantis and others). Now the main characters of
    P.T.Barnum's Acrobats! do not fall from the edge of screen.

    - Fixed the audio pitch and implemented white noise emulation. Now
    explosions sound much better!

    - Fixed a background line blinking problem that used to affect lots of
    games.

    - Fixed the color bar at the left of the screen.

    - Enhanced the support for European/Pal games. Now several games look and
    play better. Shark Hunter intro works correctly. Frogger and Depth Charge
    are fully playable !

    - Implemented an audio filter that accurately emulates the behavior of the
    low-pass filter present in the audio output of the real console. The sound
    is better now. (Enable it with -filter).

    - Fixed the screen size. Now you can see all the graphics in the game,
    including the time in Labyrinth.

    - Implemented Dot Grid emulation. Now Marksman is playable.

    - Implemented a cached video emulation, to make it run faster with slow
    machines / video cards.

    - Implemented screen shots (use the F8 key and the -scshot option)

    - Implemented the sprite shifted/smooth modes. Now the main character of
    Q*bert looks hi-res.

    - Several minor fixes.


    The following fixes were made by Soeren Gust:


    - Implemented the missing JNI instruction.

    - Implemented the 1kb data ROM / 3kb program ROM addressing mode used by
    Musician.

    - Fixed the height of the grid lines.

    - Added support for 3Kb per bank



V0.87:  06/21/2002

    - Fixed a collision bug introduced with version 0.86.
    Now Cosmic Conflict runs again. Thanks to Dan Boris for reporting
    this bug.

    - Implemented the option to set the O2 bios file name/dir, as
    requested by my friend Heitor, to enable him to support it with his
    nice O2EMLauncher frontend for O2EM 0.8x, as requested by its users.
    Get O2EMLauncher here: http://www.odyssey.com.br/o2emlauncher/



Version 0.86:

    - Fixed a bug in the drawing of quad characters. Now you can play
    Q*Bert and Nimble Numbers Ned. Some other games will also have
    improved graphics or text (Popeye, Super Cobra, etc.) .

    - Fixed another bug in the collision detection. Now Demon Attack
    works correctly.



Version 0.85:

    - Fixed the collision detection. Now you can play Killer Bees!

    - Implemented partial support to mid-screen changes to the VDC
    registers without interrupts. Now several games look better, and some
    that didn't work can be played, including Power Lords and Super Cobra.

    - Fixed a bug in the video emulation that made some games like Turtles
    and Shark Hunter appear with some strange static characters.



Version 0.80:

The following changes were already implemented by Daniel Boris in
version 0.701.  I implemented them again in the sources based on version
v0.65:

    - Fixed a bug in the CPU core related to the handling of branch
    instructions near page boundaries. (Without it Sid the Spellbinder
    crashed after the first level).

    - CPU core now jumps to the correct address on an external interrupt.
    Killer Bees runs again.

    - Fixed shape of '$' character and added missing 64th character to
    character set (ripped the correct character data from the v0.701
    executable file).

    - Fixed bug in drawing of bottom grid line.

    - Added Voice support. Re implemented it from scratch, based on O2
    technical specs released by Dan Boris and disassembling Smithereens
    and Turtles (now it always work with Turtles).

The following changes are new to version 0.80:

    - Updated the code to compile with Allegro 4.0.x and to work
    without changes under Windows, Linux and DOS, with optimizations
    for each.

    - Implemented the option of windowed or fullscreen video modes,
    with scaling, centering and optional 50% scanlines.

    - Cleaned the code to make it more portable and maintainable.

    - Improved timing, using the most accurate way available for
    each platform.

    - Fixed the keyboard scan code translation table.

    - Fixed and improved the built-in debugger.

    - Fixed the reset. It now works with Turtles.

    - Fixed joystick detection code.

    - Implemented variable speed control relative to original O2.

    - Implemented individual volume control for sounds and voice.

    - Implemented Pause/Information (F1).

    - Avoided collision of keyboard input with key joystick
    emulation. Now Caps Lock enables/disables the W,D,S,A,Space keys
    for keyboard input when they are used by joystick emulation.
    Works well with games like K.C.'s Krazy Chase.

    - It now releases more CPU time to the system (if possible).

    - Other minor changes/fixes.



