=================================================================
 genecyst                                 Version 0.20 (beta)
 by Bloodlust Software
=================================================================

Do not send any files without asking first.

---------------------
     What it is
---------------------

genecyst is a DOS based emulator for the Sega Genesis.

The 68K emulation, Z80 emulation, DAC emulation and graphics
rendering were written from *scratch* in assembly. The rest is in C++.

The YM2612 FM emulation was thankfully provided by Ishmair.
You must have a OPL3 FM compatible sound card in order to get
decent FM emulation.

It is freeware and it is not to be distributed with game
ROMs and it is not to be modified or sold.

Currently it only runs roms in the BIN or SMD file formats.
You will need a converter to convert files from the other file formats.

OS/2 users: -disablelfn


---------------------
     Revisions
---------------------

Version 0.20:
 -Highly accurate profiling with RDTSC (pentium only)
 -Faster FPU mem->vid copy (pentium only)
 -Automatic 6-button joystick disabling
 -68K: LineA/F emulation
 -68K: Corrected USP/SSP
 -YM2612 FM emulation
 -RAM->VRAM DMA transfer bug fixed
 -DAC sound output
 -Save state file format changed (this was unavoidable)
 -Z80 emulation (buggy)

Version 0.14:
 -Unchained modeX modes added (320x240 and 320x224)
  These modes are considerably slower than VESA modes so don't use them
 -6 button joystick inputs (almost)
 -Stop intruction fixed
 -Fixed MOVE->CCR data size
 -Sped up 68k branching
 -Funky Z-flag implemented
 -Improved waitvsync
 -Pattern table viewer
 -Layer enabling dialog
 -Fixed DOS hardware error handler
 -Readjusted window priority

Version 0.13:
 -PCX palette saving fixed
 -Fixed MOVEM wraparound bug
 -Fixed 68k flag bugs
 -Added primitive Z80 faking
 -Altered Window priority
 -ROM checksum fixer (fixes games that "red screen")

Version 0.12:
 -Initial release

---------------------
    What it does
---------------------

What is emulated:

   -68000 CPU @ 8Mhz
   -Z80 secondary CPU @ 4Mhz
   -DAC output
   -YM2612 FM synthesis
   -VDP
   -DMA (RAM->VRAM and VRAM fill)
   -ScrollA/ScrollB/Sprites/Window
   -H/V interrupts
   -Dual 4-button/7-button joypad emulation
   -US/Japan/Europe variants

Other neat features:

   -Multiple save states and battery backed ram
   -Joystick/GrIP support
   -VESA support
   -Save .pcx snapshots
   -Game genie codes
   -Rom checksum fixer

---------------------
   What it lacks
---------------------

68000 emulation is still buggy
Z80 emulation still buggy
PSG Sound emulation

Sometimes the DAC and the FM get out of synch.
DAC distortion needs fixing.
                            
In some games the sound output will just stop. This is due
to a failure in the 68000<->Z80 communication.

Raster-based effects
Cell based v-scrolling
Sprite masking
Shadow/highlighting effects
Interlaced modes

Pentium MMX support

Many games do not work correctly (or at all).
Dont bother me if a ROM doesn't work.

---------------------
  What you need
---------------------

A Pentium with at least 8MB of RAM.

genecyst can take advantage of VESA 2.0 support if it exists.
If it does not exist, genecyst will resort to only the
video modes 320x200, 256x224, 256x240, 256x256, 320x224, 320x240.
The last 2 modes are planar (unchained) ModeX modes, meaning that
they are not linear and are very SLOW. Get a VESA extender such as Scitech
Display Doctor (www.scitechsoft.com) and use 320x240 instead.

---------------------
  Work it baby
---------------------

Use alt-<key> to access the menu options (ie alt-l loads)

The default keys for the first controller are ABC='zxc', Start='v', XYZ='asd',
and the arrow keys. They can be remapped from the Settings/Input device menu.
Enter/Tab will simulate Start/C on controller 1 if you have a 2 button joystick,
ONLY when the GUI is disabled or the game window has input focus (click on it)

6-button Genesis controllers can be enabled from the Settings menu. Having a
6-button controller enabled on older games will most likely cause them to go
haywire. The emulation of the 6-button controllers is only a guess, but it
seems to work for most games. Most games need to be reset if you change from
3 to 6 buttons. 6-button support will be automatically disabled for games
which don't support them as specified in their ROM header.

Some carts check to see what version of hardware they are running
on (US/Japan/Europe), and they'll bitch if played on the wrong system.
You can change the system version from the settings menu and then reset
the CPU.

