*******************************************
  **       ** *****    *****        **     
   **     **  *****   ******       ****    
    **   **   **     **           **  **   
     ** **    **     **          **    **  
      ***     *****  **   *****  ********  
     ** **    **     **     **   ********  
    **   **   **     **     **   **    **  
   **     **  ******  *******    **    **  
  **       ** ******   ******    **    **  
*******************************************
**             Michel Gerritse           **
*******************************************

http://xega.emucamp.com

email: xega_emu@yahoo.com


/*-- Sommaire --*/

* Disclaimer
* Comment dmarrer l'mulation MegaCD
* Comment dmarrer l'mulation 32X
* Historique
* Configuration requise
* Comment l'utilis ?
* Credits


/*-- Disclaimer --*/

XEGA (C) 2001-2002 by Michel Gerritse
Sega,Genesis,MegaDrive,32X,SegaCD and MegaCD are trademarks of Sega Enterprises, Ltd.

It can be distributed freely as long as it is not modified.
When you use it you do so at your own risk.
The author is not responsible for any loss or damage resulting from the use
or misuse of XEGA.
If you do not agree with these terms delete XEGA now.


/*-- How to start SegaCD emulation --*/

First you must make sure that you have configured the bios. 
You can do this this way:
  Config-> Bios-> Load SegaCD [X] where X is the desired bios.

Without the bios Xega won't run SegaCD games !!!

You can download the bioses from http://www.eidolons-inn.de

If you want to use your CD-ROM drive for SegaCD emulation, 
you must make sure you have installed ASPI. Xega will use
the first CD-ROM drive scanned at the bus.
Using the CD-ROM drive in Xega is very slow. I know of this problem.

You can also use ISO images in Xega. Just do:
  File-> Load rom.  And select 'SegaCD images' from the File select filter.

Xega can use 2 types of images: 
ISO (2048 bytes/sector) or BIN (2352 bytes/sector)

Some games give you a message like "Internal backup ram not formatted". You can
format the internal backup ram doing this:
- Boot/Load SegaCd
- At the "Press start" message press 'A'
- You are now in the CD player screen
- Go to "memory" or "options"
- Now format the internal backup ram


/*-- How to start 32X emulation --*/

First you must configure the 32X bioses. Without those, Xega
won't run 32X games !!!

You configure the master 32X bios this way:
  Config-> Bios-> Load 32X Master

You configure the slave 32X bios this way:
  Config-> Bios-> Load 32X slave

You configure the Genesis 68000 bios this way:
  Config-> Bios-> Load 32X 68000

If you configured the bioses correctly, you are ready to load
32X roms. You must make sure the 32X roms are in BIN format 
(and NOT SMD format) and you must rename xxx.bin to xxx.32x (xxx is rom name)
There are a lot of roms available that have the .32x extension, but that are in fact
SMD formatted roms (and not BIN format). Please be aware of this, Xega won't
run these roms.

To load a 32X rom you do:
  File-> Load rom. And select '32X Roms' from the File select filter.

*** !! Attention !! ***
Because of a timing issue in Xega you will have to do a trick to get
the 32X roms running (they won't run automatically).
When you loaded the rom (and the rom's name appears in the
title bar) Reset the main 68000 by doing this:
  MegaDrive-> CPU Reset-> Reset main 68000

Timing is critical, some games requires a fast reset of the Genesis 68000. 
This depends on the speed of your PC. Play with the reset trick until you
get the game running. I hope to fix this problem in a future release of Xega.


/*-- History --*/

(07/01/2002) Xega v0.10
-----------------------

- 32X emulation !!!
- New DirectDraw code
- New DirectInput code (with full joystick support)
- Stretch option
- Added Doze Z80 core
- Fixed CDC DMA transfers
- SegaCD internal backup ram saving/loading
- Fixed stopwatch timer
- Added repeat bit to scaling/rotating engine
- Command line options
- FM Timers rewritten
- Sync options
- Fixed dot conversion
- Added cell conversion
- Fixed 68K -> VDP DMA
- Major rewrite on VDP part
- Fixed bugs in Z80 memorymap
- Changed Z80 cycles

(11/10/2001) Xega v0.09
-----------------------

- Fixed bugs in scaling/rotating engine
- Fixed bugs in WORD ram memory
- Fixed bugs in PCM sound engine
- New DirectSound 8 code
- Added a funny sound effect
- Added directory browser
- Font conversion added
- Gfx conversion added (partial)
- More accurate CDC timer
- Auto SegaCD country detection
- Auto colordepth detection (15/16 bits only)
- Some other bug fixes

(01/10/2001) Xega v0.08
-----------------------

- SegaCD support !!!!
- Added RAZE core
- Fixed a bug in the VDP status register
- V-counter fixed
- Stereo DAC emulation
- GYM logging (with or without DAC logging)

(02/07/2001) Xega v0.07
-----------------------

- H-int timer fixed
- Fixed some 68000 problems
- LFO support
- Frameskip feature re-added
- Rewrote some parts of the VDP
- Country detection fixed

(05/06/2001) Xega v0.06
-----------------------

- Initial public release


/*-- System requirements --*/

Xega needs at least a machine with 16MB of RAM. 
Xega runs under Win9x with DirectX 8.0 installed.
Your display must be set to 16bit color depth, 
otherwise the graphics will be messed up.


/*-- How to use ? --*/

Default keys :
Move  : Arrow keys
A     : A
B     : S
C     : D
X     : Q
Y     : W
Z     : E
Start : Enter
Mode  : T

Shortcut keys :
F9  - Fullscreen/Windowed mode
F10 - Stretch/Correct ratio mode
F12 - Enable/Disable statusbar
ESC - Pause/Resume emulation
TAB - Reset emulation
Alt+L - Load Rom
Alt+B - Boot SegaCD

You can enable/disable the menu bar by pressing the right mouse button


/*-- Credits (in random order) --*/

- Stphane Dallongeville
- Christian Schiller
- Charles MacDonald
- Charles Doty
- Bart Trzynadlowski
- Steve Snake
- Tim Meekins
- Jagboy
- Atani
- Quinntesson
- Neill Corlett (XEGA uses his 68000 emulator)
- Neil Bradley (XEGA usues his Z80 emulator
- Richard Mitton (XEGA uses his Z80 emulator)
- Tatsuyuki Satoh (XEGA uses his YM2612 emulator)
- Dave (XEGA uses some parts of DGen)
- The beta testers
- The guys from www.emucamp.com , for hosting my site
- Malc Jennings (the webdesigner)
- Everyone else I have forgot (mail me if I did)