Some games contain battery backed RAM. This RAM is automatically
loaded and saved to "xxxx.GSV" files.

F5/F7 saves and loads states. Pressing the keyboard keys 0-9 (not the numeric
keypad ones) will change the current state slot for subsequent saves/loads.
The state filename follows the form "xxxx.GS?" where 'xxxx' is the romname
and ? is the current save slot (0-9).

Know that the battery backed RAM is saved in each state file. The
battery RAM from any state file that is loaded will overwrite
the ROM's .GSV file.

There might be some bugs in the state and battery saving.

---------------------
      Sound
---------------------

Genesis sound output is driven by a secondary Z80 processor running at 4Mhz,
however the 68000 can also control the sound hardware directly. The Genesis
uses a YM2612 sound chip which has six FM channels and one digital channel.
The YM2612 is more advanced than your average OPL3, so accurate FM emulation
is not possible.

A fast Pentium is highly recommended for decent sound emulation.

Z80 emulation can be toggled from the CPU menu. Disabling the Z80 will
speed up the overall emulation, but sound will be absent in most games.

If a ROM stops due to a Z80 invalid opcode, remember that the Z80
emulation is buggy and incomplete. Disable Z80 and reset.

Z80 faking can be toggled from the CPU menu. It is workaround that will
fool the 68000 into thinking that a Z80 is actually present and running.
Some games loop waiting for the Z80 to respond.

The DAC buffer ahead option will reduce DAC distortion in some games at the
expense of slightly lagged sound. This lag can be reduced by reducing the
sndblksize.

All sound can be disabled with the -nosound command line option.
FM sound can be disabled with the -nofm command line option.
DAC sound can be disabled with the -nodac command line option.
Z80 emulation can be disabled with the -disablez80 command line option.

To change the volume of the DAC/FM you must use your sound card's volume
control.

---------------------
      Input
---------------------

genecyst supports analog joysticks, 4-button gamepads,
6-button gamepads, the Gravis GrIP gameport and keyboard input.

 - There are two input devices, one each for controller 1 and 2.
 - Change the input devices with Settings/RedefineInput
 - Enter/Tab will simulate Start/C on controller 1, ONLY when
    the GUI is disabled or the game window has input focus (click on it)
 - You can remap the buttons for a joystick input device with the
    command line option '-remapbut' or from the "Remap buttons" dialog...
    Simply click on the button type and then press the joystick button
    you wish to use. Pressing any key will set the NES button to "None".
 - You can redefine the keys for a Keyboard input device with the
    Redefine Keys dialog, or with the '-setkey' command line option
 - Joystick 1 or 2 refer to 2-button analog joysticks only!
 - You can interactively calibrate the joystick with the "Calibrate"
    button. Just center and swirl. The joystick thresholds can be also
    set with the '-joythresh' command line option.
 - The '-analogjoyres' command line option sets the maximum number of
    times that the joystick port is polled (usually this need not be changed)
 - In order to enable GrIP support, you MUST copy the "grip.gll" file
    to the startup directory. genecyst will load the driver
    if it finds it and the GrIP devices in slot 1 or 2 can be used.
    Note that if you have Win95 GrIP drivers installed it may not be
    possible for a DOS application to access the GrIP port.

Information on reading the MS Sidewinder gamepad in its native digital mode
under DOS would be nice. Microsoft is uncooperative.

---------------------
      Timing
---------------------

You can adjust the timing from the Settings menu.

HBlank inst is the number of instructions per scanline (224 lines per frame).
VBlank inst is the number of instructions per vertical retrace (vblank).
Vfps is the number of emulated frames per second.

Some games require more instructions per frame in order to not slowdown. In
other words some games need more CPU power. Other games may need less.

The more time spent emulating the 68k, the less time available to render
frames and vice versa.

---------------------
   ROM patching
---------------------


genecyst supports GameGenie codes and general patching of the
CPU ROM address space (0-3FFFFF).

Bring up the ROM patching dialog with F6 or from the CPU menu.
There are two edit fields in the dialog, the Name and the Code.
The Code field is where the actual code goes (eg SCRA-BJX0).
The Name field lets you type in a description of the code (eg "Rings worth 2"),
if no name is entered then the code string is used as the name.
Once you've filled these in, clicking "Add" (or pressing enter) will
add it to the list of patches. To activate or deactivate the patch,
doubleclick on the code name in the listbox or click on "Toggle".
"Remove" deletes the patch completely. "Save" writes all the patches
to the text file <romname>.pat, this file is decribed below.

genecyst accepts either GameGenie codes or raw patches.
GameGenie codes are 8 digits long and use the symbols:
     ABCDEFGHJKLMNPRSTVWXYZ0123456789
The use of a '-' is optional.

The raw patches are in the format:
        <$addr>:<$val>
<$addr> is the 24-bit hex address (must be even)
<$val> is the 16-bit hex value to be patched at that address.

genecyst can save a .pat file that contains all the patches
created during a game. This file can be modified using a
text editor. Each line of the .pat file looks like this:
            <code> [<name>]
<code> is the patch itself (GG or raw format).
<name> is the text description of the code, if no name is supplied
        then the code is used as the name

Note: If more than one patch modifies the same address then only one
can be active at once. Activating one will deactivate the others.

Another Note: Most Genesis games do a rom checksum in order to verify
their integrity. Therefore, having a patch active during the ROM's startup
code could in most cases cause the ROM to crash itself. (Hence the use
of so called 'master codes')


---------------------
Command line options
---------------------


@<filename>     : Parses the file <filename> for command line options

-res <xw> <yw>  : Sets the resolution to xw,yw on startup.

-setinput <num> <type>
                : Sets input device <num> to <type>
-remapbut <device> <a> <b> <c> <start> <x> <y> <z>
                : Remaps buttons for <device>
                : <device> can be JOY1, JOY2, GRAVIS, GRIP1, GRIP2, 6BUTTON
-setkey <device> <ul> <u> <ur> <l> <r> <dl> <d> <dr> <a> <b> <c> <start> <x> <y> <z>
                : Sets the keyboard scancodes for <device>
                : <device> can be KEY1 or KEY2
-setjoythresh <num>  <left> <right> <up> <down>
                : Sets the joystick threshold for analog joystick <num>
                : left,right,up,down define the joystick's "dead-zone"
-analogjoyres <num>
                : Sets the maximum number of times the joystick port
                : is polled. Increase this number if the calibration values
                : seem to max out.

-waitvsync      : Wait for the vertical sync to draw frames
-hidegui        : Hide GUI on startup
-nomsgpopup     : Disables the last message from being shown on screen

-load <rom>     : Load <rom>
-run <rom>      : Load & Run <rom>

-romdir <dir>   : Sets the startup dir for roms
-savedir <dir>  : Sets the directory for .GS? files
-pcxdir <dir>   : Sets the directory for saving snapshots

-? or -h        : Display command line help
-disablelfn     : Disables long file name support
-novesa         : Don't use VESA extensions
-linear         : Force linear VESA mode
-banked         : Force banked VESA mode

-nosound        : Disables both FM and DAC
-nofm           : Disables FM sound
-nodac          : Disables DAC
-fmdelay <base> <data>
                : Specifies the amount of delay after FM port writes
                : Reducing these will speed up FM emulation, however
                : some older sound cards require longer delays.
-forcefm        : Forces the FM emulation on even if OPL3 is not detected

-disablez80     : Disables the Z80 processor (enabled by default)
-fakez80        : Turns Z80 faking on (disabled by default)

-rdtsc          : Enable the use of the pentium RDTSC profiling instruction
                : Enabling this on a non-Pentium will cause genecyst to crash.

-fpucopy        : Use the FPU for mem->vidmem copies
                : This will only provide speedups for pentium class processors

---------------------
     Contact
---------------------

Bloodlust Software
bldlust@southwind.net
http://www2.southwind.net/~bldlust/genecyst.html

Don't email me about ROMs.

Information on the NeoGeo or Capcom arcade units would be appreciated.

---------------------
  Acknowledgements
---------------------

The authors and contributors to the Sega Programming Faq

Ishmair for his YM2612 FM sound emulation.

Neill Corlett for general 68K information
Get MGE now: http://www4.ncsu.edu/eos/users/n/nscorlet/mge/

Merlyn LeRoy for the Sega Game Genie decoding information

Special thanks to Loaded

Marat Fayzullin, Jens Restemeier, Carl-Henrik Skrstedt, DsK, and Zophar

---------------------
     Disclaimer
---------------------

genecyst Copyright 1997 Bloodlust Software
Sega and Genesis are trademarks of Sega Enterprises, Ltd.
Neither Bloodlust Software nor the author are affiliated with Sega
 nor advocate the piracy of Genesis games.
genecyst is freeware and can be distributed freely as long as it is not
 modified and ROMs are not packaged with the program.
When you use this software you do so at your own risk. The author is
 not responsible for any loss or damage resulting from the use or
 misuse of this software.
If you do not agree with these terms delete this software now.

